Jump to content

Recommended Posts

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.

 

post-6060-1241389646_thumb.png

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 by vdub_bobby

Share this post


Link to post
Share on other sites
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 by cd-w

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites
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 by Thomas Jentzsch

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!

post-6060-1241557611_thumb.png

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 by vdub_bobby

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

:thumbsup:

Thanks.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

A lot of changes:

-changed invader and ship and laser graphics, mostly to save space but also to make the invaders more interesting:

post-6060-1241668556_thumb.png

-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

Share this post


Link to post
Share on other sites
-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 by SpiceWare

Share this post


Link to post
Share on other sites
-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...

Share this post


Link to post
Share on other sites

The invaders should come down much faster. Currently its way too easy.

Share this post


Link to post
Share on other sites

Edit: I was looking at an old version of your source, I did not realize you already removed EnemyDirection in the latest version, sorry :dunce:

Edited by Wickeycolumbus

Share this post


Link to post
Share on other sites
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 by vdub_bobby

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...