Archived

This topic is now archived and is closed to further replies.

robertgamble

How were racing games like Outrun/Hangon done?

Recommended Posts

Right, I know that you can do these kinds of games by using a flat track image:-
quote:
/\ / \ / \ / \
..and then making corners by shifting the rows of the image left or right a certain number of pixels. But how exactly are tracks mapped out? I''m guessing that you''d have an array: track[]={0,1,2,1,0,0,-1,-1,-2, etc.. Where 0 is straight, >0 is a right corner, <0 is a left corner.. But then how are the values "interpolated"? Can anyone give a little explaination or point me in the direction of a tutorial or commented code example? Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
project a 3d-spline on the screen (draw it as polyline)
for every y lookup z and x
use them to display and scale your street

Share this post


Link to post
Share on other sites