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

A not so trivial change

When you think about adding a feature to an existing game, it often sounds much simpler than it will be. Here is an example from today.
After a lot of consideration, I decided to add new ‘carrier support’ modules to cruisers. These would act as mobile repair yards for fighters. If you gave fighetrs the ‘cautious’ order, when suitably damaged, they will seek out the closest cruiser with a carrier module, head there, dock, get repaired, and return to battle.

Now there is a lot of code associated with the AI for doing that, and the UI for displaying it etc, but that’s all the code you factor-in and expect to write, so that isn’t the problem. The extra work, comes from all the stuff you hadn’t considered.

I needed code to prevent docked ships shooting, being tractored, being affected by shock waves, or targeted by enemy ships. That’s all pretty reasonable. Then I needed code so that on docking, the fighters would choose the most sensible module for multi-bay carriers where one was damaged, or had a big queue of fighters, plus handle exploding carriers and damaged carrier modules.

But then I started looking at the visuals. The fighters were just flying on top of the cruisers, then vanishing whilst docked. Clearly this sucked, and it would look cooler if the fighters flew ‘under’ the cruisers and re-appeared there. This would look like they docked in hangers under the ship.

BUT! in GSB ALL the fighters fly over the top of cruisers. It’s a rendering optimisation, which nobody notices. So I had to code a newer system where fighters *could* fly under as well as over the cruisers. This just means putting them into two groups randomly, looks cool, and is still pretty fast. And this is where it gets interesting.

With this cunning new system, as a fighter approaches a cruiser I can just ‘force’ it to toggle to an ‘underneath’ group, and thus it will look cool. However, it may not already be an underneath one, and it *may* be on top of a cruiser at the point at which I realise I need to do that. So there is a danger it may suddenly ‘ping’ underneath a ship horribly as I’m watching.

I can set a flag that means the change is pending, and only do it when its offscreen, but that might not always be possible. At some point I need to either just risk it, or do a lot of intersection tests to ensure its ‘safe’ to jump underneath. Ideally I flag this as something to do in a frame where there is some CPU headroom (existing code in the game checks this, and does other similar tasks in those gaps)

And there is one final hiccup. Over time, as every fighter gets repaired, they will eventually all end up ‘underneath’ cruisers. Which will not look right. I need to tag fighters as ‘needing to toggle above’ when they are next offscreen, just like I did the other way around.

This is all the code people forget about, and is why game programmers suck so badly at putting together schedules :D

Future Possibilities in the world of Gratuitousness

Some ideas I’m thinking about:

1) Carriers. Basically ships would have a carrier module that would let them repair fighters. the fighters would get a new order to return to base after X damage, and after Y time docked underneath the parent cruiser, the fighter could launch totally repaired. Probably an expensive or heavy module. This needs new orders, module and of course lots of balancing.

2) Scenario-Limits. A mission can be defined where there are more complex restrictions on the fleet other than pilots and cost. A crew limit, or a limit on the number of missile modules or plasma turrets. Maybe a mission where there can only be one third of the budget spent on cruisers, etc…

3) Drones. A module launches not dumb missiles, but active drones that hunt down and shoot enemy fighters, or clamp onto enemy armor and drill through it slowly over time. They can be shot down by point defence weapons.

4) Increased area of effect rule. Missiles in-flight can be vaporised by the blast waves from exploding ships

5) Anti-Missile Missiles. Another form of anti-missile defence.

6) Shielded Missiles. (take multiple PD hits)

7) Gravity Bombs Ultra slow missiles which drift transparently through enemy shields.

8) Multi-source beam weapons (several beams converge on one point, allowing multiple hardpoints to join forces to fire a single more deadly beam).

9) Decoy transmitters. Allows a fighter to impersonate a cruiser or frigate for short periods to draw enemy fire.

I doubt any of this will make it into the games release. I suspect a lot of it will end up in the game eventually, either through expansion packs, modding or just extra free content. Thoughts?

Gratuitous Tank Pictures

