inventory system – draft
every single object that has been placed in the world has the potential of being picked up and added to the player’s inventory.
A new action would have to take care of hiding the object and spawning a new inventory item (perhaps a new subclass of cp407object).
The visual representation of the inventory could at first be a simple list, displaying all the items a player has in his/her possession.
a next step would be to replace the list by thumbnails (RT previews of each object – in which case subclassing CP407Object would make sense).
Objects in the inventory can be placed on the floor via drag&drop
new object properties / dynamics
weight: a thought – each object consists of a certain material that has a specific weight. The object weight is calculated by multiplying the specific weight with the volume of its bounding box. That way, objects of the same type but with a larger bounding box get heavier, increasing the chance for players not being able to pick them up. It wouldn’t make much sense if players could pick up cars or trees.
another thought: aging items: consider a seed item a player has in his/her inventory. As long as it’s in there, nothing happens to it. If however, the player puts the seed onto (or into) the ground, it starts growing, building a tree, bush, flower, etc. with time.
This principle could be applied to all kinds of objects, such as food items going bad, items that are seasonal or dependant on a certain environment (ice cubes – as soon as they are picked up, they start melting, gradually turning into a puddle of water)
In order to achieve that, each object has a birth timestamp. Whenever the age is queried, that timestamp is used to compute the object’s age.
Certain objects would need an ‘update’ callback that updates their age without it being queried.
example:
class CAgingItemÂ
{
 void UpdateAge()
 {
    m_iAge = CurrentTime() - m_iBirthTime;
 }
}
The ‘UpdateAge’-Function gets called periodically (1/s?).