The voodoo of writing software
I’ve been working on the game engine for Kung Fu Legends for a while now and I’m slowly building it up. It could initialize a bunch of subsystems and print a message on the graphics plane. Real cutting-edge stuff. Anyway, there were a couple of minor things in the implementation that bugged me – my Manager class was written in a weird way with respect to the game loop, and my git repository started some ways into my development and I would have much preferred a complete history. Stupid minor things, but I wanted to rewrite what I had.
Moreover, I had some idea in my head of The Proper Thing To Do which was to separate the development of the game engine (graphics/sound/UI engine) from the game itself, and the best way to do that was to encapsulate it in a separate static and/or dynamic library. This way I had a Proper Division of the code responsibilities and could have parallel development on game and engine. I’d also have hand-made Makefiles because that was more portable and I had a better control over what I was compiling (previously I had used Eclipse’s generated makefiles).
So I tried this new approach. A few days later, I had to concede defeat. The way I was organizing my source code made the Makefiles annoying. And the Ogre3d libraries wouldn’t link against my source. And then my own source wouldn’t link against itself. And then when I updated Eclipse to achieve some daft goal with Makefiles, Eclipse would crash silently to the desktop as soon as I ran it. I’m not a bad programmer or organizer of software, so I don’t think it’s totally my fault. The only other thing I could think was that the Computing Gods had decided that I shouldn’t be messing with things and should just get on with development. To teach me a lesson they sent me plagues of linker errors and bizarre IDE faults.
I’ve since fixed the Eclipse issue and I’ve given up on hand-crafted Makefiles. Oh well. The whole little ordeal reminds me somehow of old MIT hack stories where clearly there is something supernatural going on in the world of computing and it’s not all bits and bytes. The Computing Gods are fickle, but they have good intentions.
Have you made a sacrifice to your compiler today?
Tags: geeky, programming