Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 3 (modified by landauf, 16 years ago) (diff)

ObjectManager

This is an archived page!
This page is very old and the content is not up to date.
Not everything (if any) which is written here will be in the final game!

Idea

The ObjectManager is the one place, where all the Entitites of the Game are stored. The ObjectManager has multiple lists for Environmentals, enemies, dead and living matter, friends, projectiles and so on.

With the ObjectManager Entities can be grouped, and as such be ticked, drawn and collided independently and much safer, as without it.

Interaction

The ObjectManager works closely together with WorldEntity?, as it is a storage container for them.

The ObjectManager has the following Lists, to store Entities:

OM_NULL Not accessible (where they are created and deleted !! DO NOT USE THIS)
OM_DEAD Dead Entities, that might be revived
OM_DEAD_TICK Dead Entities, that must be ticked (e.g to respawn them for instance)
OM_ENVIRON_NOTICK Environment that is dead matter (ground house…)
OM_ENVIRON Environment that moved (water, trees, Particles…)
OM_COMMON Everything that is nowhere else, (collides with all groups)
OM_GROUP_?? Groups, for entitites
OM_GROUP_??_PROJ Projectiles of the above mentioned groups.

To Put an entity into a corresponding group (and thus taking it out of its previous group) do a:

  WorldEntity* entity = new DoomsDayDevice();
  entity->toList(OM_GROUP_01_PROJ);