Jump to content
IGNORED

My first 2600 game


batari

Recommended Posts

I decided to try to make a 2600 game. It's a really simple game. I'm doing this more to learn how to program the 2600. I designed the kernel essentially from scratch except the 6 digit score part. It's probably a half-assed kernel, but it seems to work.

 

This game is based on an old Vic-20 game that I think was a type-in from a book or something. I don't remember the details, it's been over 20 years. Maybe someone knows for sure?

 

The game lacks sound and has no explosion GFX when you hit the target, but so far the code+GFX is only around 800 bytes, so after I add sound, explosion GFX and a couple of minor improvements I think I might be able to squeeze it all into 1k (think minigame.)

 

Since I don't have any easy way of testing on a console, I'd appreciate it if someone would try it out. Also, since I'm a Mac user, I wonder if someone would run it through Z26 and see if the scanline count is correct. Or if you see any bugs or have any suggestions that a relative newbie like me can figure out, that would be great. A zipped bin is attached.

 

To play, just hit the fire button to launch the rockets, and try to hit the target flying by. You score 100-700 points based on how far away the target is. The target only moves from bottom to top so the game gets harder as you run out of rockets. So far I haven't been able to break 10,000 so I can test to see if the score display works properly. If anyone actually manages to score this high, let me know if it works.

 

Oh, one last question. The score doesn't quite line up right because (I think) the STA RESPx method isn't too accurate. I tried playing around with HSPx and HMOVE but I can't get it right. I wonder if someone can explain quickly to me how to get the digits to line up right?

 

EDIT: Latest binary posted here, called rocket_command.zip, though you can still download the original WIP version, rc.zip.

rc.zip

rocket_command.zip

Edited by batari
Link to comment
Share on other sites

For now, they just run out and the game's over. But I'm planning on changing that to where you'll get additional sets of rockets if you score enough points, and increase the number of points required each round, then eventually increase the speed of everything too. This should all be possible to implement while keeping below 1k. Hopefully.

Link to comment
Share on other sites

Since I don't have any easy way of testing on a console, I'd appreciate it if someone would try it out.  Also, since I'm a Mac user, I wonder if someone would run it through Z26 and see if the scanline count is correct.

Z26 says you're producing 266 scan lines.

 

Oh, one last question.  The score doesn't quite line up right because (I think) the STA RESPx method isn't too accurate.  I tried playing around with HSPx and HMOVE but I can't get it right.  I wonder if someone can explain quickly to me how to get the digits to line up right?

Quickly is relative without source code. A quick hack and adding the following will work. This is around the area of LF183 where you are about to start the score kernel and after you VDEL player 1. You just need to shift player 0 right one pixel. I hope this helps.


  lda #$F0; 2

  sta HMP0; 3

  nop           ;2

  nop           ;2

  sta.w RESP0     ; 4

  sta RESP1     ;3



  sta WSYNC     ;3

  sta HMOVE

Link to comment
Share on other sites

Based on other posts, it appears that 262 scanlines is "correct" for NTSC, right? What are the ramifications of being a few scanlines off, like will it not sync on some TV's?

 

That hack worked great by the way. yeah, I should have posted source. I thought that there was a stock answer to the problem, but I guess there's not always a stock answer when you need to design a kernel for each game.

Link to comment
Share on other sites

The problem is that NTSC uses a faster refresh rate than PAL...so a scanline count >262 may have a tendancy to roll the picture on some televisions. Tho then again, a number of old games used higher numbers (even Combat is @ 263!). I imagine that this is possible if the game is not stretching the limits before the next frame needs to begin.

Guys?

Link to comment
Share on other sites

Finally...(OK, so it's just been a week) I've got my minigame nearly complete. This is the official beta version. It's currently 20 bytes over the 1K limit, so there's no room for improvements, but hopefully there's room to recover those 20 bytes and to fix any bugs.

 

If anyone wants to play it, and if they notice bugs, I'd appreciate it.

 

To play, just press the fire button to launch the rockets. The "target" is worth 100-800 points depending on how far away it is. To get a new set of rockets, you need to score a certain number of points, and this is supposed to go as follows:

 

level 1: 3000

level 2: 5000

level 3: 3000

level 4: 5000

level 5: 3000

level 6: 5000

level 7: 6600

additional levels: +1600 per level

 

Thing is, I've never got past level 5...

 

Also, things speed up at level 3, and again at level 5.

 

If you find any bugs, let me know and I'll fix them in the final version, whenever I get around to this and finding 20 bytes to spare. Here's the bin:

[/code][/u]

rc.zip

Link to comment
Share on other sites

Finally...(OK, so it's just  been a week) I've got my minigame nearly complete.  This is the official beta version.  It's currently 20 bytes over the 1K limit, so there's no room for improvements, but hopefully there's room to recover those 20 bytes and to fix any bugs.

You would be surprised how many bytes you can optimize if you really try. :)

Link to comment
Share on other sites

Cool game! Nice visuals and sound effects, great use of color, and I don't recall any game quite like it.

 

One thing I especially like (intentional or not) is that sometimes you can take out two targets with one shot. Near the bottom of the screen, sometimes the first explosion lasts long enough to take out a second target. That's nice when you're trying to gain those last few points you need to move on.

 

I like Thomas' suggestion of lower hits being worth more points. Good idea there.

 

Also, some sort of periodic "bonus" target would be nice, if it can be squeezed in. Just for variety. :)

 

Very nicely done, especially for a first-ever 2600 game!

Link to comment
Share on other sites

One thing I especially like (intentional or not) is that sometimes you can take out two targets with one shot. Near the bottom of the screen, sometimes the first explosion lasts long enough to take out a second target. That's nice when you're trying to gain those last few points you need to move on.

 

