Track data in a racing game...
Hi!
We''re just planning our new game. It''s a car racing game.
Just to avoid re-inventing the wheel... how do you store track data?
Do you divide it in tiles? How do you "label" different parts of the track like borders, pavement... ?
I''m not speaking about physics... but just data structures.
Thx for the help!
Bye!
Marco
The data structures you should use are heavily influenced by the game style. If you want it to be tile based... then make it in tiles, and have a mask for each tile, representing the track region (one option). If you want a more freeform environment, you could use a spline/polygonal definition. In fact, the way you store it is not only influenced by how it looks, but also by how you would like vehicles to interact with it. If you give a few more specifics of the sort of thing you envisage.. I''m sure someone will be able to offer you a little more help.
that''s for 2D? tiles are simple.
I''d say, use a ''surface property'' mask on the tile. Surface properties would be a char index to a type of surface at the pixel, like walls, grass, tarmac, ect...
if you don''t use tiles, but a huge bitmap, the same principle can apply.
I''d say, use a ''surface property'' mask on the tile. Surface properties would be a char index to a type of surface at the pixel, like walls, grass, tarmac, ect...
if you don''t use tiles, but a huge bitmap, the same principle can apply.
Thank you for your help and sorry for my lack in information.
I forgot to say some important things
The game is in full 3D, it should be a funny racing game with deformed objects, unrealistic physic and toon rendering.
I was thinking about tiles anyway, because it could be easier to develop a simple track editor and design tracks as well.
But this is my first attempt to a car game so I''m not pretty sure.
My main worries are: using tiles or not, how to distinguish between different parts of the track in a single tile (pavement, border, grass...), how to find out car''s position against other cars...
We''re gonna use ODE for the physic even if we''ll set wierd parameters to get a "cartoon" behaviour.
What do you think?
Thx!
Bye Bye
Marco
I forgot to say some important things
The game is in full 3D, it should be a funny racing game with deformed objects, unrealistic physic and toon rendering.
I was thinking about tiles anyway, because it could be easier to develop a simple track editor and design tracks as well.
But this is my first attempt to a car game so I''m not pretty sure.
My main worries are: using tiles or not, how to distinguish between different parts of the track in a single tile (pavement, border, grass...), how to find out car''s position against other cars...
We''re gonna use ODE for the physic even if we''ll set wierd parameters to get a "cartoon" behaviour.
What do you think?
Thx!
Bye Bye
Marco
I think a good example of the sort of track you are thinking of is trackmania. Full 3D.. but a tile based track definition. If you need to make sure the user follows the tracks, have checkpoints... each checkpoint, activates the next one. The user must cross one, before the system detects him crossing the next. The more freedom you want the user to have.. the further apart you put these checkpoints. The times are compared by when the user crosses each checkpoint. If you need to.. you can have several meshes per tile.. one mesh for track... one for "off track" and then objects to insert for scenery. That way... you can let the physics change as the users goes on/off the track... and it should be pretty easy to let them interact.
i''m working ona track based racing game, it uses what i''ve termed track segments, each segment has an associated mesh/texture for the ground itself, and a quadtree for the objects inside it.
using segments is nice because it allows a very fast culling mechanism if you calculate/guesstimate a PVS for each segment against all the other segments. it also allows textures to be decently detailed and paged in/out of memory as they are needed
james
using segments is nice because it allows a very fast culling mechanism if you calculate/guesstimate a PVS for each segment against all the other segments. it also allows textures to be decently detailed and paged in/out of memory as they are needed
james
Thank you for your replies guys!
I think we''ll get deeper in this tile/segment stuff, it should be the right way to do it.
Bye Bye
Marco
I think we''ll get deeper in this tile/segment stuff, it should be the right way to do it.
Bye Bye
Marco
you can have a look at the Trackmania demo, and the way they do it. It''s tilable track segments. You''ll also see the shortcomings of a method like this as well.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement