Jump to content
  • Advertisement

Archived

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

Mosselmaniac

Tiles, properties, how to store them.

This topic is 5724 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!