Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411722 Posts in 69402 Topics- by 58455 Members - Latest Member: Sergei

May 22, 2024, 06:27:13 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Retro arcade racing games - how did they work?
Pages: [1]
Print
Author Topic: Retro arcade racing games - how did they work?  (Read 5317 times)
zjksldfjkr
Level 0
*


View Profile
« on: June 02, 2010, 07:13:22 AM »

blah
« Last Edit: January 04, 2015, 02:46:38 PM by zjksldfjkr » Logged
Glaiel-Gamer
Guest
« Reply #1 on: June 02, 2010, 07:17:41 AM »

mode [seven]
that's a numerical seven, not the word, my seven key is just broken

Basically, you adjust the scale and rotation of the background image on a per scanline basis, and can get fake 3D effects that way
Logged
agj
Level 10
*****



View Profile WWW
« Reply #2 on: June 02, 2010, 07:55:21 AM »

mode [seven]
that's a numerical seven, not the word, my seven key is just broken

Basically, you adjust the scale and rotation of the background image on a per scanline basis, and can get fake 3D effects that way

You're confusing your technologies. You mean Sega's Super Scaler, rather than Nintendo's Mode7.
Logged

Glaiel-Gamer
Guest
« Reply #3 on: June 02, 2010, 08:31:26 AM »

i thought they were the same technique just mode seven turned into the common term for it?
Logged
GaiaDreamCreation
Level 0
**


View Profile WWW
« Reply #4 on: June 02, 2010, 09:23:06 AM »

I got and idea on how to do this, but you'll need to write your own functions.

I'd start with a road texture tile set.  Your default texture should have the width of the road with the lines between the lanes.  It should also have the whole lines (looking vertically, the dash should fill 50% of the texture, vertically).  That way, if you repeat the texture, you have a realistic road with the dashed lines between the lanes.

To draw the texture on screen, here's the trick:

-The road will be drawn in road segments vertically where each segment is copied from the tiles I talked above.  If you look carefully at the pictures you included, you can see two kinds of segments: Plain gray and the dashes ones.
-Offset horizontally the segment depending where the car is on the road.
-Offset vertically the segment depending of the distance of the road segment. If you want to include some hills on the road, that will require additional calculations.
-For the angle at which you look at the road, you need to do a vertical scale.  However, there's a problem here.  Vertically, it works fine, but the higher part of the segment is always farther than the bottom.  To keep the perspective correct, we also need to scale down horizontally the higher part of the road segment.  I think you can do this by writing your own copy pixel function.
-For each road segment to be drawn with the good size because the distance, you'll also need to scale down the whole segment properly.

For the sprites like the trees, simple positioning and scaling are required.

You'll need to do a lot a mathematic to do this.  It's quite mathematic.

This is how I'd do this.  I hope I clearly explained it because I didn't include any visual help; just text might be harder to explain.
Logged

Sébastien Larocque - Indie Game Developer at www.gaiadreamcreation.com
magnum_opus
Level 1
*


View Profile
« Reply #5 on: June 02, 2010, 09:28:59 AM »

This might help
http://www.gorenfeld.net/lou/pseudo/
Logged

nikki
Level 10
*****


View Profile
« Reply #6 on: June 02, 2010, 09:36:55 AM »

in this post at the header "Super Nintendo Mode 7" (7/8 down the list)  Shrug Is a very nice explanation and source code of this technique.

Only outrun was even more limited (no rotation)

wait i'll credit the guy who wrote that article : "amarillion"
He's got some more Allegro mode7 things going on, so Google!


Quote
use this one, much better!
Logged
GaiaDreamCreation
Level 0
**


View Profile WWW
« Reply #7 on: June 02, 2010, 11:41:33 AM »

You guys are the best. I can not thank you enough. Thanks GaiaDreamCreation for your lengthy reply and to magnum_opus for the link. I now somewhat understand how all this works, and I'm gonna attempt a prototype in C later tonight.  Gentleman

I hope it will help you to make your game.  Please, post it when it's completed.  I'd like to see it.  I was a big fan of Out Run and also Hang On.  I still find these games very cool and they remind me of a good era when I was very young!
Logged

Sébastien Larocque - Indie Game Developer at www.gaiadreamcreation.com
agj
Level 10
*****



View Profile WWW
« Reply #8 on: June 03, 2010, 08:38:29 AM »

i thought they were the same technique just mode seven turned into the common term for it?

Nah, they're quite different. Mode 7 has a single floor bitmap that rotates and scales, but which is always flat, whereas Super Scaler games mostly just scale sprites; for the floor I'm not sure what they did, but it features no rotation (you can only go in one direction in all those games), and does allow different heights.
Logged

davidp
Level 6
*



View Profile WWW
« Reply #9 on: June 07, 2010, 04:53:46 AM »

Lotus Esprit Turbo Challenge and such games.


boy, oh boy, that was a sweeeet game!
Logged

r.kachowski
Level 5
*****

and certainly no love below


View Profile WWW
« Reply #10 on: June 08, 2010, 04:06:18 AM »

