Save Games, Part Two

Been doing more work on figuring out how to manage data in such a way that I won’t go insane, trying to manage the saved games for MMORPG Tycoon 2.

I think I’ve now basically settled on a data description system which isn’t too onerous to use, and which has no performance penalty during runtime.  With that said, though, it does run counter to many of the core values I’ve tried to instil in the VectorStorm library;  that code should be clearly understandable at a casual glance, that it shouldn’t contain any “clever tricks”, and that the use of macros and templates should be severely limited.  As such, I probably won’t make this system part of the core VectorStorm library;  it’s just not the sort of thing that I want new programmers stressing out over, when they check out the code.  And it’s totally not needed for games which are simpler than MMORPG Tycoon 2.  (And even with more than a decade of making commercial games, I can quite comfortably attest that I’ve never before worked on a game which was anywhere near as complicated as MMORPG Tycoon 2)

The system is about halfway implemented now;  I probably won’t have it fully finished until sometime this weekend, but I can now see the whole structure, and am quite pleased with it;  it’ll make many bits of code much more bearable!

In other news, I’ve adjusted the Mac build of VectorStorm games to compile VectorStorm as a static library, as is done in the Windows build.  Previously, Mac builds compiled VectorStorm as a framework which was then embedded into the app bundle;  Windows folks can think of an embedded framework as a private dll file;  it’s not shared with other applications, but it still links to the game dynamically at runtime.  This was leading to some strange behaviour sometimes, particularly on objects inside the VectorStorm library which were derived from the “mixSingleton” templated class.  Those issues have all now been sorted out, now that it’s a static library instead.  (these issues never caused problems in Win32 builds, which was already building VectorStorm as a static library)