February 8, 2010
Camera completed, runtime type information added, base level classes

Today I’ve completed the camera functionality for the game. At first I’ve coded everything using the DXUT cameras but after a while it started looking like a bit of over-engineering so I just did it my own way - which is the same thing but using the logic I’ve used throughout the rest of my code. The cameras are inserted in the scenegraph and can be easily manipulated from anywhere in the game; then new cameras can be added on demand. I’ve also added global access to the scene root, a functionality vital when I’ll be doing collision detection and AI later.

Runtime type information allows knowing the type of an object on the fly. While this is a functionality available in C# it takes a bit of extra work to make it possible in C++ since it’s not built in. I’ve added this functionality to the base object so every game object can be checked for its type from anywhere. This is very useful when some algorithm is running through the game entities list and needs to perform some action only on some specific type of objects.

The basic level functionality involves automatically maintaining the scenegraph in the background so the higher level game states don’t have to do any extra work. So all it takes now for having a functional game is to create a game state that inherits from the base level. Then any entities can be easily created and added in the scene by just one line of code and they will populate the world and rendered on the screen.

Except the main points I’m focusing on my daily reports I do make a lot of tweaks throughout the engine code but usually they involve a couple of lines that are too technical to explain here or they simply don’t worth to be mentioned.