Sign in to follow this  
Guy Meh

Modeling Levels and Things

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this