Sample Video Games

You can experiment, modify, and learn from the following sample games. Remember that there is a tutorials page to learn the basics.


Bird Hunding Explanations
There is one rabbit.
There are 10 birds near the top.
There are three spinstars near the top.
You control rabbit with keyboard.
Object declaration, instantiation, and initial placement.
Declaration of controlled object.
When left arrow is pressed, the rabbit moves left.
When right arrow is pressed, the rabbit moves right.
When up arrow is pressed, the rabbit jumps.
When spacebar is pressed and the rabbit is empowered, the rabbit shoots up.
Conditional statement for describing how the spinstar is controlled.
The birds fly randomly at 1 pixel per frame.
When a bird sees a rabbit, it flies at 3 pixels per frame.
When a bird reaches a border, it reverses direction.
Statements for describing the birds' behavior.
The spinstar starts moving down.
When a spinstar reaches the bottom border, it wraps around.
Statements for describing the spinstars' behavior.
When the rabbit collides with spinstar, rabbit eats spinstar and rabbit is empowered for 5 seconds.
When a bullet hits a bird, the bird explodes and score increments.
Statements for describing collision.
When a bird hits a rabbit, the rabbit explodes and the game is over.
When all birds are gone, you win.
Conditional statements for describing gameover.
Map:
Click the image to try it

Can you add a few more obstacle objects to make the game more challenging?


Next Page

Samples Page