I'm gonna attempt a prototype in C later tonight.  Gentleman
i've really wanted to do something like this for a while. good luck! keep us updated Coffee
Logged
zacaj
Level 3
***


void main()


View Profile WWW
« Reply #11 on: June 08, 2010, 05:20:38 AM »

Wait- how does Rad Racer do it?  Its on a NES
Logged

My twitter: @zacaj_

Quote from: mcc
Well let's just take a look at this "getting started" page and see--
Quote
Download and install cmake
Noooooooo
JamesGecko
Level 3
***



View Profile WWW
« Reply #12 on: June 08, 2010, 01:04:32 PM »

i thought they were the same technique just mode seven turned into the common term for it?

Nah, they're quite different. Mode 7 has a single floor bitmap that rotates and scales, but which is always flat, whereas Super Scaler games mostly just scale sprites; for the floor I'm not sure what they did, but it features no rotation (you can only go in one direction in all those games), and does allow different heights.
Actually, that site magnum_opus linked to mentions

, which did some crazy heightmap stuff based on Mode 7-like techniques. Although that was in an arcade cabinet which allowed them to implement the more processing intensive voxel stuff in hardware.

I'm still impressed at some of the Mode 7 + 3D model stuff they've pulled off on the Gameboy Advance with the Need for Speed games.

/ U2
Logged
agj
Level 10
*****



View Profile WWW
« Reply #13 on: June 08, 2010, 03:58:59 PM »

Yeah, actually, the GBA has a few really impressive racing games. Sadly, I'm only talking about technical qualities; I'm a fan of racing games that use old technology, so I've tried a good bunch, but most are pretty terrible. Top Gear Rally is the prettiest.
Logged

Triplefox
Level 9
****



View Profile WWW
« Reply #14 on: June 08, 2010, 06:23:30 PM »

I was working on two games last year that did this. TV games, hence why ye olde tech was used.

I don't know the details of the implementation, but the particular one we ended up with did not allow for overdraw on hills, because, at least as I understood it, the ground texture and sprites existed on different hardware layers and could only interact in a background/foreground way and not with true z-depth. The upshot was that level designs had to avoid using deep dips. At the time I was working on it I played a lot of Outrun and carefully observed how they did it and noticed a few things:

  • They could do hills better. I think this comes down to the hardware mechanisms, seeing as Sega had dedicated hardware for this style of game.
  • The camera moves up quite a bit when going on hills; this probably helped "sell" the look, and it also reduces the amount of overdraw required. Camera perspective was limited in our tech, and I think the only tunable parameters were a single height and angle.
  • The obstacle layouts are quite repetitious, probably because tiles were used. Our game did not use tiles, every object was hand-placed, every curve and bump was hand-tuned segments. You probably want to use tiles for sanity reasons. I've mentioned this in other threads, but I had to resort to procedural scripts to make levels that did not suck and had adequate density in a reasonable amount of time. The problem with an overhead view of the track in these engines is that you can create unrealistically tight curves, so either you restrict yourself to a model(like tiles) that doesn't allow this behavior and create the code to project everything on the overhead map properly, or you edit "blind", starting from a straight track and estimating how the curvature will ultimately affect the view. I edited blind - I did get a preview of the in-game look, but that only made it tolerable, not good. Hence the procedurals came to the rescue to get the track looking "mostly" right. If I were doing it again I'd probably come up with a solution for the curves that involves reducing the density of bend variation and creating magic sight line values for each one. Where I had the road zig-zag, the results usually looked shitty, and I think I ultimately avoided zig-zag in my algorithms anyway.

As indicated on that link of pseudo-3D engines, the precise implementations can differ a lot, especially once you start including height variations. I think there's still a lot of room for this tech to support a unique art style. Look at the character select in Power Drift, for example:





The way that the "zoom through the garage" thing is pulled off is unlikely to happen in a modern 3D game, but it's very easily done here. On the other hand, Power Drift suffers a bit from using sprites as ground texture too - it all looks a bit too "fluffy."
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #15 on: June 08, 2010, 06:45:58 PM »





The way that the "zoom through the garage" thing is pulled off is unlikely to happen in a modern 3D game, but it's very easily done here. On the other hand, Power Drift suffers a bit from using sprites as ground texture too - it all looks a bit too "fluffy."

Gosh, I love System 16 games.  I was trying to put together a Space Harrier clone a while back, but unfortunately that project kind of fizzled.  I think these types of games look several orders of magnitude cooler than the crap that comes out these days.
Logged



What would John Carmack do?
dukope
Level 3
***


View Profile WWW
« Reply #16 on: June 21, 2010, 08:55:52 AM »

I have nothing to do with this besides some minor playtesting, but my friend Davide is making exactly this kind of game for the iPhone. He's got a pretty interesting blog about developing it:

http://v5.kazzuya.com/

It's basically an OutRun homage. He captured the car sprites himself by taking pictures of matchbox cars. Hardcore.
Logged

Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #17 on: June 22, 2010, 04:35:33 AM »

I was working on two games last year that did this. TV games, hence why ye olde tech was used.

SunPlus hardware? I've used that myself and it was a lot of fun.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic