The Stage Design

The Stage's single function is to render and control the puppet actors within a graphics engine.

Stage Design

Network traffic from the PuppetMaster is parsed and fed to the actors through the Stage, which filters out bogus requests and passes the rest along to the appropriate actor. The Stage can also dynamically create and destroy actors, though the truest example of world-building power comes form it's ability to create a scene by reading a few XML files (called SSF files, in this case), files which can be easily read and altered by any would-be playwright.

The actors in the Stage are called Puppets, appropriately enough, and while they do encapsulate all the data necessary to maintain their existence in the graphics engine, the true control comes from the Joints that are attached to them. A Joint represents a single degree-of-freedom or motion for a Puppet, like the swing of an arm or the width of a model. This degree-of-freedom can then be mapped to any range and any device, and these relationships can also be quickly read from an XML file (a VPM file). A Joint isn't necessarily a physical value; any property that varies along a set range can be a Joint... the color of a light, the intensity of a fire, or the spawn rate of a particle system, all these things can be mapped and controlled in real time.

The Stage is designed to be graphics engine independent, so future teams don't have to discard the entire system when better graphics engines roll around. All engine-specific code is wrapped in macros and limited to a few key places, and all types belonging to a specific engine are wrapped in abstract labels that can be easily switched. (Both these controls exist in engineAbstract.h).