Build 10 classic Flash games and learn game development along the way with this ultra-fast paced game development course.

If you love this blog, this is the book for you.

Buy the book

Get the source code of 12 commercial Flash games, which have been loaded more than 50 million times!

Learn from real world successful examples.

Get it now

Box2D for Flash Games teaches you how to make Flash physics games from scratch with the most advanced features.

Create the new Flash game smashing hit.

Buy the book

Prototype of a Flash game like GearTaker

Do you know Tony Pa‘s GearTaker game?

GearTaker

You have a buddy jumping around rotating gears. As most Tony Pa’s games, it’s easier to play than to explain, and it’s hard to link… from this page select “GearTaker” and play.

I made a Flash prototype using two objects, the cog and the hero

The prototype has the following features:

1) Commented code
2) (virtually) unlimited fully customizable gears
3) Player starting gear and offset

Do you want more?

The only feature I am not showing you at the moment is how to determine the angle offset when the hero jumps from a cog to another. In my prototype, the hero always places himself at the top of the gear.

Also, if the hero files out of the stage, you’ll have to reload the page.

Can you improve the prototype?

Mouse button to play. Happy jumping. Yes, this is a one-button game, and I have a next-to-be-published incredible game based upon this prototype.

Prototypes are the most interesting ways to make a game, remember what I was able to make from this to this

And this is the source code, just in case you need it…

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 3.60 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 10 comments

  1. JDog

    on May 6, 2008 at 8:43 pm

    Its good, can’t wait to see what you are going to do with this !

  2. Jack Hopkisn

    on May 6, 2008 at 9:38 pm

    I forsee an awesome game coming out of this :D

  3. Galaxian

    on May 6, 2008 at 9:47 pm

    I’ve seen an awesome game like this. Miniclip’s Wheels of Salvation.

  4. Andre

    on May 6, 2008 at 9:48 pm

    In between lines 62-63 add…

    *************************************************
    angle = Math.atan2(dist_y, dist_x);
    angle_offset = angle – _root["cog_"+x]._rotation;
    *************************************************

    This will make the hero stick to the place where it hit the cog.

  5. Emanuele Feronato

    on May 7, 2008 at 11:51 am

    Wrong!

    you’re mixing degrees with radians…

  6. JDog

    on May 7, 2008 at 5:42 pm

    Don’t you just correct it using radians ? the code could stil have some use….I imagine ?

  7. Xavi

    on May 7, 2008 at 5:48 pm

    ya, I played wheels of salvatin too.
    What’s different though is that the guy doesn’t automatically go to a predefined point.
    it just continues from the point where it hit the wheel/gear.

  8. Emanuele Feronato

    on May 7, 2008 at 5:52 pm

    No, it would attach at the opposite side of the wheel

    the correct angle_offset is determined by

    *************************
    angle_offset = angle-_root["cog_"+x]._rotation*degrees_to_radians+Math.PI;
    *************************

  9. Fernando

    on August 2, 2008 at 5:14 pm

    explain the actions please i want know more about the codes and u dont explain

  10. DutchBoy

    on April 23, 2011 at 10:05 am

    lol ! Fernando is that your name or “his” name? xO

    This is soooo old and other scripts too, but I use them :)