-
Notifications
You must be signed in to change notification settings - Fork 7
Engine design
MaxB3D is a large project that lacks extensive documentation. Therefore, this document is an attempt to familiarize anyone interested in what's 'under the hood', or a developer who simply wishes to get the most out MaxB3D in their application.
Central to MaxB3D's design is the utilization of BlitzMax's object-oriented type system and existing infastructure.
It has been designed to be extremely modular, a luxury afforded by the module system. This allows a developer to import only the necessary components required, thus reducing executable size. For an engine developer, it assists in maintaining such a large project.
At the heart of MaxB3D is the core module. This contains all the platform/API/implementation-independent code required to run a MaxB3D program.
The core module defines the following functional types:
- Textures and brushes
- Entities (Camera, lights, meshes, etc.)
- Worlds
And, the following abstract types:
- Animators
- Graphics drivers
- Physics/collision drivers
Every object that is drawn by MaxB3D is derived from TEntity.
In MaxB3D, every object belongs to a world, TWorld.
In the spirit of being modular, the core engine can be run alone, without the need for a graphics context. This could be useful in server environment where a GPU is not available, and most likely not needed. In addition, this independence also means that the graphics driver can be switched dynamically, without the need to restart the program.