Jump to content
  • Advertisement

Archived

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

equalhue

outrun style roads

This topic is 5962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can anyone point me in the right direction here I am trying to write an old style racer similar to outrun,wec le mans etc, But I cant figure out how todo the road proper this is a technique that has always eluded me, parallax scrolling, 3d starfields, raster techniqes I have had no problem figuring out but this i dont get someone please put me out of my misery and tell me in laymans terms

Share this post


Link to post
Share on other sites
Advertisement
Didn''t somebody just ask this question?

Anyhow, here''s another explanation. It seems like you know a lot about programming, so I''ll cut it short.
Drawing a straight road isn''t difficult, just use some perspective on it.
When it comes to a turn, you must skew the road. Cut the road into the scanlines it''s built out of and push them to the direction wanted. At the bottom of the screen, skew almost nothing. The higher you get on the screen, skew the scanlines more and more. Have some looping variable and add or sub 0.2 to/from it and move the scanlines by this.

Voila! A road turning!

I wrote some code, but I won''t write it again. Look out for the last question about this.

You''ll have to find out for yourself about sloping roads (horizont going up and down).

Share this post


Link to post
Share on other sites
thanks for that

I will track down your previous post and take a look at your code

slopes & horizon movements i know i can do, butthe turning was a problem,

will plug away and see what happens :D

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!