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

Humble Indie Bundle 4

So have you all seen this?

Quite a few people probably guessed it was coming due to my tux image tease, but GSB is part of the Humble Indie Bundle. Yes, that means there is a linux port of the base game, for people who prefer to run native linux builds I do NOT have the final linux installer yet, so if you want a linux build and you bought GSB direct from me (so I can verify the sale), then you will be entitled to it for free, once I have it. Don’t email me asking for it yet, because I can’t reply with a link, and it will get complex and bottlenecked. Obviously I’ll blog it when it’s all ready.

A few words about the bundle, and Gratuitous Space Battles being in it (as one of the ‘beat the average’ games).

Some people have expressed surprise about this move, because I rant about devaluing of games, and bundles a lot, so why am I doing this?

Firstly, it’s the beat the average game :D You can’t pay $0.01 and get GSB, can’t be done, so there is that in there.

Secondly, GSB is actually quite old now. It got updated a LOT, but it’s release was September 2009. It’s been full price everywhere for a long time, so I’m much more flexible regarding stuff like this at this stage in the games sales cycle.

Also, there is a new game coming in the first quarter of 2012, it can’t do any harm to remind people about GSB, and to get people who sat on the fence for those two years to grab a copy at a discounted price. Hopefully when GTB comes out they will be more inclined to buy it at full price rather than wait another two years. I hope!

I often talk very frankly about sales figures and games revenue, but that’s regarding direct sales. Humble Bundle is a proper publisher arrangement with contracts etc, so don’t ask me for financial details about splits etc, because I can’t talk about that.

As I typed this, the total raised has passed a million dollars. That’s good then  :D.

Platform fun

Wow. Getting GTB to run smoothly on my laptop might prove fun. Methinks it uses more horsepower than GSB did, at least judging by my first tests. The photo reflects badly from the GTB battles cloud-cover effect :(

But it runs, that’s the main thing. Time for some serious profiling on my min spec laptop now. Plus, GSB running on something called the ‘i-pad’. That looks fun!

 

 

Anatomy of a gratuitous bug

I think I’ve fixed a bug in the gratuitous space battles campaign game. I’ll know ‘officially’ soon, but it fixed it on my machine :D Here’s what was involved.

A player complained of a random crash bug at the end of some campaign battles. I could not ever reproduce it, and back-and-forth emails began. Eventually, this awesome customer provided me with exact steps to reproduce, and all their save game data to let me replicate it. First run through and….. nothing. It was fine. Roughly every third run-through, in release mode it crashed…

Step 1! Hurrah! it actually crashes for me. This is 50% of the battle because then I *KNOW* that it is the games fault, and not the gamers system, or software. This is good, although frustrating news.

Step 2! It crashes in debug mode. This is another 25% of the battle because I can actually see what data is corrupt. As it turned out, the ‘firstfleet’ pointer in the code that assigns captured ships to the players winning fleet is clearly trashed. How did this happen?

Step 3… debugging. It transpires that the firstfleet pointer is accessed multiple times before this point, and after being initialised, confirming that it *must* have been valid, and becomes invalid between initialisation and access when adding captured ships to the fleet. This means we  can step through and watch what happens, if I break on initialisation..

Step 4 discovery! Stepping through the code confirms my suspicions. Once the battle ends, the code updates all the players fleets and removes ships that died in battle. Then, other code innocently picks the first of the players fleets in the battle, and initialises a dialog box listing the enemy captured ships that will be assigned to the fleet. Later…. *drum roll* it deletes any fleets that are now empty. Can you see the bug yet?

Step 5: fix! Changing the code that naievely picked the ‘first fleet’ to pick the first player fleet that still has some intact ships ensures that the later deletion of an empty fleet, and invalidation of the pointer is harmless, because the captured ships are now getting added to a surviving fleet. Bug probably fixed, pending the player confirming that a new exe fixes it.

Why did I not spot this bug six months ago? Well here is what has to happen.

  1. The player has to fight a battle with multiple fleets at once (common).
  2. He has to win (fairly common)
  3. The ai has to lose by the right margin to leave some captured ships (fairly rare).
  4. The winning player has to have enough ships removed from the *first* fleet in the list to have that fleet entirely deleted, despite winning overall. (pretty darned rare).

Simply put, This didn’t happen to me once in testing. It hasn’t happened to many players either, as I understand it. And if it has happened to you… I may have good news :D

Gratuitous Space Patch 1.57

Just made patch 1.57 live. it will auto update over the next 24 hours, and make it to steam once a day or so has passed without incident. It’s mostly stuff to support the parasites expansion.

version 1.57
1) New Feature: Support for longer race descriptions.
2) New Feature: Modding support for custom bullets textures.
3) Support for return-to-sender capability on missiles.
4) Support for more than one plasma missile in flight at any one time, per launcher (if configured for that module)
5) Support for flak guns (bullet modules with area-of-effect damage).