Jump to content
IGNORED

How is Auto-Play done?


Random Terrain

Recommended Posts

The Game Standards and Procedures page says:

 

http://www.randomterrain.com/atari-2600-memories-standards-and-procedures.html#autoplay

AUTO-PLAY should display typical gameplay. Try to show as many different features of the game as possible. If the game has multiple screens, try to show all or many of them. At power-up, scores should be set to zero, otherwise the most recent scores should be displayed. AUTO-PLAY should incorporate all game sounds.

 

What is the best way to do that? When I look at some professional games, it looks like someone played the game and their moves were recorded. How in the heck would we do that? Wouldn't really help if things in the game happen randomly. There would have to be some kind of ROM-eating AI just for Auto-Play.

Link to comment
Share on other sites

What is the best way to do that? When I look at some professional games, it looks like someone played the game and their moves were recorded. How in the heck would we do that? Wouldn't really help if things in the game happen randomly. There would have to be some kind of ROM-eating AI just for Auto-Play.

 

You can either record yourself playing or work it out manually and store the results in a table. For example you could say move joystick left for the next 5 frames, up for 8 frames after that and so on. To ensure that your enemies always behave the same you'd save the current seed for the random number generator and their X, Y coordinates and state machine information. That way they'll always react in the same manner.

Link to comment
Share on other sites

Depends on the game, really. A simple vertical shooter game like Space Invaders or Galaxian only requires 1 bit. If set, certian routines are skipped (such as gathering data from the port), and a "random" value is used in their place. This random value chosen can be a combination of variables, or just reading straight from the program code (Galaxian does this). Skipping back into the input routine just past where the port data is normally gathered, the random value is used to move the player's sprite, etc.

Alternately, if the "demo mode" bit is on, a routine for things like audio can just be skipped entirely.

 

When a game is begun, toggle the bit off...and keep it off until the game is over.

Link to comment
Share on other sites

You can either record yourself playing or work it out manually and store the results in a table. For example you could say move joystick left for the next 5 frames, up for 8 frames after that and so on. To ensure that your enemies always behave the same you'd save the current seed for the random number generator and their X, Y coordinates and state machine information. That way they'll always react in the same manner.

Thanks. I need to create a thread about the 16-bit random number generator (dim rand16 = <var>). I'm not sure how it works with a seed (how big of a number can I use) and I don't know how to make it go back to normal after a seed is used.

 

 

 

 

Depends on the game, really. A simple vertical shooter game like Space Invaders or Galaxian only requires 1 bit. If set, certian routines are skipped (such as gathering data from the port), and a "random" value is used in their place. This random value chosen can be a combination of variables, or just reading straight from the program code (Galaxian does this). Skipping back into the input routine just past where the port data is normally gathered, the random value is used to move the player's sprite, etc.

Alternately, if the "demo mode" bit is on, a routine for things like audio can just be skipped entirely.

 

When a game is begun, toggle the bit off...and keep it off until the game is over.

Thanks. If I try to follow the Game Standards and Procedures page, I guess I can leave the sound on, but most games I remember had silent auto-play.

Link to comment
Share on other sites

I read that on your page a while back and I thought the same thing. For 2600, that would take up an amount, even small, of space that can't be used for the game. It doesn't even add much to the game. I have to wonder why Atari said that.

 

I think that standard was published at a time when a lot of games were 16K, and code space wasn't seen as a severe constraint. Adding an attract mode does make a game look more professional.

Link to comment
Share on other sites

I think that standard was published at a time when a lot of games were 16K, and code space wasn't seen as a severe constraint. Adding an attract mode does make a game look more professional.

Do you think sounds should be included like the page says? Seems like it would get irritating.

Link to comment
Share on other sites

Do you think sounds should be included like the page says? Seems like it would get irritating.

 

Tough call. There's something cool about having a cart power on with some music (as E.T. did, or Toyshop Trouble, or Stella's Stocking) but at times it may get annoying. Probably if music is included, the best thing to do would be to have the music and screen both time out after a few minutes until a controller is bumped. I'd generally be disinclined to include game sound effects, though.

Link to comment
Share on other sites

Tough call. There's something cool about having a cart power on with some music (as E.T. did, or Toyshop Trouble, or Stella's Stocking) but at times it may get annoying. Probably if music is included, the best thing to do would be to have the music and screen both time out after a few minutes until a controller is bumped. I'd generally be disinclined to include game sound effects, though.

Thanks. I think I'll go with no sounds.

Link to comment
Share on other sites

Thanks. I think I'll go with no sounds.

I think you should go with voice-over narration:

 

"Use your joystick in the left controller port to move your ship around." (ship moves around randomly)

 

"Press the red fire button to shoot at the enemies." (ship fires a few times)

 

