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

Back on the IPAD -> Gratuitous Pad Battles!

Ok, so after hurriedly yanking a slightly buggy version of GSB from the apple app-store, the IPAD version of GSB is back on sale and you can all go rush out and throw money at it right now. Hurrah! Here it is:

http://itunes.apple.com/gb/app/gratuitous-space-battles/id517457294?mt=8

(The expansion packs in the PC version will end up being added at some stage. The campaign add-on won’t make it to ipad, it’s just insanely big and complex and involved and not pad-friendly)


Here are a few lessons learned from the ipad experience thus far:

1) The ipad has hardly any memory. Developing on PC, then squeezing it onto ipad is seriously hard!

2) A game where you zoom in and out and drag stuff around is really cool to play on the ipad. It feels very l33t.

3) There seems to be basically no way to get any attention on the app store unless apple chooses you. Admit it, you all only found GSB by searching.  Even the category search function seems broken on my ipad 2. It’s a trainwreck, compared to other portals.

4) Everyone who insists that nobody buys ipad games > $0.99 is just wrong. They do.

If you are a high-powered famous and influential mac-blog-owner or reviewer with a bazillion readers, and you have NOT got a press-review copy of GSB on ipad, just email me, and I will see what I can do.

In other news…. very close to setting the GTB release date now. It will also be on GamersGate, Impulse and Steam. Yay!

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