I can’t be the only WW2 obsessed geek here? Anyway, I visited the huge Bovington tank Museum a few days ago (I was away a day, hence not much blogging).

Anyway, here are some gratuitous pics of the real life versions of tanks you normally see only in Company Of Heroes:

Treyarch Glider Tank

German Hetzer:

German Goliath (pesky things)

Tiger, with dorky indie developer to show scale

How do you put a cat in a box?

Ok, this isn’t game related…

I’m moving house soon, and it’s my birthday soon, and this all conflicts with the whole ‘releasing gratuitous space battles’ thing as well, so its’ going to be an insane few weeks. The stress of both getting older AND releasing my new game AND moving house is all quite high, but it all pales into insignificance next to this:

Her name is Jadzia, and she is one of two cats we have. At an appointed time, with little margin for error, I need to stick her in a cat box, and drive hundreds of miles to the new house. She is likely to ‘resist’ this.

Jadzia has not been to the vets in years, because we just cannot put her in a box. She fights BADLY. She is normally fine, you can stroke her, and even pick her up for maybe one or two seconds at most. she will sit on your lap for hours, but she hates being put into a box, she has claws like wolverine, and she knows how to use them. She is very very aware of people ‘planning’ things, she moves like lightning and she picks up on the slightest unusual thing.

Tell me your tips, especially if you have a similar cat. Things we have tried:

1) Locking the cat flaps and trapping her in a room first. No joy, she will break through a locked cat flap by force, and chasing her around the room tires us before tiring her.  We are considering using paving slabs to effectively brick up the cat flaps.

2) leaving an open cat box next to her food so she isn’t scared of it. This works, she’s not scared of its presence, but knows when she’s going into it. She will not eat food if you place the bowl in there. She is that clever.

Everyone suggests wrapping her in a towel, which sounds easy, but I bet it isn’t. I’m also wary of suffocating her. My heart rate actually goes up when I even think about this, because it brings back flashbacks to ‘nam from when I’ve tried before. I’ve lost a fair amount of blood doing it in the past. A friend of mine offered to lend me his welding gauntlets, but I suspect that might tip her off. The vet says there is no safe sedative for a cat that isn’t given by injection.

If I could find a way to record my attempt on a webcam for everyone’s amusement I would, but I doubt that’ll happen.

Are you a potato or a rock band?

Games and game developers seem to be caught in a price war these days. I hear a lot of developers expressing despair over the fact that games are always on sale, or discounted, or sold in bundles, and that ‘big name publisher X’ has just released its new game for 10 dollars, or 1 dollar, or 99 cents, or free!

Understandably, indie devs sometimes worry about how they can possibly compete with this. They worry wrongly, because they are misunderstanding what it is they sell. You might think knowing what you sell is flipping obvious, but it’s not. My favourite quote from ‘what they never teach you at harvard business school’ is from the guy who ran rolex. He was asked about the watch business, and he replied “I have no idea about the watch business. I’m not in the watch business. I’m in the luxury business’. he is absolutely darned right.

Most people making indie games don’t get that. They think their games are commodities, competing against identical other ones, like a potato. But they aren’t. games aren’t potatoes, they are rock bands.
Check this out:

As a clue, the first one a potato. Unless you are some sort of potato fetishist, you don’t know the variety. It might be maris piper, but who the hell cares?  It’s a potato, and we buy them as cheap as we can find them. Now look at the next one. Your reaction is likely

“What a bunch of dorks” or…

“Behold the kings of metal! Real men play on ten!”

But your reaction will NOT be ‘well they are a rock band, and depending on the price of their music I may purchase it, or a Dire Straits / Killers / Police  / Whoever album instead”

In fact, it would seem weird to feel that way about music. And this is how people feel about GOOD, ORIGINAL games. Generic Match-3 games are potatoes, and they will inevitably get sold for the price of spuds. But decent games (look at the premium pricing for COD:MW 2) and original games can charge what they think they are truly worth. They are rock bands. The existence of other bands is irrelevant. There is only one Manowar and there is only one Little Big Planet.

Try to make less potato-like games.