Generate an endless 3D race track

Started by
3 comments, last by Antheus 12 years, 2 months ago
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!
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 :)
There's already a game out there that does this: Speedx 3D. I have it for my android phone. It's really fun. It plays inside the tunnel, and it unfolds the tunnel, then lets you ride outside the tunnel.



https://market.android.com/details?id=com.bytestorm.speedx

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

@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
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.

This topic is closed to new replies.

Advertisement