• Advertisement
Sign in to follow this  

Modeling Levels and Things

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

This is a quick question about how most people make levels and things know about each other. For a given game you'd have a bunch of levels (or maps, or areas) where at least one is in memory. The level has a bunch of things on it (monsters, players, etc.). The level needs to have a list of pointers to its things so that it can update them each frame. Each thing also needs a pointer to its level so that it can interact with it (firing bullets would add bullet things to the level) and examine the other things (important for AI). So, things and levels have pointers to each other, and I have to make sure they point to each other correctly as I assign things to levels, especially if I allow things to move between levels (like the player). I've been putting this issue on the backburner for some time, but I still get suspitions from time to time that I'll forget to set the pointer on one end and get a thing that believes it's on the wrong map. So, do most people take any extra steps to make sure the pointers between things and levels are correct when moving things around, or do they just be sure to set the pointers themselves? Oh, and happy 2008 everybody.

Share this post


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

  • Advertisement