I am currently building my first game/game-engine with c++. Before even thinking too much about the actual game idea, I want to make sure that the engine I am creating is good and works as I want.
I am building my engine very object oriented way. This way it is easier for me to manage the system, and makes it faster to create complex code at the later process of the development. But I also want to make the system flexible enough to allow me to change the way how the engine works if needed.
I have just finished cvar system that the engine can use. (get,set variables) In future I will add ingame console that can change these variables. I will also add way to store the variables on config files.
Right now I am finishing logging system. It is not very complex system, but it is very important to have. The logging system takes advantage from the cvar system I have build, storing filepaths and settings there. It can log events to console, file or both.
To filter important messages from random game events I have designed 4 level system to filter messages.
- 0 = debug message (Example: ai debug messages, small changes, etc. Can be bit spammy)
- 1 = game events (Example: kills, deaths, inventory changes. Good information for statistic parsers)
- 2 = engine events (Example: map change, engine start, etc)
- 3= Critical error (Example: missing textures/files, failed to init SDL/engine. Game crashing bugs)
User can choose level for the logging. Example if user wants to only see engines messages, he could choose 2. Then he would see engine events and critical errors.
Some users may want to see more information on the console they can choose 1. With filter level 1 user can see everything else expect floody debug messages.
When debugging error, developer can set the level to 0 and get all information game can give. Making good log file to analyze later.
The project is currently under heavy development. I will post more when the project goes forward.