Universe subsystem

The Universe subsystem lays the groundwork for the program. It supplies an abstraction for actors (such as game pieces), a central universe class for controlling the program's multiple threads, and a universe thread that supports the orderly insertion and removal of actors.

TAbstractActor inherits the ability to move, refresh, and collide from the Movement, Refresh, and Collision subsystems. A derived class in the Game subsystem gives concrete actors their domain-specific characteristics--position, velocity, and an identifying graphic.

TAbstractActor, along with TUniverse, also provides the protocol for inserting and removing actor objects from play. When an actor is created, the universe adopts it and connects it to the appropriate collision behaviors, such as exploding and bouncing. When an actor is destroyed, the universe orphans the actor and disconnects it from collision behaviors.

The details of removing actors from play are explained in "Destroying actors cleanly" (page 39).


The TAbstractActor abstract class defines an abstract protocol for all objects in a simulation. The actual mechanics of the simulation are managed by the TUniverse instance. This instance manages the multiple threads that make the simulation run.

The TUniverseThread instance manages the orderly creation and destruction of actors while the simulation is running.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker