Original Post
I need to create some sort of structure or class to store all of the objects in a map in memory. I am thinking of reading in all of the world data (walls, cubes, doors etc..) and putting this into an array, but I would like some advice on the organisation.
If I were to create an 'object' array and store everything in this one class then that would be fine, except that you might be using a lot of memory for parameters which are empty like this:
object(
objecttype
wallsize
doorangle
waterspeed
openspeed
)
If I were to create a different class for each object then I fear I might have trouble when I come to doing stuff like a z sort to optimise the drawing order of objects - because the objects parameters are spread out over a number of separate arrays. Example:
wall{
wallsize
colour
}
door(
openspeed
doorangle
rotatetrue
}
Any ideas on how to organise this?
Paulcoz.
Edited by - paulcoz on 4/9/00 9:29:26 PM