Game Design, Programming and running a one-man games business…

Work For Idle Hands

One thing GSB does that I’m quite proud of, is run an ‘idle manager’ to smooth out the frame rate. In concept, it’s pretty simple. There are some jobs that need doing in the near future, but not *NOW*, and some that are optional. The idle manager works out that we have some spare time, and does them accordingly. In code terms it’s a lot more involved.

GSB has a target frame rate, and checks the time since last frame in the main game loop. If there is some ‘spare’ time before the next frame, it tells the idlemanager, and checks again once the idlemanager has finished. The idle manager has a list of tasks, and it cycles through them in turn. Two of the common tasks are these:

1) Check that we aren’t running low on any pre-cached particle effects, and if we are, pre-cache some new ones ready for future use

2) Check if any laser blasts which are missing their target happen to intersect with some debris. If they do, make the debris explode.

task 1) is vital for performance, task 2) is optional graphical fluff.

The implementation of an idle manager is cool because it allows you to use the fluctuating rendering-demands per frame to your advantage. It also means you eek as much usage as possible out of a single processor core. In multi-core, multi-threaded systems, this is all done much better by having a separate thread, which can spin off and do this stuff at your leisure. There can be synchronisation issues in that case though (I don’t want to change the list of cached particles while another thread is altering them too etc).

If you can’t be bothered with the hassle of multithreading, I recommend implementing something like this idle manager at the very least, assuming performance is vaguely an issue for you. I’m writing the idle code for my new game right now, and it will be a bit cleverer, and more involevd and possibly multithread stuff too. I hate to think the game would drop a frame when it could be avoided by doing this sort of stuff.

Gratuitous Modding Competition Winner

It’s actually nothing to do with me directly, but the enthusiastic modders who fiddle with Gratuitous Space Battles (and there are a LOT of them), have been running a competition on the GSB modding forum for the last few weeks. I blogged one of the designs a while ago, one I really liked. Anyway, there has been voting going on and a winner picked, and here is the ship with the most votes:

It’s extremely awesome to see people producing new ships for the game, and obviously what they are doing is cutting and pasting and tweaking and blending the original ship grpahics to make much bigger new ones. I also released some of the raw lightwave models, and did some re-renders, because I’m a big fan of decent modding, I see there is also a fan-made editor for the game which is probably better than my own internal tools (almost certainly so!). Some of the stuff that’s being modded into the game is really cool.

I’m well aware of the fact that GSB wouldn’t have any modding community at all if it was not for

1) leaving all the games art files in native, usable formats like jpg and DDS, so people could see them and change them, rather than hidden in some pak or zip file.

2) Having forums on my site for people to chat about the game and discuss it. Some indies see forums as more trouble than they are worth, but I strongly disagree :D

Thanks to everyone still playing the game and producing mods for keeping interest in the game alive. I look forward to seeing people mod the campaign game, now it has a proper directory structure that trivially supports extra maps. (It’s still not a modders paradise, but I hope my next game will nudge further that way). If you are a big fan of GSB and want more ships, or to change some settings, or fiddle around, have a look at the modding forums, there is a ton of stuff there.

GSB patch error, and how to fix it

The auto-patching screwed up for GSB yesterday. It was a typo. Sorry!

Anyway, it’s fixed server-side, so you just need to re-grab the patch, here is how to do this:

Delete this file:

\my documents\my gamesgratuitous space battles\patches\GSBPatch156.exe

Delete this file:

\my documents\my gamesgratuitous space battles\web\up

Then re-run the game.

The symptoms for this bug are:

1) An error “The program cannot start due to a program incompatibility…” or similar

2) the downlaoded patch seen above is only 2k in size…

GSB update, new campaign maps, much easier

A few weeks ago I selected a new padawan to do some map design for Gratuitous Space Battles. His name was Carsten Lensch and you are all about to see his work. Today marks release day for version 1.56 of GSB, which has some major campaign updates. Here is what’s new:

Firstly (and most obviously) there are new maps. Instead of the one, static map in the original release of Galactic Conquest, there are now 4, all hand-designed, so they have interesting setups and chokepoints. They play quiet differently. If you have played the basic map a few times and think you have your big strategy all worked out, you will enjoy playing with the new ones.

Secondly, the campaign has been tweaked and adjusted heavily on the play-balance side to make it tons easier. If the game was unplayably hard for you before (even on the lowest of the 3 difficulty settings) you should definitely give the new version a try. Of course, you can still switch to high difficulty if you now find it a tad easy :D

Thirdly, a whole bunch of crash bugs and minor bugs have been tracked down and fixed. Anyone who found that the game would occasionally freeze at the end of a turn should find that squashed, there are some performance boosts and some rare crashes to desktop are fixed. Plus, all you people who had a problem clicking the buttons at the very top of the deployment screen should find that fixed too, plus the flickering of the titlebar now and then. HURRAH.

This update is all free, but for technical geeky reasons it can’t be entirely done as a new auto-patch. The game will get auto-patched to version 1.56, but to get the new campaign maps you need to either re-download the campaign installer, or run this patch:

Galactic Conquest Patch

Make sure you install it, like everything to the same folder as GSB, ignore any messages saying the folder exists, it should do :D. My next game will handle all this sort of stuff much better, it’s my #1 tech support issue (people installing the game in the wrong place).

Have fun!

Website Experiment #2

Here is another 2 variations on my GSB homepage.

New version

Old Version

The new version has some extra content at the bottom, I measured how much of a boost that gave to the percentage of people grabbing the demo. It is a small, but noticeable difference.

GWO says its within error margins, but over 10 days it’s consistantly outperformed, so I consider it worth switching to. Say GSB earns $50,000 over a year, 2.28% improvement is $1,140, for changing some html. Now you see why I do this stuff :D Imagine how much a change to amazons home page must earn them…