On Sun, Dec 31, 2000 at 01:27:00PM +0100, tyro@... wrote:
> Hey, I just had a quick look at your game, and I'm *VERY* impressed! The
> title screen and hi-score table look like crap to be honest (too crowded
> and unorganized, and too much space for digits with too little space for
> the actual player name), but the game itself is _first-class_. Real fun
> to play, and with enough variation to keep things interesting. It would
> have helped if you didn't make everything just black and worked more with
> outlined or 'dithered' sprites, but I guess that's for technical
> reasons...
I am just not very good at graphics. And most of the development was done on
softvms which looks quite different when the objects are moving.
> I'm curious, how exactly are you keeping track of all the player shots,
> alien sprites, cannons, asteroids etc. etc.? Do you keep a list of all co-
> ordinates relative to the level and the player-ship, or are you just
> copying in various layers of images based on a time table?
All coordinates are absolute screen positions. I have reserved a fixed
RAM location in which I store the coordinates and other data for all aliens
including the shots. To move them I call a piece of code which can be
different for every alien. This code updates the positions etc. When it is
finished the current PC is stored inside the alien object for the next
frame.
> And when checking for collisions, are you comparing positions or do you
> just check if any of the pixels where the player-ship will be placed are
> already set?
For anything that kills the ship I test while drawing. To be able to do
this I have to draw the different objects in the correct order. For
defense shot/alien collisions I remeber if I hit something while drawing
the defense shots. For those which hit something I first check if shot and
alien are both in a 8x8 pixel range. Then I compare the bitmaps.
Soeren