# Prototype of a Flash game like GearTaker

Read all posts about "" game

Do you know Tony Pa‘s GearTaker game?

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?

```// constant to convert degrees to radians
degrees_to_radians = 0.0174532925;
// constant to convert radians to degrees
radians_to_degrees = 57.2957795;
// arrays storing cogs information: x position, y position and diameter
cog_x_position = Array(100, 400);
cog_y_position = Array(200, 200);
cog_diameter = Array(100, 100);
// diameter of the hero
hero_diameter = 24;
// speed of the hero, when he'll fly
hero_speed = 5;
// flag to determine if the hero has to rotate attached to the cog (true) or not (false)
rotate = true;
// cog where the hero will rotate. The starting one
cog_to_rotate = 0;
// offset to align the hero to the top of the inner circle of the cog
angle_offset = -Math.PI/2;
// cycle scanning through all cogs
for (x=0; x
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...
```
215 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 1+2=3
// 10000000
// 2 Cars
// 2048
// Avoider
// Ballz
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// BoxHead
// Breakout
// Bricks
// Columns
// CubesOut
// Dots
// DROP'd
// Dudeski
// Eskiv
// Filler
// Fling
// Globe
// HookPod
// Hundreds
// InkTd
// Iromeku
// Lumines
// Magick
// MagOrMin
// Maze
// Memdot
// Nano War
// Nodes
// o:anquan
// Ononmin
// Pacco
// Phyballs
// Platform
// Poker
// Pool
// Poux
// Pudi
// qomp
// Racing
// Radical
// Renju
// SameGame
// Security
// Sling
// Slingy
// Sokoban
// Splitter
// Sproing
// Stack
// Stairs
// Stringy
// Sudoku
// Tetris
// Threes
// Toony
// Turn
// TwinSpin
// vvvvvv
// Wordle
// Worms
// Yanga
// Zhed
// zNumbers