Jump to content
IGNORED

Homebrew INV, new version


ErikM

Recommended Posts

Some AtariAgers might be familiar with the INV game in the homebrews section. It's yet another implementation of Space Invaders. I actually wrote that a long time ago, back in 1997, when the Stella mailing list was first getting started. I lost interest and it was never really finished, but first Hozer Games and then Atari Age had a few people looking to buy cartridges anyway, so it was put up for sale.

 

A couple weeks ago, I decided to revisit the game and finish it for real. Attached is the binary of Release Candidate 3, zipped. Here's a list of changes from the old version:

 

Changelog 3/30/04:

 

- Invaders now score properly. 10 points for the first two rows, 20 points for next two, 30 for top row.

 

- Saucer also scores properly. 300 points if you shoot it with your 23rd shot on a board or every 15th shot thereafter, otherwise 50, 100, or 150.

 

- Scores are displayed in each player's color, and player 2's score is black if it's a one-player game.

 

- Correct saucer timing.

 

- The starting position of the invader formation on each board properly matches the arcade.

 

- Invader bombs damage shields properly.

 

- Added extra life at 1000 points.

 

Changelog 3/31/04:

 

- Reworked the player death sequence. No background flickering, 3 second delay with a sound effect, and the player's position is reset to the edge of the screen.

 

- Added a 3-second pause between waves too.

 

- Added a 1-second pause at game start.

 

- To match the arcade, at game start the player positions are set to the edges of the screen.

 

- Fixed the bug where the saucer noise continues if the saucer leaves the screen while game is not in progress.

 

- Fixed the bug where the shields can reappear after the invaders reach them.

 

Changelog 04/01/04:

 

- Added PAL support. Flip the switch to B/W and back to Color to cycle to the next video mode. It supports NTSC 60Hz, PAL 50Hz, and PAL 60Hz.

 

- While I was at it, brightened up several of the colors a little.

 

- Fixed a bug where hitting Reset while the saucer was on the screen caused its sound effect to get stuck.

 

- Fixed a bug where the player's missile hitting an invader's bomb could make the game think the saucer had just been hit.

 

- Added animation to the player death sequence.

 

- When the saucer is shot, the saucer graphic turns into its point value for a few seconds to inform the player of the points earned, like the arcade does.

 

Changelog 04/07/04:

 

- Fire button starts a new game if one isn't in progress.

 

- Implemented invisible invaders. Hit Game Select twice to cycle into inviso mode. Same rules as the Atari SI - the invaders appear briefly when you hit one or get hit.

 

- The invaders' bombs are now always displayed in gray; this is a side-effect of the above.

 

- Added an easter-egg to display my initials. I want to see if anyone ever finds it. :)

 

Changelog 04/08/04:

 

- Fixed the bug where one missile could hit two fast-moving invaders.

 

- Fixed problem of invisible bombs when the invaders are invisible (as much as possible.)

 

- Found and fixed a timing bug involving invaders very close to Earth.

 

- Added a pause if the game ends due to the invaders reaching Earth.

 

- Fixed bug where sound effects got stuck when pressing Reset

 

I'm not looking for new features at this point. There's no available RAM or ROM left, so adding new features can't be done now without a lot of optimization. Any comments are welcome, though. :)

inv40804.zip

inv42904.zip

Link to comment
Share on other sites

  • 2 weeks later...

Thanks to Albert for testing this and catching some problems. :)

 

Changelog 04/19/04:

 

- REALLY fixed the bug where one missile could hit two fast-moving invaders. (The code to check it was there, but in the wrong place.)

 

- REALLY fixed the bug where sound effects could get stuck.

 

- Tweaked the saucer noise; it now sounds less piercing and a bit more like the arcade (in MAME at least)

 

- Saucer doesn't make noise if it appears while the game isn't in progress

 

- Increased the delay between player shots slightly. This makes it closer to the arcade gameplay, and makes it a bit harder to accidentally repeatedly damage a shield (which is also a factor when you're counting shots for the saucer score.)

 

The new version is attached to the first post, as inv41904.zip. I'm just about ready to release this, unless someone finds a bug that really needs fixing... have at it! :)

Link to comment
Share on other sites

Changelog 4/29/04:

 

- Fixed a bug: in a two-player game, if player 0 got game over, his sprite continued to be drawn in black which would obscure player 1 if P1 moved to the spot where P0 died.

 

- REALLY added a pause if the game ends due to invaders reaching Earth. (The fire button now won't start a new game until after a 4-second pause.)

 

I've tested it extensively on real hardware, and I think it's ready for release now. If no one posts back with any bug reports in the next couple days, I think INV+ is finally ready for final release and I can move on to a new project. :)

 

I've updated the original post with a new attachment; it's zipped and includes the source as well. It's not the most logically organized piece of code ever, and most of it is far from optimized, but it is extensively commented so maybe somebody can learn from it. :)

Link to comment
Share on other sites

Wow...I don't know how this post slipped by me!

BTW you can reclaim a good chunk of romspace by using a loop to initialize the ram in BoardInit. I didn't look at it too closely (because I'm in the middle of something), but you should be able to use 1 value in the accumulator and just ROL it around ;) AFAIK, there's no penalty to storing a low nybble value into PF0...#$B0 will appear the same on the screen as #$BF. Also, you could grab SWCHA and LSR it for the controller routine (carry=skip to next LSR, no carry>change the player location).

Link to comment
Share on other sites

BTW you can reclaim a good chunk of romspace by using a loop to initialize the ram in BoardInit.  I didn't look at it too closely (because I'm in the middle of something), but you should be able to use 1 value in the accumulator and just ROL it around ;)  AFAIK, there's no penalty to storing a low nybble value into PF0

 

