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.


Extreme Breakout Explanations
There are four balls, a brick and 54 rocks.
The user controls the brick with the mouse.
Object declaration, instantiation, and initial placement.
Declaration of controlled object.
The balls start moving south at 5 pixels per frame.
When a ball hits a wall, the ball reverses direction.
When a ball hits the brick, the ball reverses direction.
When a ball hits a rock, the rock explodes and the ball reverses direction.
When a ball hits a different ball, both balls reverse direction.
When a ball hits a border, the ball explodes.
Statements for describing how the balls move.
When all the balls have exploded, the game is over.
When all the rocks are gone, you win.
Conditional statements for describing gameover.
Map:
wwwwwwwwwwwwwwwwwwww
woooooooooooooooooow
woooooooooooooooooow
woooooooooooooooooow
w------------------w
w----l-------------w
w------------------w
w------------------w
w------------------w
w----l-------------w
w------------------w
w-------l----------w
w-------------l----w
w------------------w
w------------------w
w------------------w
w------------------w
w------------------w
w---------k--------w
Click the image to try it

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


Next Page

Samples Page