That was not intentional. During some testing it happened to me five times in a row, but I also kind of like it. Maybe a bug sometimes does become a feature, so perhaps I've been too hard on a certain big software company for doing the same...

 

Also, some sort of periodic "bonus" target would be nice, if it can be squeezed in. Just for variety.

 

I'll see what I can do. I need to free up some bytes for that, but I think it would add to the game.

 

Suggestion:

- more points for hits with lower missiles

 

done, but I didn't increase the points too much, because the "feature" above might give way too many points if hit multiple times.

 

Bug:

- the scanline count isn't constant

 

Thanks, as it's hard to tell with Stella. I wanted to see how bad it was, so today I decided to pick up a 2k EEPROM (electronically erasable type, since I don't have one of those ultraviolet EPROM erasers) and burn it and solder a socket + 7404 inverter chip onto an old combat board so I have a way to test on a real 2600. The screen indeed jitters noticably, but it didn't roll. Stella seems to smooth out most of the jitters, which is good for gameplay but isn't conducive to game development.

Link to comment
Share on other sites

I'll see what I can do.  I need to free up some bytes for that, but I think it would add to the game.

 

How about if the bonus target only showed up if you hit a certain number of targets in a row, without missing? (Maybe 10?) It would be a reward for accuracy, rather than something more random. SeaWolf II (arcade version) has something like that, where it awards bonus points if you hit four ships in a row without a miss. I always liked that feature.

Link to comment
Share on other sites

Stella seems to smooth out most of the jitters, which is good for gameplay but isn't conducive to game development.

:idea: Stella should have a parameter, which displays the number of scanlines on the screen. Else try z26 (use -n), it's still a bit more reliable for deleveopers anyway.

Link to comment
Share on other sites

I finally had a chance to try this, it's a fun game. It gets pretty hard to hit the target with the rockets at the bottom, so I think a hit should be worth more the lower you get. An interesting two player variation of this game would be to have a column of rockets on each side of the screen, with the left column controlled by player 1 and the right controlled by player 2. Then it would be a contest to see who could hit the targets first, and of course accuracy would be even more important since wasting your rockets would not net you any points. Not sure what would happen if you miss, since your rocket would make it all the way to the other side of the screen. :)

 

I think you're doing great for your first game--it's visually appealing, you're already making good use of sound, the game is easy to learn, keeps track of your score, and has that "I just want to play one more time to get a better score" quality. :) Look forward to watching this progress!

 

..Al

Link to comment
Share on other sites

I just encountered a bug where I shot a target at the bottom of the screen, and the target kept reappearing right under the explosion, which then caused it to explode (similar to what Nathan described above). Because the target kept appearing under the explosion, the game got stuck in an infinite loop. I let it run for a short bit until I had over 90,000 points. Attached is a screen capture.

 

..Al

rc.png

Link to comment
Share on other sites

This game was very hard to keep under 1k while still fixing bugs and adding features. I was 20 bytes over in the last revision, and I managed to recover probably 60 bytes by optimizing, but doing so seriously obfuscated my originally somewhat easy to follow code. I now have ONE byte free and I cannot find any more bytes to optimize.

 

I don't think I can add too many more features whilst keeping under 1k, but if there are any more bugs, I hope I can get them licked. Anyway, here's beta 2, which hopefully is bug free so I can submit it to the minigame contest whenever it opens. If anyone finds any bugs, please let me know.

 

Now that I have a better idea of how to code for a 2600, it's time to make a better game, with 4k in mind, maybe more. No promises, though.

 

Anyway...

 

I just encountered a bug where I shot a target at the bottom of the screen, and the target kept reappearing right under the explosion, which then caused it to explode (similar to what Nathan described above).  

 

Fixed by not restarting the explosion every time you hit a target. This keeps in the "feature" without the bug part of it.

 

One other thing--maybe you should lose points if you let a target get to the top of the screen? Might give you more incentive to try hitting it the first time it appears.

 

Done - you lose 100 points if you let one go by.

 

I think a hit should be worth more the lower you get. An interesting two player variation of this game would be to have a column of rockets on each side of the screen, with the left column controlled by player 1 and the right controlled by player 2. Then it would be a contest to see who could hit the targets first, and of course accuracy would be even more important since wasting your rockets would not net you any points.

 

hits lower are more likely to take out two or more targets, so I didn't change this. Also, I'm not talented enough to add a two player option while keeping things under 1k. Maybe it's an idea if I ever decide to significantly improve this.

 

How about if the bonus target only showed up if you hit a certain number of targets in a row, without missing? (Maybe 10?) It would be a reward for accuracy, rather than something more random. SeaWolf II (arcade version) has something like that, where it awards bonus points if you hit four ships in a row without a miss. I always liked that feature.

 

Done - 3 (sometimes 4) targets in a row willl give you a bonus, in which the target speeds up, changes color and is worth an extra 1000 points. Note that if you miss, you need to make up what you miss first before it starts counting the 3-4 (example: if you miss two in a row, then you need to hit 5 for a bonus.)

 

Also, I think I've fixed the scanline problem, but I haven't yet run Z26 to be sure if the number is correct and constant. Perhaps someone will run the bin and let me know...

 

[/code]

rc_beta2.zip

Link to comment
Share on other sites

Cool, man! Now do Killer Comet next!

 

(Killer Comet is a VIC-20 BASIC game similar to Space Invaders, but with one giant target that you take chunks out of as it flies by. The comet wraps around the screen, dropping one space down every time, and you take shots at it as it flies past. If you can destroy the comet completely before it hits Earth, you win!)

 

JR

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