[2D] Outrun style road techniques

Started by
2 comments, last by Ravyne 16 years, 2 months ago
I'm very curious to know if anyone has some ideas on the best way to approach handling the road drawing / movement for a 2D racing game in the style of Outrun / Lotus / Enduro Racer. Is the basic display broken up into segments (based on distance from the player, i.e. the 'fake' z-axis), for example in this screen shot: http://www.arcade-history.com/images/game/756_1.png You can clearly see each 'segment' of the road (thanks to the popular use of an alternating road colours back then) - are we simply talking about drawing each road segment and shifting them all left/right (as the road bends) in alignment? Would love to hear your ideas on this.
Advertisement
I've experimented with various techniques, none of which have looked especially satisfactory.

One thing I can mention is that early 2D video hardware often supported scrolling tilemaps, and so by adjusting the horizontal scroll offset on each scanline the road image can be curved.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

I read something about this some time ago. I can't remember which system this was for, or which game, or anything. It might have been something like Pole Position on the 2600 of Speed King on the C64.

At any rate, this particular machine had very low level access to the raster process. The program did some simplistic 3d calculations to see how far away the current scanline was, how narrow the road segment should be, color of the road segment, and how far (and which direction) it should be from the center. This worked in conjunction with the hardware sprites, so player and opponents are rendered correctly.

Hope that helps, but it's vague and probably wrong :P If I ever find the link to what I was talking about, I'll post it here.
You've got the basic gist of it. The road is indeed drawn as several segments, one for each row below the horizon. You do some calculations to determine some scale factor at the given distance and shift the segments right or left based on the track geometry.

You can notice quite easily that the perspective is not *quite* right, in the game, the road segments are always parallel to one another, but in the real world, they would skew as the road curves.

throw table_exception("(? ???)? ? ???");

This topic is closed to new replies.

Advertisement