Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 483
Author: eugenebrady
Date: 03/08/2000
Subject: Re: ?tioning the mind of a genious
"What do the buffers actually do?"
If you've
got a screen with some sprites on it, and then you
want to redraw those sprites in new positions, you
can't just dump the new sprites on the screen, can you?
You've got to get rid of the old sprites first.
The
first buffer is just the game screen minus any
guardians, ropes, arrows, etc... It obviously doesn't change
much (the kong beast levels do change it, but I don't
think anything else does), and the whole thing only
needs to be drawn when you enter a room or finish a
level.
We just copy this to the second buffer to blank out
the guardians from the second buffer. A better
approach would have been to copy only the parts of the
screen with guardians on them! (This is what Manic Miner
PC does -- and no, the space needed for the extra
code would not be greater than the space saved, which
is 4.5k. If he got rid of the second buffer as well,
he could have saved 9k!)
The second buffer is a
supposedly a double buffer, but I don't really see the need
for it. It's supposed to stop you from seeing the
guardians being removed and drawn, etc. but a) it's in
contended memory (Duh!) and b) I don't see the need for it
anyway, because the JSW engine is so damned fast.
The
buffers also act as delays, because of the time taken to
copy the data. Very long delays... :)
Matt Smith
wasn't a bad programmer -- he was just lazy, if you ask
me.
