Home Inception IFactory and Factory Classes
The IFactory/Factory Simulator Interface Print
Written by Samuel E. Henley   
Monday, 07 July 2008 10:09

IFactory is the simulation interface used to generate game entities. This is an abstract class to insure a common interface for the use of the ISystem classes. This class is interface between the xml route data files and the simulator interface classes (IGraphics, ITask etc.).

A game entity represents not only in the case of the railroad simulation, a train or other moving or fixed object, but also events and triggers. For example, the train engine crossing a point on the track path generating an event for a user script, is a game entity. Game entities can also represent test and tweaker objects used to maintain or adjust the railroad simulation.

In keeping with the design of the Ogre 3D graphics system a game entity should be made up of a composite of objects that represent the entities effects on the train simulator. The IFactory interface should make available to the scripting system a general purpose object that can create a composite object that will be registered with the appropriate interfaces of the simulator. For example, the game entity for a locomotive simulation would include objects to be registered with the IGraphics, ITask, and ISound interfaces. In addition, IFactory could be used to create and attach to the composite entity a locomotive cab simulation with graphics, sound and animation.

The IFactory interface should be driven by an ITask script reading from the route/path database. This script could be developed as an AngelCode script initially and later be converted to a single script call to a C/C++ routine. For the purpose of the Fly-by-wire Demo and development the task should be maintained as an AngelCode script.

Last Updated on Wednesday, 03 June 2009 08:11