Jump to content
  • Advertisement
Sign in to follow this  
valentin-galea

Generate an endless 3D race track

This topic is 2508 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

How would I go about generating the track for this game I'm trying to prototype (done in 3D Studio Max)?
[media]
[/media]

It should be an endless tunnel that sweeps along a 3D spline, with some obstacles throw in. Best idea so far: loft a circle shape along the spline.

I would also like some pointers into how to manage the geometry i.e how to create it from the loft operation, manage it's 'lifecycle' in memory, collision and texturing.

Also, what to do think of the game idea itself biggrin.png? It's something like a cross between F Zero GX and Proun.

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
IMO the simplest way would be to make about 50 or so rings of a torus with varying radii (each ring has a different curvature left or right), and to randomly chain them. Add some rules:
1. keep track of how many times in a row each ring has been used.
2. rings that just started being used are likely to come up next
3. rings that have been chained several times are likely to switch to the next ring with greater or lesser curvature.
4. rings are also randomly rotated along the z axis (in this case the x axis is always pointing down the track) following the same rules as above.

Also that looks pretty pretty good :)

Share this post


Link to post
Share on other sites
@turch hm.. that sounds like an interesting idea..

@BeerNuts I know of SpeedX - it's actually a clone of Boost 3D from iphone - there are quite a lot of these games :) but still don't know how they do it

Share this post


Link to post
Share on other sites
It's not infinite, the drawing distance is very close.

For low resource devices, speed and motion can be an illusion - it's texture that is being offset, not the geometry. Nice thing is it can be done via shader alone. Only the blocks would be what is moved towards you. Such approach also flawlessly works with hinting (the colored projections on the ground).

Tunnel is fixed, m x n points, as the tunnel curves, points are slightly deformed. When it unfolds, it's a mesh of m x n points again. Everything could also be just a shader effect.


Given low resolution of the mesh, modifying geometry is perfectly doable as well. Just generate cross sections. It's like all old games worked. Even if drawing rectangles individually it's not a big deal, there's only several hundred triangles to render.

For anything that is not a low power device, just generate sections one at a time, then move those. Rendering hundreds of thousands of polygons isn't a big deal - and you only need a fraction of that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!