Jump to content

Photo

Homebrew INV, new version


32 replies to this topic

#1 ErikM OFFLINE  

ErikM

    Space Invader

  • 27 posts
  • Location:New York

Posted Thu Apr 8, 2004 3:32 PM

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

Attached Files



#2 SS OFFLINE  

SS

    Quadrunner

  • 5,849 posts
  • Location:Lehigh Valley, Pennsylvania

Posted Thu Apr 8, 2004 6:12 PM

Nice! I knew that there was a good reason for me holding back on buying this on cart yet! :wink:

#3 StanJr OFFLINE  

StanJr

    Web-slinger

  • 15,232 posts
  • fun or bust
  • Location:Louisville KY

Posted Thu Apr 8, 2004 7:31 PM

wow, that is a lot of changes! Can't wait to play the update! :) :) :)

#4 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Fri Apr 23, 2004 11:56 AM

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! :)

#5 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Tue Apr 27, 2004 2:36 PM

I'm about ready to go into final release with this, so if anyone wants to test it for bugs, now's your last chance... :)

#6 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Thu Apr 29, 2004 10:16 PM

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

#7 SS OFFLINE  

SS

    Quadrunner

  • 5,849 posts
  • Location:Lehigh Valley, Pennsylvania

Posted Thu Apr 29, 2004 10:22 PM

I've updated the original post with a new attachment


Never mind. :wink:

#8 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Thu Apr 29, 2004 10:25 PM

The forum kept choking when I tried to edit the attachments. Seems to be there now, as Release Candidate 5.

#9 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,720 posts
  • Location:The land of Gorch

Posted Thu Apr 29, 2004 11:55 PM

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

#10 Albert OFFLINE  

Albert

    Quadrunner

  • 34,362 posts

Posted Fri Apr 30, 2004 1:07 AM

The forum kept choking when I tried to edit the attachments.  Seems to be there now, as Release Candidate 5.


Yes, editing posts (especially longer ones) is fairly slow, this is a known problem. As soon as IPB 2.0 is done we will be leaping hastily to it. :)

..Al

#11 Cybergoth OFFLINE  

Cybergoth

    Quadrunner

  • 8,844 posts
  • This is Sparta!
  • Location:Bavaria

Posted Fri Apr 30, 2004 1:12 AM

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.

Greetings,
Manuel

#12 DEBRO OFFLINE  

DEBRO

    Stargunner

  • 1,937 posts
  • Location:Atlanta, GA

Posted Fri Apr 30, 2004 5:12 AM

Put a fork in it...I think it's done.

Nice job Erik :thumbsup:

We might want to run this by our resident Space Invader expert though. NE146 and opcode where are you?

#13 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Fri Apr 30, 2004 11:59 AM

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

#14 NE146 ONLINE  

NE146

    Dumbass Atari Fan

  • 15,235 posts
  • Location:Seattle, WA

Posted Fri Apr 30, 2004 12:56 PM

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?

#15 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Fri Apr 30, 2004 1:26 PM

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

#16 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,720 posts
  • Location:The land of Gorch

Posted Fri Apr 30, 2004 2:19 PM

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

#17 Albert OFFLINE  

Albert

    Quadrunner

  • 34,362 posts

Posted Fri Apr 30, 2004 4:49 PM

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

#18 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Wed May 5, 2004 2:08 PM

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.

#19 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,720 posts
  • Location:The land of Gorch

Posted Wed May 5, 2004 3:32 PM

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

#20 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Thu Jun 10, 2004 11:13 PM

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.

Attached Files



#21 Albert OFFLINE  

Albert

    Quadrunner

  • 34,362 posts

Posted Thu Jun 10, 2004 11:23 PM

[quote name='ErikM]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

#22 NE146 ONLINE  

NE146

    Dumbass Atari Fan

  • 15,235 posts
  • Location:Seattle, WA

Posted Fri Jun 11, 2004 1:45 PM

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

#23 bjk7382 OFFLINE  

bjk7382

    River Patroller

  • 4,579 posts
  • Location:Michigan

Posted Fri Jun 11, 2004 2:28 PM

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.

#24 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 23,084 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Fri Jun 11, 2004 3:18 PM

Sounds like debouncing is done based on the framecounter. Using a RAM bit instead should improve button response.

#25 ErikM OFFLINE  

ErikM

    Space Invader

  • Topic Starter
  • 27 posts
  • Location:New York

Posted Fri Jun 11, 2004 4:10 PM

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




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users