Containment
Containment, like its corollary mechanism Affixment, is a mechanism that is intended to provide sensible and useful behaviours for the solution of problems which concern themselves with how game object are locationally related. Containment describes the situation when one object is inside another.
This kind of containment should not be confused with programmatic containment, which is when an object contains a reference to another. Game-wise kinds of containment are expressed with programmatic containment, but programmatic containment is much more general, and has no implied effect on the kinds of problems being solved within game-wise containment.
- Event propagation - "How do events propagate from one related object to another?"
- Description generation - "What affect does the relationship between objects have on the text that is generated to describe them?"
Simple Containment
The first, most general kind of containment expresses hierarchical inclusion of one object in another.
Integral Containment
A more complex kind of containment is "integral" containment. It expresses a relationship of physical inclusion that is one member of a part-whole object heirarchy, the default members of which are usually defined by the object's class. The salient object is always the container, although its description can be affected by prepositional phrases describing modifications to its default contents.
For example, a character's body may "contain", among other things, a head object, a heart object, and limb objects. The body "has" these things as a part of its whole, and it would not be a whole body without them. If the viewer were familiar with common humanoid species, an elven body would be described as "an elf", and an orcish body as "an orc", etc. Removing the head object from a human body would cause it to be described as "a headless human" or "a human without a head", while adding an arrow object to its integral contents might cause it to be described as "a human with an arrow protruding from his arm".
Integral containment can be modified by game events, but the consequences of doing so are usually detrimental or disastrous for the containing object.
Inventory containment
The kind of containment that is usually thought of when an English-speaker says "contains" is inventory containment. It is similar to simple containment, but differs in that the borders of its containment are physical barriers, and an object which is cannot be entirely contained must either be rejected for inclusion in the container's inventory or otherwise handle the misproportion. It is the type which chests and bags have so that you may put things into them, and the kind that areas have so that they can contain other objects.
Event propagation for inventory containment is handled purely heirarchically, with the container handling and possible propagating any events to its contents.
See Also
- Affixment - Relationships of location which describe attachment,
- Perceptual Salience - How various kinds of containment affect perception
- Events - An overview of events
— GedTheGreysHain - 15 Aug 2001