"Destroying a red ship earns you 10 points." (red enemy ship gets zapped, score goes up 10 points)

 

"Destroying a purple ship earns you 25 points." (purple enemy ship gets zapped, score goes up 25 points)

 

"Destroying the blue mother ship earns you 100 points!" (blue mother ship gets zapped, score goes up 100 points)

 

"To trigger the hidden easter egg, ..." (screen suddenly fills with static and goes back to the title screen)

 

Michael :D

Link to comment
Share on other sites

I think you should go with voice-over narration:

 

"Use your joystick in the left controller port to move your ship around." (ship moves around randomly)

 

"Press the red fire button to shoot at the enemies." (ship fires a few times)

...

:)

 

Not as cool as a voice-over, but you could use the bitmap minikernel to display a changing line or two of text to display that info, just like the attract mode on many arcade games.

Link to comment
Share on other sites

  • 2 months later...

Depends on the game, really. A simple vertical shooter game like Space Invaders or Galaxian only requires 1 bit. If set, certian routines are skipped (such as gathering data from the port), and a "random" value is used in their place. This random value chosen can be a combination of variables, or just reading straight from the program code (Galaxian does this). Skipping back into the input routine just past where the port data is normally gathered, the random value is used to move the player's sprite, etc.

Alternately, if the "demo mode" bit is on, a routine for things like audio can just be skipped entirely.

 

When a game is begun, toggle the bit off...and keep it off until the game is over.

OK, I'm getting ready to do this and there are still a few things that are fuzzy. The semi-easy part is using a bit to tell the program that auto-play mode is on, but won't I need a full variable to use as a timer, so the program will keep flipping between the title screen and auto-play every 20 seconds?

Link to comment
Share on other sites

OK, I'm getting ready to do this and there are still a few things that are fuzzy. The semi-easy part is using a bit to tell the program that auto-play mode is on, but won't I need a full variable to use as a timer, so the program will keep flipping between the title screen and auto-play every 20 seconds?

Instead of a timer, you could check that auto-play bit during some event that won't happen for a while - like the auto-player dying - and jump to the title screen when it happens.

 

The title screen would need a timer, but you don't need all the variables during the title screen.

Edited by RevEng
Link to comment
Share on other sites

I guess it depends on the kind of game. The important thing to remember is that you are just running the game as usual, except that five inputs will be automated: the cardinal directions of the joystick and the read-state of the fire button. Everything else is the same. When you think of it that way, it becomes more simple :)

 

How you implement it could be really simple or really advanced. For instance, if you already have an AI opponent coded for a fighting game, you could re-purpose that enemy's code for an Autoplay "Player One". If most of your AI is coded in functions, then you could pass variables to those same functions to move the player's sprite without using up a lot of additional ROM space.

 

Another way to autoplay would be to encode joystick "dance steps" in data tables, similar to the way one might encode music by moving an array pointer through it. The idea I think would be to again re-purpose as much existing code as possible, setting up constants that when the array pointer reaches them will execute various in-game subroutines linked to player inputs ("FireMissile", "Jump", "RunLeft" etc).

 

I think the important thing is to code the gameplay first, and a simple solution for autoplay will probably present itself afterwards. The inputs for the joystick and fire button can even be mostly random, and still seem visually interesting. I guess the one good thing about autoplays is that the "auto-player" can genuinely stink at the game and the demo can still be effective... and even funny as you watch the Ghost Player One haplessly drive into pits or run headfirst into laserfire over and over. We've all seen these types of demos and attract-modes before.

Edited by jrok
Link to comment
Share on other sites

Instead of a timer, you could check that auto-play bit during some event that won't happen for a while - like the auto-player dying - and jump to the title screen when it happens.

 

The title screen would need a timer, but you don't need all the variables during the title screen.

That sounds easier. Let death end auto-play and I can use pretty much any variable for the title screen like I do for the game over section.

 

Thanks.

 

 

 

I think the important thing is to code the gameplay first, and a simple solution for autoplay will probably present itself afterwards. The inputs for the joystick and fire button can even be mostly random, and still seem visually interesting. I guess the one good thing about autoplays is that the "auto-player" can genuinely stink at the game and the demo can still be effective... and even funny as you watch the Ghost Player One haplessly drive into pits or run headfirst into laserfire over and over. We've all seen these types of demos and attract-modes before.

Unless people want me to change it, the game is pretty much finished (although I'm not completely happy with it). I'll add random input and see what happens.

 

 

Thanks.

Link to comment
Share on other sites

This is more for my future reference than for anyone else. I added auto-play to my game yesterday and it was easier than I thought. It worked on the first try. And it also worked like a playtester. By watching it play by itself, I saw two problems I need to fix that I wouldn't have found by playing it myself.

Link to comment
Share on other sites

  • 2 weeks later...

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