Archive for August, 2007

Back to the drawing board…

Saturday, August 25th, 2007

After some enthusiastic coding with the aim to integrate the ODE physics engine into my game engine, I ended up in a dead end with typical “who is using who” class problems (i.e. circular class usage). It all boiled down to a too flat class structure, so I realized that it was time to return to the drawing board - which meant Dia in my case.

After some work, I have now come up with a class structure that I think will hold. Basically, the “world object” class is now  the owner of three sub classes: GfxObject (the visual triangle object), PhysicsObject (the ODE object) and SoundObject (FMOD sound(s) for each world object, such as engine sounds etc).

The main point is that now the graphics engine, the physics engine and the sound engine are separated from each other, which will probably be a good thing once (if) network play  is implemented (i.e. a network server can easily be designed to run with graphics and sound disabled).

I am also currently looking into the art of collision detection. I believe I will have to write my own collision routines (i.e. mesh/mesh intersection) in order to best utilize the mesh instancing functionality of the game engine. It will probably save alot of memory too by avoiding duplicate representations of the triangle meshes (if you use ODE’s built in triangle mesh collision routines, ODE needs a copy of the mesh too).

Sound with FMOD

Saturday, August 4th, 2007

I have now created a new Game class, which contains the main game loop, and a SoundCore class, which wraps the FMOD API, so now there is sound in the game engine too! So far, I have just included a background soundtrack, but 3D sound effects will also be added.

Currently, I am preparing the source code and directory structure for version control at Sourceforge.