Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Getting started

This explains The structure of projects and directories and The game skeleton. More concrete example is in the next section, Complete game example.

The structure

There are two MSVC projects: one for the engine, and one for your game. They are in one workspace. The "nothing" game (the game that does practically nothing) is provided - the skeleton. You make your game by inserting your code into the skeleton, make your classes, build your structures, etc.

You generally should not bother about "the engine" project nor the engine sources. If you do, be very very warned - you'll lose your time, your money, your life will be ruined and you'll eventually go to hell.

The directory structure:

The game skeleton

The initial game skeleton initializes the terrain, adds some entities to the world and sets them running around. It also creates the camera and controls it via user input.

There's simple entity class CMyEntity that extends base CEntity class, and also contains velocity, general purpose bit flags and a "decider" stuff - pointer to IDecider and a counter. Entity flags indicate whether the entity always stays on the terrain surface, whether it is affected by gravity, whether it touches the terrain at a moment, and whether it is killed and should be removed. Entity has single update() method that does the "physics" for the entity, keeps it in valid map boundaries and processes logic via decider.

Entity decider is an example of logic processing implementation: it gets called based on a counter (for example, every 3 updates) and it can do whatever it wants with the entity (change it's size, color, velocity, flags, see grids, etc.). You're not forced to using a IDecider - it's just an example.

Also there's game class CMyGame that extends base CBaseGame class. This is your "game", whose methods are called by the engine for some tasks (eg. initialization, game logic, input processing, etc.).


Prev: Introduction.
Next: Complete game example.


Generated on Thu Dec 5 17:27:58 2002 for LT Game Jam Session by doxygen1.2.17