Fork me on GitHub

Code overview

Engine overview (large)

 

The code is mostly all c++, with a scattering of Lua (for AIs and gametypes). The c++ code is in the src directory, and the Lua scripts are part of the data which is loaded dynamically.

There are a number of libraries you will need to install to compile the source. For Linux, the list is in docs/dependencies.txt. Windows users have it even easier - install MSVC++2010 Express and then use the project in the tools/msvc2010 directory.

There are a number of docs in the docs directory. You should take a look in there if you get the chance. It's incomplete, but better than nothing.

 

There are a number of parts of the game engine which come together to form a complete game

All of the specifics of the various game aspects are stored in config files. These are grouped into mods. Multiple mods can be loaded at any given time. By default only one mod is loaded, cr, which provides all of the base data and 3D artwork.

Mod data can be accessed using the Mod and ModManager class. These contain lists of the various types which in-game objects are part of, such as WallType, ObjectType, etc.

In-game entities are a number of classes which all extend Entity. All entities refer to one of the mod classes, which contain data loaded from the config files. So any given Wall object has a position, angle, etc, as well as a number of properties provided by the relevant WallType class.

 

Most of the engine is in C++. There's also some Lua scripts for powering AIs and game types. The video output is all in one class which points to OpenGL, although there are other classes which can be compiled in instead (for porting in the future). The audio is structured the same way.

All data comes in from .conf files, which reference PNGs and OBJs and the like. That's all handled by the Mod and ModManager classes. Maps are loaded in a similar way (they are a zipped dir containing a .conf file).

All the physics simulation is provided by the excellent Bullet Physics library.