Tuesday, 29 January 2019

Asset manager

Now that the source code is going to be released I realized it could be useful to talk about it even before release to explain my programming style and thinking. One of the newest module (I'm going to talk a lot about modules which are not a "built-in" feature in C++, yet very useful way to handle large projects) is asset manager. It's a collection of higher level routines for stuff like displaying some graphics and working with menu data etc.

The reason for asset manager is remove some of those higher level includes from "low" level modules. An example would be Add_Player_Races which, as the name says, adds playable races to a menu in character selection. This used to be in Monster Type module which is static data for creatures, but you kind of want to keep simpler modules clean from gui stuff or whatever. As clean as possible anyway.

A problem related to asset manager are procedural functions in nameplaces which in many cases belong to some type of class. So there will be a clean up of those, because I think I got a little bit too excited about "procedural" programming in some cases. It does work in generic cases though, when you create functions that can be accessed from anywhere without binding them to a specific class.