it really is just a test for my pixel collision routine which I've just written.
It is the basis of a game, it's just not very hard, you can't fight back. You can just shoot the baddies (with the completely inappropriate hologram) and get a point each time you do it.
Still next up is the first proper game, which will be Asteroids, or really a simpler version of the Intellivision Astrosmash.
I did get Asteroids in 64x32 on a Studio2, but 7 x 6 resolution .... nope.
Studio II Asteroids
The code hasn't changed much, basically MovePlayerMissile skips if the missile is in flight - if you need to check collisions. It calls the new CheckCollision function, which skips itself if there is a collision, with the pixel ID in A + B. This object is killed, the PlayerMissile is killed, the score is bumped and round we go again.
I realised why the NOPs are there ; it's a feature of MoveUp/Down/Left/Right which the MoveXPlayer routines use. I think I'll leave it.
jsrp Update
jsrp MoveHPlayer
nop
jsrp MoveVPlayer
nop
jsrp CheckFire
jsrp MovePlayerMissile
jp game_code
lbi 0,PlayerMissile
jsrp CheckCollision
jp game_code
jsrp Kill
jsrp KillPlayerMissile
jsrp BumpCounter
jp game_code
No comments:
Post a Comment