Jump to content
  • Advertisement


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


Tiles, properties, how to store them.

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

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

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

Share this post

Link to post
Share on other sites

  • 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!