vdub_bobby Posted May 3, 2009 Share Posted May 3, 2009 (edited) Very much inspired by Thomas, I took a stab at a RAM Space Invaders...well, sort of. More like RAM Space Invader (singular). So far, anyway. RAMvaders.bin RAMvaders.zip It's really hard to fit something that resembles a game in 128 bytes. Possibly still to do: -more invaders -sounds -invaders-to-player collisions -score -prettier graphics EDIT: BTW, this is tested and works on a 7800. Edited May 3, 2009 by vdub_bobby Quote Link to comment Share on other sites More sharing options...
cd-w Posted May 3, 2009 Share Posted May 3, 2009 (edited) Very much inspired by Thomas, I took a stab at a RAM Space Invaders...well, sort of. More like RAM Space Invader (singular). So far, anyway. It's really hard to fit something that resembles a game in 128 bytes. Nice work - turn it upside down and you would also have a good start on a RAM version of Kaboom! Chris Edited May 3, 2009 by cd-w Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 5, 2009 Author Share Posted May 5, 2009 Next revision - freed up some bytes and made the "alien" (block) move much faster, also game ends when it hits the player's "ship". "D RAMvaders.bin Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 5, 2009 Share Posted May 5, 2009 Nice work - turn it upside down and you would also have a good start on a RAM version of Kaboom! Actually that was the first one I tried, but it didn't work due to space limitations. Maybe I should try again now, and use some of my new tricks. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 5, 2009 Share Posted May 5, 2009 (edited) Next revision - freed up some bytes and made the "alien" (block) move much faster, also game ends when it hits the player's "ship". "D That's a good start. How much space do you have left? Just peeked at the code. Very cool idea to get rid of the overscan and vblank delay loops by making the kernel 256 lines. BTW: Replace LAX SWCHA with BIT SWCHA, that will save you the ANDs and the TXA. Edited May 5, 2009 by Thomas Jentzsch Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 5, 2009 Author Share Posted May 5, 2009 Next revision - freed up some bytes and made the "alien" (block) move much faster, also game ends when it hits the player's "ship". "D That's a good start. How much space do you have left? Just peeked at the code. Very cool idea to get rid of the overscan and vblank delay loops by making the kernel 256 lines. Thanks. Means I don't have to reset any variables since they wrap back to their original values also. BTW: Replace LAX SWCHA with BIT SWCHA, that will save you the ANDs and the TXA. Ah, of course! Thanks again. And 3 bytes free right now. Quote Link to comment Share on other sites More sharing options...
cd-w Posted May 5, 2009 Share Posted May 5, 2009 Nice work - turn it upside down and you would also have a good start on a RAM version of Kaboom! Actually that was the first one I tried, but it didn't work due to space limitations. Maybe I should try again now, and use some of my new tricks. That would be good to see - a cut-down version your Cave 1K game might also be possible? Chris Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 5, 2009 Share Posted May 5, 2009 That would be good to see - a cut-down version your Cave 1K game might also be possible? Maybe, though the physics require some extra computation space. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 5, 2009 Share Posted May 5, 2009 Another tip: To save space for variables, at the first read occurance do something like this: variable = . + 1 lda #INITIAL_VALUE If the there is a store operation before the first read, you will have to hint DASM. Else the it will fail. Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 5, 2009 Author Share Posted May 5, 2009 (edited) Another tip: To save space for variables, at the first read occurance do something like this: variable = . + 1 lda #INITIAL_VALUE If the there is a store operation before the first read, you will have to hint DASM. Else the it will fail. I had already gleaned that from the RAM Pong thread. I don't use it for all my variables because...I don't ever read them! At least not while running from RAM. Update: multiple enemies! RAMvaders.bin RAMvaders.zip Zero bytes free. Still to try to do: -either increase initial difficulty or make difficulty increase during play -sounds -score -smarter collision detection would be nice, but will be very difficult Edited May 5, 2009 by vdub_bobby Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 5, 2009 Share Posted May 5, 2009 You could replace this: lda #ENEMYHEIGHT dcp Enemy1Y bcs DoDraw1 ldx #0 .byte $2C DoDraw1 ldx #$FF with: lda #ENEMYHEIGHT dcp Enemy1Y ldx #0 bcc SkipDraw1 dex SkipDraw1 Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 5, 2009 Author Share Posted May 5, 2009 You could replace this: lda #ENEMYHEIGHT dcp Enemy1Y bcs DoDraw1 ldx #0 .byte $2C DoDraw1 ldx #$FF with: lda #ENEMYHEIGHT dcp Enemy1Y ldx #0 bcc SkipDraw1 dex SkipDraw1 Thanks. Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted May 5, 2009 Share Posted May 5, 2009 Its a lot more fun with 3 invaders Quote Link to comment Share on other sites More sharing options...
supercat Posted May 5, 2009 Share Posted May 5, 2009 It might be interesting to have a RAM-game contest for the 2600 and maybe also one for the 7800. Any size cart could be used for initialization (though anything over 2K would probably be pointless), but once the game is running it can't use the cart any more. In theory, one could pull the cart and the game would continue to run (in practice I wouldn't generally recommend it). I wonder how much of a 2600 game one could do in 128 bytes (or more, for the 7800, but not a whole lot given the required layout of display lists). Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted May 5, 2009 Share Posted May 5, 2009 It might be interesting to have a RAM-game contest for the 2600 and maybe also one for the 7800. Any size cart could be used for initialization (though anything over 2K would probably be pointless), but once the game is running it can't use the cart any more. In theory, one could pull the cart and the game would continue to run (in practice I wouldn't generally recommend it). I wonder how much of a 2600 game one could do in 128 bytes (or more, for the 7800, but not a whole lot given the required layout of display lists). That would be cool, I would *try* to participate Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 6, 2009 Author Share Posted May 6, 2009 Freed up a few bytes and used it to make the invaders' vertical pace speed up each time you kill off all three. RAMvaders.bin RAMvaders.zip Still to try to do: -sounds -score -smarter collision detection would be nice, but will be very difficult Zero bytes free. Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 7, 2009 Author Share Posted May 7, 2009 A lot of changes: -changed invader and ship and laser graphics, mostly to save space but also to make the invaders more interesting: -changed some of the gameplay to be closer to original SI. I have 11 free bytes at this point. Here are the options: -sounds -make the invaders start their march progressively lower on the screen every time you kill them all off -make the graphics prettier -score -other ideas? Or a preference? RAMvaders.bin This is untested on real hardware and...it might not work - I'm depending on a LDA CXP0FB always returning something like %xx00xxxx; not sure how reliable that will be. RAMvaders.zip Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted May 7, 2009 Share Posted May 7, 2009 (edited) -other ideas? Or a preference? make the invaders shoot back? If you use the invader's player's missile then you'd get up to 3 missiles on screen. Edited May 7, 2009 by SpiceWare Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 7, 2009 Author Share Posted May 7, 2009 -other ideas? Or a preference? make the invaders shoot back? If you use the invader's player's missile then you'd get up to 3 missiles on screen. I thought about it, but I don't think I can do it in 11 bytes. Figure 4 to display (cpy RAM php pla), that just leaves 7 bytes to move it and detect collisions. Though maybe...I'll think about it... Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted May 7, 2009 Share Posted May 7, 2009 The invaders should come down much faster. Currently its way too easy. Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted May 7, 2009 Share Posted May 7, 2009 (edited) Edit: I was looking at an old version of your source, I did not realize you already removed EnemyDirection in the latest version, sorry Edited May 7, 2009 by Wickeycolumbus Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted May 7, 2009 Author Share Posted May 7, 2009 (edited) The invaders should come down much faster. Currently its way too easy. Agreed. I played around with having the invaders drop bombs but I just couldn't fit it in. So; latest version: RAMvaders.bin Changes: -Invaders start each successive wave a little lower (until a limit is reached) -Invaders move left and right faster, and move down faster -your laser moves faster Zero free bytes. RAMvaders.zip Edited May 7, 2009 by vdub_bobby Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted May 7, 2009 Share Posted May 7, 2009 Oh well. Still impressive! Quote Link to comment Share on other sites More sharing options...
sandmountainslim Posted May 7, 2009 Share Posted May 7, 2009 Cool work but RAMvaders is too damned FAST! It gave me vertigo. Wp Quote Link to comment Share on other sites More sharing options...
Kojote Posted May 8, 2009 Share Posted May 8, 2009 this is actualy for a2600 or a 7800? still didn't get it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.