The hardware ignores the low nibble of PF0, yes, but my code doesn't. To move the invaders around the screen, those playfield bytes get shifted and rotated to heck and back. Look at the code at the labels MoveEachRow0 and MoveEachRow1.

 

I'm sure I could optimize BoardInit quite a bit by making it a loop, allowing junk to get stored into the low nibble of PF0, and masking out those bits in the rotation/movement code. But... 1) I wrote that code 7 years ago and don't even understand it now, and 2) why bother if I don't need to recover ROM space for anything now :)

Link to comment
Share on other sites

Hi there!

 

Wow...I don't know how this post slipped by me!

 

Ooops, I'm sorry. I should've given this a sticky tag from the beginning. Fixed.

 

Whoah I don't know how this post slipped by me either because this is the first I've seen it! Maybe it was the title of "INV" that didn't really register to me when scanning threads :P Thanks to DEBRO for pointing me here :D

 

I'll have to check this out tonight!!! Anyone try this on a cuttle cart yet?

Link to comment
Share on other sites

I haven't tried it on a Cuttle, but I have tested it extensively on 2600 hardware on a Supercharger. It should work fine on the Cuttle, too, but testing is always appreciated :)

 

Let me know if anyone finds the easter-egg to display my initials (it's obfuscated in the source, although extensive digging might find it.)

 

Hey cool, this post bumped my title up to "Space Invader", how appropriate :D

Link to comment
Share on other sites

I'm sure I could optimize BoardInit quite a bit by making it a loop, allowing junk to get stored into the low nibble of PF0, and masking out those bits in the rotation/movement code.  But... 1) I wrote that code 7 years ago and don't even understand it now, and 2) why bother if I don't need to recover ROM space for anything now :)

Extra space can always find a use. Like adding additional game variations (as in Atari's 112 variations)...or routines to make it even more like the arcade version (like more authentic sound fx, color-shifting or splitting aliens, rainbow bonuses, etc).

Link to comment
Share on other sites

I haven't tried it on a Cuttle, but I have tested it extensively on 2600 hardware on a Supercharger.  It should work fine on the Cuttle, too, but testing is always appreciated :)

 

I have also done lots of testing on real hardware using the same boards the final game will be produced on. :)

 

..Al

Link to comment
Share on other sites

Nukey Shay: I'm not planning to add more features now. Nobody ever plays 100 of the 112 Space Invaders games anyway. I've got two-player mode and invisible invaders mode, which is a fair bit of variety, enough for the sort of time that anyone would actually spend playing this. :) The fancy stuff you mention all came in later versions of Space Invaders, not the original. With the exception of the Rainbow effect, but that's really cosmetic, nobody really tries for it in gameplay. It might be a nice addition but I don't really think is worth the amount of optimization I'd have to do to get ROM space for it.

 

If nobody else reports back with any bugs in a day or two, I think this is ready for final release.

Link to comment
Share on other sites

Nono...the rainbow bonus can be added in by using only a few bytes (you just check to see if a low alien was hit last...like during the scoring routine like I did for Deluxe Invaders). Adding in additional on-screen fanfare is secondary...but should be possible in yours even easier, since the P/M's aren't being used to display the invaders (if it happens, fill up the alien ram with strings of $AA or such). That would also only require a few bytes of code.

Shifting colors can be added by using a color table, and then using the # of lines skipped value as an offset when the invaders are being drawn. That one would probably require the most (the color table itself+the routine to do the division on the skip value).

And splitting aliens would be the most difficult to pull off. That would require additional checks of the invader ram to see if that column contains a 2-pixel invader or 1...and then flipping the adjacent bit (like using an EOR value). Any value used to hold the count of aliens on the screen would also need to be increased.

But you are correct that none of the changes really apply to the original Space Invaders arcade game. Just icing :)

Link to comment
Share on other sites

  • 1 month later...

It's been a while, but here's another version that I'm ready to release. I re-did the invader marching sound effect to sound like space invaders instead of squeaky alien toys. :) I also lowered the pitch of a couple other sound effects, and I'm pretty happy with the way it sounds now. Comments are welcome, of course.

inv60904.zip

Link to comment
Share on other sites

It's been a while' date=' but here's another version that I'm ready to release. I re-did the invader marching sound effect to sound like space invaders instead of squeaky alien toys. :) I also lowered the pitch of a couple other sound effects, and I'm pretty happy with the way it sounds now. Comments are welcome, of course.[/quote']

 

Excellent, I need to try this out and compare the new audio to the previous version of the game. :)

 

..Al

Link to comment
Share on other sites

Ooh I haven't tried out the new version yet. But I forgot to mention that I did play the previous one on the Cuttle Cart and it rocks! :) I did see that the shots however occasionally lagged in that you occasionally need 2 or 3 button presses to get a shot out even after your previous shot had dissapeared... probably just a timing issue. But otherwise everything about it is awesome and sprites aside, I really couldn't believe that it was on the VCS :D

Link to comment
Share on other sites

I did see that the shots however occasionally lagged in that you occasionally need 2 or 3 button presses to get a shot out even after your previous shot had dissapeared...

 

I noticed this also, but try putting your difficulty switch on easy and all you have to do is hold the button down and it will keep firing.

 

But even with it on easy, I did notice that the shots seem to dissapear off the screen for a second before it shoots again.

Link to comment
Share on other sites

The shot timing is intentional. If you load up the arcade Space Invaders in MAME, you'll see that it behaves that way too.

 

Overall, I'm quite satisfied with the playability of this game. IMO, it compares quite favorably to both the arcade SI and the 2600 Space Instigators. :)

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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