Developments in VectorStorm engine

A quick note on what’s going on with the VectorStorm engine.

I’m midway through converting VectorStorm into a dll/framework. Once this is completed, I’ll be switching VectorStorm over to a different, more permissive license; most likely the LGPL, as that would make our license compatible with that used by SDL and SDL_mixer. This would have the benefit that I could theoretically bundle all those libraries together into a single .dll, which would make it much easier to start up a new project, to avoid version conflicts between the various libraries, and would really cut down on the dll clutter in my games.

Additionally, there are now “VS_VectorStorm.h” and “VS_VectorStorm_Debug.h” files, which are intended to be used as prefix files;  they include every header in VectorStorm, so there’s no more micromanagement of which headers you need to include, and it no longer requires explicitly adding every VectorStorm directory to your game’s header search path.  All in all, it’s just intended to make VectorStorm a heap easier to use.

I already have this bundling working in the Mac build; now I just need to get it going under Win32.

But I am banging my head against one problem. My singleton template class uses a static variable to store the pointer to the single instance of each particular class. In the Mac build at least, this ends up meaning that the static variable is created both inside the framework and inside the game code, and which of the two variables your code ends up accessing is pretty much random. This can lead to some really difficult to debug bugs, where some code finds a class instance, and other code doesn’t.

It feels like there should be a simple fix for this, but I can’t for the life of me figure out what it is, and Google isn’t being much help.

If anybody happens know the solve for this, I’d be thrilled to hear about it! :)