Getting my Feet Wet Again

Getting my Feet Wet Again

Jeremy IMs me out of the blue, announcing that he’s made progress on porting Crixa to SDL on the PC. Wow! Much more exciting than anything I had going on. So I had to get into it myself. It’s been a good eight years since I looked at the source code, a hundred-fold collection of C++ files that I still have yet to fully grasp…

The first order of business was to find the source code and get it to compile. I have Microsoft Visual Studio 2003, and it was able to convert the Visual C 4.0 project files to the new format. Then it was a matter of figuring out how to get the damn thing to run, which required some fiddling to get it back into a semi-windowed mode. The original code base doesn’t have niceties like running in a window or being able to convert the graphics on-the-fly to match the current display mode…that’ll have to be fixed. Then setting the working directory to the folder with all the level files seemed to do the trick, and I was again running Crixa on my desktop. It holds up surprisingly well. There are also some crash bugs happening I don’t remembe that are memory related…not sure if it’s me, or if they’ve always been there and didn’t show up until today. Crixa is written in object oriented C++, which means that the memory allocation is done manually. This is highly error prone, so it’s completely possible that there are some doozies in there. The other major Crixa instability is probably the floating point math used in the physics simulation; there are cases that quantities become too small to operate on.

As I scanned through the hundreds of files that made up this project, I am somewhat in awe of its complexity. Rebuilding my own library from scratch entails quite a lot of work and testing to get even the most basic things working. I’ve got my work cut out for me.

0 Comments