   Best way to store this?
  While I have no problem making this feature work, I am unsure on best practices regarding it. In essence, the game I am working on has two types of entities that are part of this structure. Actors (which, as you might guess, are characters that move around) and Objects (which are generally static things that Actors can interact with, works slightly different from Actors in several aspects).Actors can pick up and carry certain objects that are spread around the games map, and this is where I am confused.Each object and each actors has a unique number that references them in the game. Should I store, on the object, which actor is carrying it (if any) or should I store which object the actor in question carries? Or should I simply store the data for the object being carried in the actor data structure itself?Which is more intuitive to you? Are there any standard practices regarding thing like these?   
  It all depends on how you need to reference your objects and what part of the relationship is important to your particular application, but intuitively, for me, I'd suggest each object having a 'location' id and also a vector of object ids that it currently owns, which is similar to how it used to work with the old MUDs.  It's a tiny bit more maintenance when moving objects around, but you then have lookup efficiency on both sides, i.e. you can tell what owns an object and you can tell what objects an object owns.   ;  Which language are you using? If it's C/C++, you will usually store a pointer to the object the Actor is carrying at any time, like this:class Actor{    Object* carriedObject;};If the pointer is 0 (null), then you know that the Actor isn't carrying any object.If you want to quickly get at an actor from an object, you can also put a pointer to the Actor in the Object classs in the same way.For other languages it's the same basic concept, except you might need to store references instead of pointers.   ;  Intuitively I would give the actor an inventory. This would be a list of some kind stored in the actor object. The inventory list would simply hold the ID's of all the items it is carrying.   