BreakOut
(Creating a simple Demo Game)
Great game...and one of the first I ever played many many years ago on the
spectrum...its code is quite simple to follow... and easy to improve upon.
Possible improvements could be different levels where the blocks spell out
sayings.... two player?... use more graphics....have a bitmap for the background
etc.
DownloadSourceCode
Why is it so simple?... simple is beautiful :) Your mission if you
choose to accept it, is to destroy all those blocks! Now don't let it
sound easy...as its not...blocks that are higher up require more than one
hit. Its a simple game to get a feel of how to store game data.... put
in some simple AI (e.g.. rand() )...and get familiar with graphics and user
input.
I've kept the code simple so that its easy to follow...and of course it
allows you to build from it..... with a bit of work..e.g. sound etc...bitmaps..it
can be a a great game.
|
|
One thing to notice in the code, is the direction of the ball.... you should
really add a bit of randomness to the balls angle of direction...which I'm sure
you can do... just add a small rand() amount to the vDirX,vDirY variables each
time there's a collision.
|