Jump to content
  • Advertisement
Sign in to follow this  
speedie

would I be storing my map data right if I....

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

I'm currently knee deep in the programming of a 2D tile map engine. I'm trying to figure out what would be the most beneficial and practical way of storing some of the data. So far my map is rather simple, theres a couple layers that are purely graphical, and only contain id's to what graphic they are and the opaqueness... etc. But the part I can't seem to decide on is how my objects should be drawn by the map. I wanted to keep the objects seperate from the map, so they have they're own manager and are all stored into a vector/list. But how should the map know where to draw them. I was thinking something like, the one layer that is the object layer would just be a vector of pointers to objects, that the object manager would have access to. Each pass the layer would be cleared and the object manager would pass the various pointers to they're corresponding position. then the map would just call the draw function on the pointers. is this (if you understand me) the way i should go about this?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!