Warming Up
by Joe on Sep.11, 2011, under Battle for Polaris, Development
Just a small update here. After blowing the dust off my old CodeBlocks project and getting it to build again, I’ve been doing bits and pieces of work refactoring and tidying up Battle for Polaris.
I’ve been starting to use Git for source control. It’s horrifying how I never used any version control systems for my own personal and university projects – they are not just for team projects. I remember with NeTron I got myself into a bit of a quagmire with threading bugs, when my older code worked fine, and had to spend hours tidying it up due to lack of any kind of ability to look at history or revert. Once I’m not too ashamed of my code I might even start hosting some of my things on a site like github
One thing I’ve noticed, coming back to code I wrote when I was less experienced, is that my code is actually pretty tidy. This could be due to the fact that I’m now used to having to deal with other people’s code, and everything is nice and consistent for mine.
The real problem is a bit of a lack of reusability – that is, vast swathes of my code is “game-specific” where a lot of the functionality could be moved into common code. What I have been doing is separating the code into projects “BfPGame” for game-specific code and “BfPEngine” for code that can be generalised – not that what I have so far could really be considered an “Engine” in any real sense.
I now have something resembling a physics engine, creatively dubbed “JFPhysics”, that should be reusable for another game. I also have some generic game state code, some of which the physics engine relies upon, and most of the OGRE framework code. There’s also utility code, such as code for calculating aim and turn vectors, vector randomisation, intersection code, and so on.
There are still some things I could do on this front, particularly in separation of control and state code. But for now I’m going to move onto some more interesting things:
- Linux. I’ve looked through the code, and there’s nothing obviously platform specific in it, thanks to my use of OGRE and other such libraries. The main problem is that I’ve only got my project to build with a fairly old version of OGRE/CEGUI so far, not to mention the fact that my old install of Gentoo is a bit “borked” right now, but with those issues solved the Linux version should be a breeze.
- Sound. Currently the game has no sound, though admittedly this makes it rather realistic for a space game. Some music and basic beep-boops and engine rumbles would probably add quite a bit to the atmosphere of the game.
- AI and gameplay improvements. I want to make it more challenging, particularly in how AI ships manouevre; currently they can’t even strafe. I’m going to look into adding some little bits of features towards my desired end of making the game more sandbox-y, such as station docking and AI traffic. First step is drawing out detailed plans for these.
I guess this is mostly for my benefit, but I will be updating as I step up the progress in BfP. Nothing has come of the Roguelike thing yet, but hopefully there’ll be progress updates for that too, once I’ve gotten over the initial barrier of getting the damn thing working.