CBinBuffer is our standard binary container class.
Methods+properties:CMessageBuffer is an advanced CBinBuffer, special for CMessages. It contains a header and message-specific data. header+data is called buffer.
Methods+properties:CMessage is a base-class for all kinds of messages: e.g. input data from a player to its moving object, or dynamic object parameter data. Data can be converted to a binary representation using the getBuffer method. Derived classes might want to overload getBuffer and setBuffer in order to adapt the behaviour of the object. They probably also overload the getType method.
Methods+properties:An ObjectChoice message is used to describe what kind of moving object is desired by a player. This includes the kind of object (car, train, cow etc.), the type (e.g. the car model) and additional settings.
Methods+properties:Input data coming from a player and going to a moving object. Input data is handled in a general way using the four float properties.
Methods+properties:Input data coming from a player and going to a CCar object. Derived from CMovObjInput. Steering data is sent via m_Right, gas data via m_Forward, brake data via m_Backward and m_Up is not used.
Methods+properties:CMaterial provides material-properties, like the static & dynamic friction coefficients. It also contains data for other subsytems of the game, like the location of a corresponding texture file.
Methods+properties:CShape provides a vertex-based collision model. It also contains data for other subsytems of the game, like the location of the geometry file.
Methods+properties:CBound provides a plane-based collision model. It also contains data for other subsytems of the game, like the location of the geometry file.
Methods+properties:CTile is the elementary data type of which a track is built. The track actually is an array of this type. The place in the array, together with the m_Z property define the position of the tile, while the m_R property defines the orientation. The m_Shape property is an index of an element of the shapes-array.
Methods+properties:A part of a physical object. The bodies of a physical object are rigid bodies, and they can move relative to each other. The m_Position and m_Orientation properties define the position and orientation of the body, and the m_Body property is the index of an element of the bound-array.
Methods+properties:
Implementation of a dynamic object. It is derived from CMessage, so that its
parameters can be get/set via the get/setBuffer methods. Input data of this
object can be reached via m_InputData. Players/network interfaces can set this,
and simulations/network interfaces can read it. The constructor of the derived
classes should create a m_InputData of the right type.
As this class is used for physical objects, m_Bodies and m_Sounds have been
added.
Implementation of the moving object as described in the definitions.
Various methods provide a vector-based version of the position-data.
Derived classes may have additional parameters. If so, they have to
provide their own getBuffer and setBuffer overload methods.
By default, CMovingObject uses a m_InputData of the type CMovObjInput.
The simulate method simulates the type-dependent physics of the moving object.
CCar is a class derived from CMovingObject. The m_InputData member is of the type CCarInput.
Methods+properties:Implementation of the "world" as described in the definitions.
Methods+properties:
Base-class for all players. On initialisation, the world object should be
given to the player. When the object is registered by a CPlayerControl-object,
the m_MovingObjectId and m_PlayerId should be set.
When update() is called, the player-object is allowed to think about its
intelligent response, and it writes its actions to the m_InputData of its
CMovingObject.
Implementation of a local AI player, specialised in controlling cars.
Uses:CClientNet is the client-side implementation of the network protocol. It is derived from CFileCtrl, so that it can manage file downloads.
Methods+properties:CServerNet is the server-side implementation of the network protocol.
Methods+properties:Base-class for all simulations. A CSimulation-object should be used as follows:
CSimulation-class doing the "real" physics calculations.
Uses:CSimulation-class approximating physics with some fast calculations.
Uses:CSimulation-class to be used in client-programs. Connects to the server program and synchronises the world-data frequently. CClientSim does not simulate any physics, but it can be used together with CPhysics or CApproximation. To choose between them, use the CClientNet::hasSlowConectionType() method.
Methods+properties:CRuleControl checks if players are following the right route, gives them penalty time, checks if theyre finished, etc. This simulation can be used together with CPhysics in a server program or in a local game.
Uses:
CPlayerControl is used to manage the players in a game session. With the
addPlayer method, an integer is returned, which can be put in the m_PlayerId
property of a CPlayer object. A negative value means that the adding was not
succesful, for example, because it was refused by the server. After all local
players have been added with addPlayer, the loadObjects method should be called.
This will load the moving objects of all players into the world object.
The default implementation is suitable for local games.
An implementation of CPlayerControl based on communication with a server, for use on the client-side of non-local game sessions.
Methods+properties:The main program can act both as a client and as a standalone program. The only difference between these is that in the first case a "CClientSim" object is used together with a "CPhysics" or a "CApproximation" object, and in the second case a "CRuleControl" object is used together with "CPhysics". This program creates at least one CHumanPlayer instance, and is able to create several CAIPlayer-instances.
The server program always acts as a server, and it may also act as a client.
The simulation objects in the pure server mode are the same as in the
stand-alone mode of the main program. The configuration in client-mode is
identical to that of the main program in client-mode. This program is able to
add several AI players to the game.
Communication with clients is done by a CServerNet object, possibly by using an
indirect way through CPlayer-derived objects.
This is the most simple of the three programs. This program always uses one CClientSim instance an either a CPhysics or a CApproximation instance, and like the other programs, it is able to create several CAIPlayer-instances.