Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Racer game tech

Reply to topic
Author Message
Kroustibat
  • Guest
Reply with quote
Racer game tech
Post Posted: Thu Jun 14, 2001 10:27 am
hi, all

it's a little off topic (more game programming) but as it's for a sms project i try anyway :)

well, i was wondering what's the techniques for programming a racer game like OutRun, GP Rider, Hang On,.... I know, this something to do with line interrupts, but i can not see , how it work ? How the circuit is represented in progams way, how to draw the road ? How do i have to design my tile ?

Does anyone have some clue about it ? or know good ressources ?

Thanks in advance

Pascal
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Thu Jun 14, 2001 3:49 pm

Quote
> well, i was wondering what's the techniques for programming a racer game like OutRun, GP Rider, Hang On,.... I know, this something to do with line interrupts, but i can not see , how it work ? How the circuit is represented in progams way, how to draw the road ? How do i have to design my tile ?

If you look at the road in Hang-On, before any turns occur, this is what the road patterns look like in VRAM. (so it's a picture of a road, which is smaller at the top and wider at the bottom, to give the illusion of depth)
On each scanline, the horizontal scroll value is changed to make the effect of turning left or right. You have a greater degree of scrolling near the bottom of the screen, and a smaller degree at the top.

What most SMS and NES games do is use palette rotation, where the road is made up of horizontal stripes of a solid color, and these stripes have different colors going vertically. (this is the same trick used in Space Harrier for the moving floor) The palette is rotated each frame, and it looks like the road is moving towards you. You should try looking at some games in Meka and enable the palette viewer to see this.
But you don't have to use the palette, you can also change VRAM data too. The only game I know of which does this is Street Racer on the Genesis. It divides up the road into a few sections (like furthest away, middle, and closest to you), and stores several copies of the road data that look zoomed up. On each frame, it changes the name table so each of the three sections of the road have different road graphics. But this takes a lot of computing power and wastes a lot of VRAM.

To store the circuit data, I would have a series of events that happen based on a counter. The counter represents how much of the course has been traversed, and is incremented based on the player speed. So after the car or bike has traveled for so long, you might have the road raise or lower, or turn, or maybe you'd just announce the course was over and a new one was starting. (like in Out Run)
The problem with these kinds of racing games is that since they aren't really 3D, you never see any part of the track in the distance or when turning corners (compare to Mario Kart or F-Zero), which makes it seem less realistic. And I've found that maybe except for Hang-On, all games like this have really, really bad steering, IMO. :)


  View user's profile Send private message Visit poster's website
Consolemu
  • Guest
Reply with quote
Post Posted: Thu Jun 14, 2001 7:02 pm
I'm glad you asked this question. I've been day dreaming and studying of a way to make a racer and here's my idea...

Create an array, or map array, that stores data. Like this...

byte: scenery set 1
byte: checkpoint/start
byte: flatroad
byte: scenery 1 left/scenery 1 right
byte: flatroad
byte: scenery 1 left/scenery 1 right
byte: flatroad
byte: scenery right sign/scenery 1 right
byte: soft right turn
etc

Like, each byte holds track data and as you play through the track the game will read data from the map and change the game as you're playing. For instance, scenery set 1 means load the scene from set 1. Flatroad means the road is pointing to infinity and you're driving straight. scenery 1 left/scenery 1 right means show sprites or images from set 1 on the left and right sides (like rocks and the such). Scenery right sign means show the turn arrow on the left side but keep the scenery to the right. And when you encounter soft right turn, make the right turn animation and make the car or the automobile slide slightly to the right as if you were turning. Get it? Finally, at the end of the track or the map, make a byte that will force you to read from the beginning (where scenery 1 set) is for the next lap or the checkpoint and such.

I think the trickiest part to a racing game would be to get all the timing together. A racing game is 90% animation and 10% AI (the older games, at least). The speed of the animation in the game depends on how fast the bike is going. What's also difficult is the droan or computer bikes that pass by. They carry their own acceleration and they also have to know how to turn and whatever else that happens. Not to mention their position on the track. So there's a lot to be considered. I've never coded a racing game but if I do make one I think I'll try this method to see if it works.

Hope this helps,

Chris :o)
 
Kroustibat
  • Guest
Reply with quote
Post Posted: Fri Jun 15, 2001 11:08 am
Quote
> If you look at the road in Hang-On, before any turns occur, >this is what the road patterns look like in VRAM. (so it's a >picture of a road, which is smaller at the top and wider at the >bottom, to give the illusion of depth)

okay, thanks, i think i've understood the basic,

so if i want a tunnel like there's in chase hq, i've to design several rectiline road with the tunnel for the growing
i'll do some test now :)

Quote
> The problem with these kinds of racing games is that since >they aren't really 3D, you never see any part of the track in >the distance or when turning corners (compare to Mario Kart or >F-Zero), which makes it seem less realistic. And I've found >that maybe except for Hang-On, all games like this have really, >really bad steering, IMO. :)

I'm a great fan of Super Monaco GP on megadrive :)
btw ,games like MarioKart,Fzero use really 3d ?

Do you have id of how it work ? for me , it seems that the game use a "sky view" race circuit, and then apply a perspective. I don't know how they do their perspective rendering (polygon textured ???) but it really look nicer ;)

thanks both for yours advice :)
 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Mode 7
Post Posted: Fri Jun 15, 2001 4:18 pm
Quote
> btw ,games like MarioKart,Fzero use really 3d ?
> Do you have id of how it work ? for me , it seems that the game use a "sky view" race circuit, and then apply a perspective. I don't know how they do their perspective rendering (polygon textured ???) but it really look nicer ;)

They both use Mode 7 of the Super Famicom, which is exactly what you described. A plane (made of tiles) is drawn with perspective on screen. The hardware does that.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!