Archived

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

Mosselmaniac

Tiles, properties, how to store them.

Recommended Posts

Well, It''s going great. My tile based race game is running very good. Now i want to add properties. For example, on the normal street you can drive faster than on grass. How to save those things? In a textfile or just hardcode it? In the same textfile as my map or how do the ''real'' game programmers do this? I want it to be easy to maintain. Thanks Mosselmaniac

Share this post


Link to post
Share on other sites
Hardcoded : save a number for each tile. Create an array in your code, and for each tile, look up aray item of the selected number. It will hold all data (speed, friction, etc...)

another way-

Ini : same thing, but load your array from an ini file instead of hardcoding it (not necessarily INI, anything will do)

and another way-

Map : hold for each tile data such as friction, passability, flags...

It all depends on the flexibility you need...

ToohrVyk
-------------
Extatica - a free 3d game engine
Available soon!
Click here to learn more

Share this post


Link to post
Share on other sites