Category Archives: gratuitous tank battles

…has been released. let there be much rejoicing. The game auto-updates once a day, so you don’t need to do anything. Lets take a look at the list of changes!

1) Fixed bug where you could invite a friend with no name.
2) Added the hull size and size type to the hull picker dialog on the unit design
 screen.
3) Holding down G as you drag props on the level editor now snaps them to a grid
4) Support for new 'starting year' for scenarios and equipment to set a battle
 before lasers and mechs etc.
5) Re-balanced the missile modules (slower rate of fire).
6) Re-balanced the ambulance/command/repair/supply trucks to have less hitpoints.
7) The units on the unit customisation screen now render shadows.
8) Changed targeting calculation so the fastest speed of firing and target unit
 is used, not just the target unit.
9) Battles now start with the map focused upon one of the entry points for
 attacking units.
10) Different vehicle targeting systems now have different weights.
11) Unit Design screen now filters modules to only show modules that the
 current unit has a slot to deploy.
12) Various AI balance changes.

The big items are probably the re-balancing and the change to the unit design screen (11), which I think is much better. Here is a screenshot of that screen if you selected an ambulance hull with the old version:

And now with the new version:

Much simpler huh? I don’t know why I had not done this earlier, but in any case, the screen now only shows modules that the current selected hull has a slot for, which hopefully makes that screen seem a lot less daunting for people who buy GTB thinking it’s just tower defense and think WTF? when they get to that screen. This was a screw-up on my part, because generally I feel that a good design rule is never to clutter the players view with information that they definitely don’t need right now.

There are a lot of under-the-hood changes to AI and other code affecting battles which is all a bit arcane to explain, but basically the AI should be a bit more sensible now, the various weapons and modules are more balanced, (in my humble opinion) and things should be a lot more playable in general. I don’t consider this patch to be the ‘last word’ on GTB. People who bought GSB know I love to improve and finesse a game long after release. I actually have a GSB patch (a kinda scary one) sat there daring me to release it, even all these thousands of years later.

I’ve also patched the demo for the game. I just uploaded the new steam demo, and I’ll be bunging the direct-downloaded version up on my site soon.

I’m working on a GTB expansion, which means a lot of playing the game to balance out some new missions. In doing so, a few things have occurred to me:

1) Missiles are overpowered. I keep thinking their limited effective range (max-min) compensates for it, but it does not, because there is always *something* for them to shoot at. I may have to nerf them.

2) I really needed to have separate graphics for command/supply trucks and also for repair/command bunkers. This was me saving money, and it was a false economy. I need to fix it.

3) I may have been a bit too tight in terms of setting the supply-limits in battles. Constantly hitting them means you tend to loiter by the entrance tiles and not enjoy the full area of battle when attacking. They may need tweaking too.

There are also a bunch of graphical mistakes I made, which I should fix theoretically, but would involve considerable re-work by artists at unjustifiable expense. It’s such a delicate balancing act to know when you are ‘speculating to accumulate’ versus ‘throwing money away for no gain’. I suspect I *do* need to get a few more improved bits of artwork done though.

Games are never finished, you just run out of income and have to make something new :D

I’m working on some new stuff. I thought I might as well upload some eye candy. Here is what I am working on today, click the smaller images for larger versions. New units and props and maps basically, And restricting some battles to just WW2 era technology (no lasers or mechs), to give the game a ‘WW2 Tower Defense’ mode, in effect.

Sooo… that’s enough time sat on a beach reading books. Especially if you sunburn easily and then really hurt your foot kicking a beam, and have to limp everywhere. At least there was a tropical storm to liven things up! I’m not back in the world of debugging, huge towering inboxes, and 1,001 things to do before breakfast. (Not to mention no more huge buffest at breakfast…darn…). I miss the cocktails and the live music :( (Also it’s amazing the quality of the musicians just playing in restaurants in the caribbean).

looking for mac testers

One thing on my todo list is to find some mac testers for Gratuitous Tank Battles. Have you already bought the game and want to test the mac copy? if so, do me a favour and email cliff AT positech dot co dot uk. I can only really do that for people who bought direct from me (because that’s the only way I can verify buyers), and if I don’t reply, it means a bunch of people got in there before you. Please use the email address you bought the game from.

My foot really hurts…

Right from it’s initial launch on steam, there was a bug reported in Gratuitous Tank Battles for a tiny subset of steam players. The bug was basically that the game ran horribly slowly, with stuttering and skipping music.

Regular blog readers will know I am a bit obsessive about optimisation, so naturally this seemed weird to me. Right from the start I doubted that this was actually the games graphics engine or core gameplay code running slow. Not given the specs of the users reporting it, which was a wide cross-section of hardware types. Happily, this was confirmed by the realisation that running the game from the .exe, outside of steam, enabled it to run perfectly. A good workaround, but not actually a fix.

This was followed by weeks, maybe even months of me investigating what on earth it could be.

Initially, I assumed it must be something about the steam integration code. So that resulted in a ton of going through it with a fine tooth comb and checking every parameter, asking valve if I was doing it right, checking with other devs how I was doing it compared with them etc. I ended up moving the code that initialised steams systems from one point in my code to another, as they recommended, but there was no change. I also changed a callback to run every 100 frames rather than every frame, and again, no difference.

Then, finally we found some helpful players who not only had the bug, but were happy to run diagnostic code on their PC for valve to analyze. A very helpful guy from valve then crunched through it, and found that an alarming amount of time was spent in the sound library, and in Heapvalidate(), called from it. This then led to another 48 hours of me looking at heap validation code, memory errors, installing xperf, the application verifier, trying (and failing) to download Microsoft platform SDKs, lots more poking and prodding…

and then eventually  I got a reply from the sound library people suggesting that yes, it *might* be their code occasionally calling HeapValidate() all the time, and to upgrade to the latest build.

So I did that and it has fixed it…(afaik)

How annoying. The one piece of code in the game not written by me, and it had a bug in it! At least it’s fixed now, so all is well. I bet my code has bugs too :D We still don’t know why it was actually caused by the interaction of the game with steam, but that just seemed to be the randomish trigger for the errant memory checking.

I have a new ninja PC on order. I dread re-installing anything. Is there a magic new way to do this, or will I sit there downloading and installing stuff for 2 or 3 days again?