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

Gratuitous Tank Battles Alpha Footage

Ok here is a video of me self-consciously talking about GTB and playing it. It’s one of those actual gameplay no-tricks no-bullshit videos rather than the ‘target-render’ bullshot crap and touched-up recorded at half speed then sped up to look smooth things that a lot of big name publishers do. I just ran fraps while I messed about shooting stuff, and talked over it. My voice is a little too quiet here and there, but I always underestimate the SFX noises, and I have to capture both audio to one channel so it isn’t editable. Damn :D

The video is just showing some battles, not the level editor or the unit editor, or any online stuff (still most of that to do…) so its only a snapshot of the traditional tower-defense side of the game, albeit playing as attacker and defender, and with a tad more detail and explodyness than most TD games I hope :D.
let me know your thoughts, and please retweet, link, share, tell your favorite news sites about it etc. I might start doing a lot more in-dev videos about the game, I think they are a bit More interesting than just a normal blog post. What do you reckon?

Getting Gratuitous Tank Battles to run on my laptop

So…. it runs! and it runs in places at 60FPS, but in other places….not.

My dell video card has a 64MB VRAM intel GMA chipset, so hardly a gaming laptop, but my aim was to get GTB to at least run on it, even if the framerate sucked. That way, I know people with 128MB or 256MB cards should be fine, and I’d like to keep the min spec as low as I can.

The game already had a ton of stuff you could turn off, such as shadows, shaders etc, but running it on the Dell, and then profiling it using the awesome free intel GMA tools showed up a ton of stuff that I could do to increase the initial 20FPS rate. These were:

  • Realise that the refresh rate on the dell was set at 40FPS not 60FPS initally, hence making an artificially low limit. DOH!
  • Removing a redundant Clear() at the start of each frame. I fill the screen anyway, so why bother? I don’t use a Z-buffer.
  • Removing some render-target sets and clears when the shader options were turned off. With these off, I can render direct to the back buffer, old-school style and save time on render target changes.
  • Adding code that detects a jpg when loaded, and mip-maps it. Previously, they had no mip maps at all. Could possibly reduce some memory consumption
  • Add a graphical detail slider to options which can turn off a bunch of frilly details like window shadows, and drifting smoke on menu screens.
  • Providing a separate list of lower-res textures that get used in some cases when the graphical detail slider is below 25%. Such as mech legs and the shadow maps for scenarios. Any texture of 2048 or higher gets a lower res replacement. I had tried auto-scaling them on load, but this gave unexplained errors and I don’t trust D3DX to do this reliably on all video cards to be honest, so separate low-res textures it is.

I think the biggest wins were the texture-size reductions and the removal of the render target clears. It was interesting to note that the dell considered the game to be GPU limited, despite it being a fairly old and crappy chip (and only a single core). I guess at 1920×1200 res with all the options on for the desktop, things may be very different though.

Things may start to race ahead from here. The game is definitely very playable in its basic form, with the majority of extra work now likely to be the online challenge and integration stuff. That will take months, but still, the end is definitely in sight.

 

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!

 

 

Carving practical design from wooly ideas

As usual, my hand-wavy ideas make no sense when I start coding. This happens a lot. The current crisis is the idea that you can either play against adaptive AI, or a ‘recording’ made by you, or someone else.

So when you are placing turrets, either the AI is dynamically placing creeps to attack you, or it is just reading from a script like a normal TD game. The twist is that the script could be pre-recorded by me, or by another player (in the case of challenge maps) or even by you. Which means if you play an absolute blinder of a game in attack mode, you could then swivel round and play defense, against your own attack units and decisions, just like you can race against yourself in some racing games.

Problem is… I hadn’t considered that this only works for attacking units, not as defense. You can’t assume a slot is freed up as defense deployer, so it doesn’t work out. It’s dodgy enough as an attacker, given possible traffic jams…

Anyway, that isn’t a big deal. This is a cool ‘extra’ feature for A TD game. People will understand its only an option as defender. What’s a bit clunky is that it means coding some awkward sounding dialog at the start of a game to say

“Hey, you want to play against adaptive AI, or you want to play against the included, pre-scripted units?”

as well as

“Would you like the adaptive AI to use the included units, or to be able to use all your units too?”

I’m sure it will look ok. People like options right?