The demo needs a bit of spring cleaning as it stands, but I just wanted to get it out there. Delta time is calculated but needs applying to all update methods, large and small. The Level and Brain classes are also very big and need splitting up. There are also a number of ‘TODO’ statements dotted around that need attending - small improvements in code elegance.
The demo is now being turned into a game which has been fully designed. The following changes will be made to allow this:
'Brain' will be split into a 'higher brain' class which will be able to accept one of any number of decision making modules, and a 'lower brain' class which will handle pathfinding and also call into sight, hearing and other sense routines, compile all the data and feed it into 'higher brain'.
'Level' will be overhauled to allow instantiation with a 'level description' function - allowing the generation of different maps.
The path table will also be stripped out and the real-time search will be re-implemented to allow for dynamic maps.
Agents will no longer exist as a lengthy chain of inheritance, but rather contain a number of classes allowing for agents that can include or exclude certain components.
All objects and entities able to be targeted will be derived from a super-type of GameObject; ‘TargetableGameObject’ - this just makes a lot of the code much simpler to implement and work with.
Levels will be generated from a hybrid Navigation Mesh / Spacial Partitioning system, and locations tracked automatically by GameObjects allowing for more complexity in behaviour and much more efficient calculations.
Finally all of it will be wrapped up in a nice, neat little menu system.