Jump to content
IGNORED

Ants for 2600


atari2600land

Recommended Posts

This is a new game I'm working on for the Atari 2600. Some of you may have seen this game in the Atari 2600 Basic forums, but I'm putting it on this forum because I think it'll get a lot more exposure, that and the title of the topic didn't have the name of the game in it. Since it's a .bin file, you don't need a copy of Atari 2600 Basic, just a 2600 emulator. You press the reset switch to start and you touch the ants to make them go away, then more ants pop up. At the 'game over' screen, press fire to go back to the title screen and you can play again by pressing the reset switch. What do you guys think?

---

edit: updated version.

ants2kversion6.bin

ants2kversion7.bin

Edited by atari2600land
Link to comment
Share on other sites

Just wanted to give you some encouragement. A very simple game but still it has some fundamental appeal. I think this has been suggested before, but a large collection of games like this in the spirit of Wario Ware would be very appealing on the 2600 (to me at least).

Link to comment
Share on other sites

This is a nice little game, and quite addictive for such a simple concept. I think the only downside is that there isn't much variety, or any real difficulty curve. My suggestion would be to add some obstacles which get in the way, and possibly some powerups that do various things (e.g. increase movement speed, reverse controls, double points, moving ants, shrink player, teleport, etc).

 

Chris

Link to comment
Share on other sites

Thanks for the compliments and suggestions, but I just want to point out a couple things. First, this is like the first 2600 game I've ever worked on that's any good, and second, I'd like this version to stay 2K. If I ever get around to making a more than 2K version, I'll definitely add some power-ups like cd-w mentioned. An increase movement speed, and a reverse controls powerup I probably could figure out how to do. In fact, if I can't think up of any new game idea, I'll probably work on a 4K version of Ants after the 2006 Minigame Compo is over (around September or so, so I'll probably either revive this topic or make a new one.) Keep the power-ups/power-downs, other suggestions coming. I'm liking 'em.

Link to comment
Share on other sites

Why the 2K limit - it seems like a 4K version would be perfect for the minigame competition?

Other suggestions:

  1. Give the player a ball that they can throw at the ant.
  2. Let the player lay ant traps periodically (requires moving ants).
  3. Have a bonus stage where a huge mother ant chases you around the screen for a certain time.
  4. Have multiple ants on-screen (use flicker).
  5. Animate the ants, and have different kinds of ants (with different time values).
  6. Have fiery ants that blow flames at you.
  7. Have different "missions" aimed at destroying an ant hill.

Chris

Link to comment
Share on other sites

In order to put any sort of animation (or just about anything else, for that matter), I'd have to learn some more programming skills which I don't have at the time. And to implement all the wonderful ideas sent in by cd-w, I'd probably need about 8kb, which Atari 2600 Basic doesn't support. Maybe somewhere down the line once I become a master of programming, I can come back and work some wonders with this game. On a side note - I'll bet anything Rainbow Invaders will win the 2006 Minigame Compo 4K division, but I'll still submit an improved 2K Ants version just for the heck of it.

Edited by atari2600land
Link to comment
Share on other sites

What version # is that?

 

I'm using bleeding edge build 99b. You can get it in batari's blog (and probably somewhere on the bB board).

 

There is obviously a newer one, but AFAIK it hasn't been publicly released yet.

 

BTW - I think you could probably do most if not all of cd-w's suggestions in 4k.

Edited by s0c7
Link to comment
Share on other sites

  • 4 weeks later...

Hi there,

 

Excuse the late reply. After playing Ants on hardware, I saw that the screen skips every time you contact an ant. Using z26 with the -n setting shows that the picture is 260 lines tall most of the time, and it jumps to 284 at a player-to-ant collision. Sorry, I haven't looked into bBasic much, but if no one else offers a solution, I can take a look and see if I can help.

Link to comment
Share on other sites

Hi there,

 

Excuse the late reply. After playing Ants on hardware, I saw that the screen skips every time you contact an ant. Using z26 with the -n setting shows that the picture is 260 lines tall most of the time, and it jumps to 284 at a player-to-ant collision. Sorry, I haven't looked into bBasic much, but if no one else offers a solution, I can take a look and see if I can help.

Well, that's weird. Why would the number of lines get bigger when a player contacts an ant?

Link to comment
Share on other sites

Well, that's weird. Why would the number of lines get bigger when a player contacts an ant?

Well, to put it in simple terms, the Atari is taking more time to run instructions before starting a new frame. It's hard to be more specific without looking at the code. BTW the standard number of lines for an NTSC television is 262.

 

EDIT: Here is a thread that briefly addresses timing in bBasic.

http://www.atariage.com/forums/index.php?showtopic=90566

Edited by Zach
Link to comment
Share on other sites

Zach - Do you have a version of Batari Basic? Cuz I could post the code file here or PM you with it.

If you want to PM the code or post it here, I can look at it for you. It might take me a few days to get to it, as I am busy finishing up my homebrew in time for the Oklahoma Video Game Exhibition.

Link to comment
Share on other sites

After a quick look, I see some problem code:

 

222 a = rand : t=0 : g=0
223 if a>150 || a<20 then goto 222 
224 b = rand
225 if b>80 || b<10 then goto 223

Here you repeat a loop until you get a random number within the range you want. The time to run the loop is unpredictable, and could very well be the reason drawscreen happens too late.

 

Here is some code that will give you the number range you want for a without a loop. I'll let you figure out how to do the same for b. (hint: b = b/2 gives you a random number from 0 to 127.)

 

a = rand						   : rem 0 <= a <= 255
if a>130 then a = a - 130		  : rem 0 <= a <= 130
a = a+20						   : rem 20 <=a <= 150

 

I hope that does the trick. One thing you learn after programming for a while is that just because you fix something, it doesn't mean you've fixed everything.

Edited by Zach
Link to comment
Share on other sites

The range of rand is 1-255. 0 should never be returned by rand unless you accidently changed rand to 0. If you did then rand will return 0, and only 0, from then on.

 

For my nephew's game, Death Star Break In we did things like the following to return a limited range.

 rebelx = rand: rem random x position 1-255
rebelx = rebelx & %01111111: rem make rebelx from 0-127
rebelx = rebelx + 30 : rem make rebel x from 30 - 157

You could change the last to +20 and get a range of 20-147, or maybe +21 for 21-148 or +22 for 22-149. They're not exactly the same range, but it's probably close enough and tradeoffs are often the name of the game when programming the Atari 2600.

 

You might be able to combine them into 1 line in newer batari BASIC builds

 rebelx = rand & %01111111 + 30

but I wanted to document each step so my nephew would understand what the program was doing.

Edited by SpiceWare
Link to comment
Share on other sites

The range of rand is 1-255. 0 should never be returned by rand unless you accidently changed rand to 0. If you did then rand will return 0, and only 0, from then on.

OK. According to my bBasic document, rand returns a number from 0-255, but I suppose my copy is outdated. It won't be hard to adjust the numbers and still get a 20-150 range.
Link to comment
Share on other sites

I left out the tradeoff of using the -130 +20 method is that some values would occur more frequently than others. Specifically the values between 21-145. Not that much of a tradeoff though.

That's true. With true randomness, the probability of most numbers appearing would be 2/255, and for a few it would be 1/255. Another way to get random numbers within the desired range would be to generate random numbers outside of the VCS and store them as data. I'm not sure if bBasic supports arrays or anything like that, but there is always inline assembly.

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