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.


Save the Kittens Explanations
There are 8 cobras.
There is 1 bird near the center.
You control the bird.
Object declaration, instantiation, and initial placement.
Declaration of controlled object.
When up arrow is pressed, the bird jumps.
When right arrow is pressed, the bird flies right.
When left arrow is pressed, the bird flies left.
Statements for describing how the bird moves.
When the direction_x of the bird is less than 0, the bird is facing_left.
Otherwise, it is not facing_left.
Conditional statements for determining which way the bird is facing, using a combination of integer attribute direction_x and Boolean attribute facing_left.
When space bar is pressed and the bird is facing_left, the bird shoots left.
When space bar is pressed and the bird is not facing_left, the bird shoots right.
Conditional statements for describing shooting in the direction the bird is facing.
When a cobra is shot, it explodes.
When the bird reaches the bottom border, it blows up.
When the bird is dead, game over.
When all cobras are dead, you win.
Conditional statements for describing how characters can die and 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