The interaction system is at the core of Metacosm's game engine. It is therefore very important to implement it in an efficient and extensible way. We will rely on design patterns to insure that the Interaction system will offer an acceptable level of performance. Next, we examine the requirements for the interaction system.
Small memory footprint: the system must be able to handle a large amount of different Actions without impacting too much on memory requirements for the game engine.
Dynamically extensible: it should be possible to add new Actions at runtime. It should also be possible to reload any number of Actions to replace them with a newer implementation.
Shareable among a large number of Entities: many Entities have the possibility to perform the same Actions.
Customizable on an Entity basis: an Entity can be influenced by several different Influences and therefore be able to perform all (or part) of the Actions define by its Influences but can also provide a custom implementation for a given Action that will override the default implementation.
Fast enough to insure a good interactivity with players: look up and retrieval of an Action should be performed in a reasonable lapse of time (100 ms?) so that interactivity is preserved.