Archived

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

JulianSpillane

Track rendering...an idea.

Recommended Posts

JulianSpillane    122
Alright, I''ve been pondering something for awhile, but I''m not sure the best way to go about it. I''ve decided that deliberating until I go mad isn''t very productive, so I''m reaching out to my fellow GDers to see what you all think. To start off, I''m not working on an uber-powerful MMORPG that will crush Ultima Online "lololol!!111!!1" *ahem*. Rather, I''m working on a kart racing game akin to Crash Team Racing and of course, Mario Kart 64 (and the upcoming cubed version). My problem is, I don''t know how I should handle the tracks. See, on one hand, I could load the entire scene in one big file into my yet to be created editor (would be entirely different for my other option), and then give each object individual properties. This would give my artists the bonus of working on the entire level at once without having to divide it up, but it also comes with more of a performance hit than my other method. My other option is to have my artists create a series of 3D tiles that are stored in a 2D array. That way, you could assign certain properties to certain materials and land-types...one major pro would be that rendering the levels would be faster, and it would be very easy to make minor alterations. Blargh. I''m just so confused. Any ideas? Thanks in advance, Julian Spillane

Share this post


Link to post
Share on other sites
Nypyren    12072
3d tiles in a 3d array! (well, not an array... have each segment of the track store a position that snaps to a grid in the editor)

I owned a FREAKING old game called "stunt driver" (or racer?) that had a level editor exactly like that (2d grid editor). It wasn't as cool when need for speed came out, but if you make some sweet 3d pieces it would rule.

It also had multi-cell objects (like banked corners that took up 2x1 grid cells).

The main benefit I can see is that you can load all of your building blocks into vertex buffers and never have the need to change them.

[edited by - Nypyren on March 18, 2003 12:59:46 AM]

Share this post


Link to post
Share on other sites
Ready4Dis    180
Or, you could render it with some sort of PVS (possible visibility set) which breaks up the track into sections, and only renders what could possibly be visible from that location. This way, the level editor will still be the entire track, which would THEN get split up so your rendering engine can be fast. That would solve both problems, because you can also then only do collision detection with objects on your current section as opposed to checking the entire track, rendering would be fast, level editing would be completely dynamic (no tile sets), and everyone is happy .

Share this post


Link to post
Share on other sites
lunarss    169
Consider using a spline for making the track. I had to do a project once in a college graphics class where we had to make a rollercoaster. I used a catmull-rom spline and it worked great. Catmull-Rom splines are nice because they actually pass through all of their control points, which makes manipulating them much more intuitive.

check this out:
http://www.mvps.org/directx/articles/catmull/index.htm

You could make your level editor so that the artists just add and manipulate control points to create a track. All you would have to do then is store the control points in your file and create the mesh at runtime. You could easily extend this to have a surrounding landscape etc. Have fun.

[edited by - lunarss on March 19, 2003 6:41:19 PM]

Share this post


Link to post
Share on other sites
JulianSpillane    122
Thanks very much for all your replies!
Y''know, I think I''ll look into the PVS system, because I think that would work perfectly.

As for the Catmull-Romm spline system, I don''t think you understand what I want. Procedurally generating the mesh at runtime from a spline would suck for this application, because kart racing games are usually highly dependant upon bright and vibrant graphics to help set the mood, but thanks anyways!

So yeah, I''ll look into setting up a PVS system for the track, and failing that, I''ll go with my original idea of 3D tiles (models) in a 2D array.

*smiles* Thanks!

Share this post


Link to post
Share on other sites