Jump to content
  • entries
    8
  • comments
    0
  • views
    1,810

Seeding RAND; Capturing Video; Game Select; Game Variations


Living Room Arcade

234 views

My newest ideas about Night Driver Arcade.

 

Please comment respectfully.  This is not my job.  I don't get paid to do this.  Please do not ask me to write code.  If I find time to write code, I will do it.  And if I never find time, then I never will.  Please understand and be respectful when you comment.  Thank you.  

 

SEEDING RAND

Spoiler

Generally, every time you power on the Atari, the RAND function would start with the same seed, and the outputs would be the same.  Is that not true?  To avoide this situation, you would if you could seed RAND at a different value each time the Atari is powered on.  Yes?  I think I have a simple way to do that.  

  1. In memory, there is a byte set aside for the RAND seed.
  2. As soon as the Atari is powered on with Night Driver Arcade plugged in, the program immediately goes into Attract Mode.
  3. As soon as NDA goes into Attract Mode, it begins incrementing the RAND seed by one every frame.  Note that it will always start at 0, and when it gets to 255 it will then roll over back to 0 again.  Batari Basic runs at 60 fps, so this will happen every approximately 4.2 seconds.  
  4. When the player finds the desired game variation and presses Game Reset, then NDA will go into Game Mode.
  5. As soon as NDA goes into Game Mode, lock the seed value in.  That is your random seed value for the next game.

Why is it random?  The unpredictable quantity is time.  The amount of time that passed from when the Atari was first powered on until the human player pressed the Game Reset switch.  

 

Similarly, after a game has ended, when the program goes back into the Attract Mode, the program would again do this, so that the next time the Game Reset switch is pressed, there would be another unpredictable seed value waiting for use by RAND.  

 

CAPTURING VIDEO

Spoiler

I have never captured video before.  Here are my current thoughts as to how to do it for Night Driver Arcade.

  1. Play the arcade version of Night Driver in MAME emulation on my PC.    
  2. Choose the desired track: Novice, Pro or Expert.
  3. Keep the car in first gear.  Keep the accelerator pressed down.  The car's speed will max out at 35.  
  4. Record video of this gameplay.
  5. Find some software that that take a video and slice it up into a series of still screenshots.
  6. Convert the video into a folder full of screenshots.  Maybe 4 per second would suffice.  
  7. First, filtering out the unwanted screenshots.  We're only interested in the screenshots that show all of the moments when new pairs of white road markers (WRM's) were created on the horizon.  Screenshots capturing the moments in between those moments of WRM creation we do not need.  Now, this is a lot of work, but, first, we need to go through all of the screenshots and find all of the ones that we need to keep and delete all of the others.  To clarify, at the end we will be left with a folder on the computer containing exactly one screenshot for every new pair of WRM's that was created on the horizon during the recorded video of gameplay.  
  8. Next, we begin capturing the data.  Now, this is a lot of work, too.  For the remaining screenshots, we need to open each screenshot in a paint program, one by one, zoom in to the horizon and locate the top pair of white road markers (WRM's).  They would be very tiny.  
  9. Next, scroll down a bit and locate the next pair of WRM's.  They would be a little below the top pair and slightly larger.  
  10. Next, zoom in closely and count the number of pixels that the top pair is offset either to the left or right of the lower pair.  
  11. We will record our data in a spreadsheet.  Set up the spreadsheet so that each row contains data for one image.
  12. For each image, simply record one number.  The pixel offset of the top pair of WRM's to the lower pair.  + means it was to the right, - means it was to the left and 0 means it was exactly on top, no offset.  
  13. Record like this into the spreadsheet for every still image.  
  14. Every once in a while, stop and let the spreadsheet software make a simple graph of the data.  The graph will not look like the road.  It is just an indication of whether is is turning right or left.  
  15. To make a graph that looks like the road, let the spreadsheet calculate the cumulative sum of each cell.  That is, for each cell, add up the value of that cell plus all of the cells above it.  Then plot that series of numbers in a new graph.  That graph should look like the road.  
  16. Study the two graphs carefully.  Look for a repeating sequence within them.  I believe that there will be a repeating sequence.  If you can identify this repeating pattern, congratulations!  You have captured the road data for the Novice track.  Now repeat the above process for the other two tracks, Pro and Expert.  

@freshbrood Thank you for the example.  

 

GAME SELECT

Spoiler

I have a new idea about how Game Select might work.  It's simple.  Generally, when the player presses Game Select, my idea is simply that a few words would appear on the screen to clarify what that game variation is.  A few examples:

 

GAME VARIATION/SCREEN TEXT

1

ARCADE

NOVICE

STANDARD TRACK

 

2

ARCADE 

PRO

STANDARD TRACK

 

3

ARCADE

EXPERT

STANDARD TRACK

 

The words would appear one by one, not all at once, as explained here.  

 

To clarify my meaning, these words would appear, slowly, one by one on a black background and then vanish.  Then the Attract Mode graphics would take over.  If the player pressed Game Select again, then the variation number in the 6-digit display would increment and the helpful words would appear, slowly, one by one on a black background and then vanish, and then the Attract Mode graphics would take over.  Repeat until the player presses Game Reset and the game enters Game Mode, ready to play.  

 

This method of doing Game Select would be kind of a cross between the old style Game Select and using menus.  It might be 50% couch compliant.  The player might have to use game select and game reset on the console to set up the game, but once playing, I imagine that the player could stay on the couch and conveniently start another game of the same kind simply with a press of the paddle button.  I don't care how much ROM space the words require, I'll go up to a bigger ROM size if needed.  

 

GAME VARIATIONS

Spoiler

Speaking of game variations, how many do we plan for Night Driver Arcade so far?  Let's count them.

 

Night Driver Arcade

36 Game Variations

 

ARCADE 1-9

  • NOVICE 1, 4, 7
  • PRO 2, 5, 8
  • EXPERT 3, 6, 9
  • STANDARD TRACKS 1-3 <--- captured from video of the arcade game
  • MIRROR IMAGE TRACKS 4-6
  • RANDOMLY GENERATED TRACKS 7-9

1V1 SINGLE RACE 10-18

  • NOVICE 10, 13, 16
  • PRO 11, 14, 17
  • EXPERT 12, 15, 18
  • STANDARD TRACKS 10-12
  • MIRROR IMAGE TRACKS 13-15
  • RANDOMLY GENERATED TRACKS 16-18

1V1 SERIES (AKA 'CATCH THE PACE CAR') 19-21

  • NOVICE 19
  • PRO 20
  • EXPERT 21
  • RANDOMLY GENERATED TRACKS 19-21

RALLY SINGLE RACE 22-30

  • NOVICE 22, 25, 28
  • PRO 23, 26, 29
  • EXPERT 24, 27, 30
  • STANDARD TRACKS 22-24
  • MIRROR IMAGE TRACKS 25-27
  • RANDOMLY GENERATED TRACKS 28-30

RALLY SERIES 31-33

  • NOVICE 31
  • PRO 32
  • EXPERT 33
  • RANDOMLY GENERATED TRACKS 31-33

MINI GAME 34-36

  • NOVICE 34
  • PRO 35
  • EXPERT 36

Notes:

  1. Arcade, 1V1 Single Race and Rally Single Race game modes all offer an identical set of 9 track options.  
  2. The series races (1V1 series and Rally series) only use randomly generated tracks because those game modes can involve series of 10+ consecutive races and thus due to the long duration of those game modes (games could be 15 minutes or more) I think it's only sensible to talk about using the randomly generated tracks for those game modes.  
  3. The tracks in the mini game wlll probably be different than the tracks in the other game modes.   

 

 

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

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