To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 02-15-2002, 01:26 AM   #1
kallok
Ryan Kallok: Kallok Studios
 
kallok's Avatar
 
Join Date: Apr 2001
Location: Youngstown email: kallok@sei-inc.zzn.com
Posts: 213
im interested in making a simple game like the one located at http://www.entropicorder.com/games/cupcake.swf

All that i am interested in making is a game where u can move a character and can run into obsticles like in it.Is there a tutorial or fla somewhere that can help?Or if you got one and wanna send me it email me at kallok@sei-inc.zzn.com!
kallok is offline   Reply With Quote
Old 02-15-2002, 02:33 AM   #2
segavenger
Senior Member
 
Join Date: May 2001
Posts: 198
Well, I can't think of any tutorials for that sorta thing (other than the spaceship tute in the Games Tutorials section)
I suggest downloading that, cause it deals with alot of the principles exercised in "Cupcapades"


Basically, you need only a couple things


1. A character

Which will be moved using code like this:

Code:
onClipEvent (enterFrame) {
    if (Key.isDown (Key.RIGHT)) {
        this._x+3;
    } else if (Key.isDown (Key.LEFT)) {
        this._x-3;
    }
}

2. Obstacles (the logs in Cupcapades)

the code that goes here could vary, but something like, a hitTest with the Log and the character which would cause the character to "die". (you'll also need code to move the logs along similiar to the character, this is a bit in depth, so if you need more help, I'll post more on this and maybe creat a tutorial/sourcefile for you to pick apart)

3. A score counter, very simple. You create a blank text field, change it to Dynamic Text, and call it something like "score"
In the keyframe of the main timeline that contains the game, add this bit of code:

[code_root.score = 0[/code]
(this starts the score out at zero)

Now each time the obstacle reaches the left side of the screen it disappears (more advanced code to duplicate and remove the logs, but I'll explain more later) and makes the score go up by 10.

Code:
onClipEvent (enterFrame) {
    if (_root.log._x == -143) {
        _root.score += 1;
    }
}

Obviously there is a bit more to this game's source code, but this gives you an idea of how the game works basically.

I highly recommend searching the Games Tutes, cause there's a really good one there that has this sorta stuff covered. it's more advanced but with some determination you should be able to pick it apart (I was )

Post some more if you want me to explain some more.
segavenger is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:11 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.