Hardware Reference
In-Depth Information
Using the four cursor keys for playing is quite good as you can concentrate on the screen
action without needing to look at the keys. However, when you irst play you may be a little
frustrated as you might ind that your Pie Man doesn't want to make a turn. his is because
the whole of the sprite has to it into the opening before you can move through it. Just a
single pixel blocking the way is enough to prevent any movement. When this happens I have
found it best to do a quick turn to one side, then do an about turn and then have another go
at making the turn. You will get better the more you play.
Over to You
What you have here is just the start; there are more things you can add to make the game
even better. How about keeping a permanent record of the high score? You can write it out
to a ile in the terminate function and read it in at the start of the main function. Better
still, how about a whole table of high scores with names alongside them? here is room on
the right side of the screen to do that. See Chapter 8, “Colour Snap”, for hints on how to add
a high-score table. Additionally, you have the opportunity to add another sound efect for
when a new high score is made. here are also several other places in the game where you can
add sound efects, such as when restarting after losing a life and when the game ends alto-
gether. You could add a continuous music soundtrack to play all the time, which is simple to
do; you just need the normal command to play the sound but put a -1 in the brackets of the
call - then the sound loops continuously.
You can add bonus fruit, like so many games of this type. here is room in the lower left of the
screen to show the fruit in waiting. For the more adventurous, you could add some extra code
that makes Pie Man wriggle into gaps that he is not initially exactly lined up to it in. Perhaps
the biggest challenge would be to change the behaviour of the ghosts. You might want to have
an initial phase in which a ghost can escape from the top of the ghost box no matter where the
Pie Man is. Or you can put an exit in the lower part of the ghost box. You could even have each
ghost performing a diferent strategy to hunt. What about using more ghosts? You can also
make the ghosts lash more than once toward the end of the power play period.
One other thing you could do is make a level editor. As you have seen, the background consists of
many drawing commands; well, you could do this in a separate program and produce an image ile
of the background. hen, in the game-playing program in place of the drawing, you could simply
have an instruction that loads the image ile into the background layer. You can also have another
ile for the pills layer; then when all the pills are eaten you can load in another, diferent layout.
here is really a lot more you can do, but whatever you do, keep on munching.
Search WWH ::




Custom Search