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

Fixing a few obscure, but nasty bugs

I’ve found a few big bugs that people don’t seem to have spotted, or at least, not in the numbers you would assume would have spotted them.
First is a bug relating to how bonuses are applied to modules. In code terms it was a fairly standard ‘doh’ mistake where you override virtual functions but forget to call the base function in the derived one. (obviously sometimes that’s legit, but here it was a mistake).
The upshot of this is that for some modules which had certain bonuses, such as shield modules, the base hull bonus got skipped. It was calculated ok on the design screen, but not in the battle. As a result, there are a lot of ships that are partially missing their hull bonuses, until now…

The second bug is less of a bug and more of an unintended consequence. Because of the way target priorities were calculated, they were biased in favour of targets that were just outside minimum range. because optimum range is nearer to maximum than minimum for most weapons, this meant a few sub-optimum targeting decisions were being made.

The good news is I’ve rewritten that entire section of code that makes target selection decisions. The bad news is I need to do some serious testing to ensure this is an improvement, and doesn’t break everything. I suspect that for the first time, I may need a few volunteers from the beta players to install a ‘trial 1.16 beta patch to see if it’s safe to roll out to everyone else. If I do that on Monday, I can aim to release the full 1.16 update a few days later, and then we are getting very close to starting work on a demo and an actual releasable final game.
Yay!

Determinism

“Determinism is the view that every event, including human cognition, behavior, decision, and action, is causally determined by an unbroken chain of prior occurrences.”

That’s what wikipedia has to say. In terms of gsb determinism would mean that if you field the same fleet twice, against the same enemy, then the result will be exactly the same.

This isn’t true.

I wish it was, as do a few GSB players who are doing great things with tournaments. In fact, if I knew that I could make the game work as well as it does now, but be deterministic with a weeks work, I’d do it. Sadly, the reasons why it is not deterministic go deeper than that. I spent most of today experimenting with making it work, and I never got past 6000 milliseconds of a big battle before losing synch. (Yes I know all about random seeds and how to do it. If you saw how much code is the game, you’d see the scale of the problem :()

Fundamentally, the game is not frame-rate independent in terms of simulation calculations. (although it is scaled so as to provide constant playback rates). The BIG BIG plus side of this is that games visuals are pretty darn smooth and look great, with no jitters or jumps like you sometimes see in laggy multiplayer games. The downside is it’s not deterministic.

This limits the game a bit in terms of being really competitive as any sort of online serious league style thing. However, thats not altogether a problem. The game is called GRATUITOUS space battles, and isn’t designed to be taking uber seriously. I’d love to code an ultra-complex, ultra-geeky dterministic space combat game where you even selected the rivets to use on the laser gun stabiliser panels, but the trouble is it would likely see 500 copies, and that means I’d be broke :(

Sooo…. The current limitations of GSB 1 which will always be there are these:

2D. Not 3D

No direct ship control

Not deterministic.

Everything else can be improved and expanded and bettered and tweaked. What would you like to see?

<offtopic rant>

I’m watching (as-in, it’s on in the background) masterchef. With the way these people talk, and the ominous sci-fi thriller music as they talk about cooking prawns, they take themselves waaaayyyy too seriously. I know my place, I make video games to entertain people, and play with spaceships for a living. You can do that, and take it very seriously and aim to be the best you can, without building up some big fucking hero-complex. These people are good at frying, they arent discovering DNA or serving as fucking fighter pilots. Bah! </offtopic rant>

Video TV thing

Theres a good endorsement of indie games in general (17 minutes in) here:

http://www.mevio.com/episode/187575/The+PSP+is+Go+free+Ultima+new+releases+and+Jason+Cross+talks+indie+games

And of course they cover GSB very positively (which is cool). Some of the video clips are oooollllddddd, which happens quite a lot with GSB. I guess that is inevitable when you trickle out video over time.

It’s good to see people talking about the game in a mainstream discussion of games in general, rather than just a niche indie thing.

I’m working on some new stuff for GSB, in terms of a purely visual feature (more or less) for the next patch. Details coming soon. I just had a whole day of tedious businessy stuff, because it was the end of my companys financial year, which in the wonderful UK means a ton of form filling and non-games-related bullshit that takes ages. It seems I made a profit again, which is a relief :D

In other news, here is the latest promotional vid for GSB to lure in your friends to buy a copy:

Fighter nerfs, Spatial anomalies, UI fixes galore

I have a mental trigger than once I’m past 11 things on the ‘recent bug fixes and improvements’ list then I need to get off my ass and release a new patch for all you lucky beta players of Gratuitous Space Battles.

So hopefully some time earlyish tomorrow I’ll be doing that with version 1.13. Here is what will be in it:

1) Fixed bug where power consumed can seem to equate to power produced but still be shown to be invalid on ship design screen
2) New feature : new minimap-button and hotkey ‘O’ turns on or off a green/red overlay to show friend or foe ships.
3) Fixed bug where the size of a ship-destruction shock wave varied based on your zoom level at the time of detonation
4) The option to turn off repair-drone effects now actually works correctly
5) Better repair drones, in that they have better weld effects, and actually carry out visible repairs so ship’s damage now reflects their true status much better
6) Added tooltips to the options
7) Added a new ‘hardware sounds’ option you can disable on options if you want pitch shifting sounds without slowdown at fast speed and have certain sound cards”
8) Added a new button on the deployment screen that lets you read all of the restrictions and spatial anomalies for this mission.
9) Added some better spatial anomalies
10) Fixed bug where tutorial got stuck at ‘select orders’
11) Various scenario deployment changes to take into account the new spatial anomalies
12) Missiles that are en-route whilst their target explodes will now autodestruct rather than fly on aimlessly (regardless of missile type).
13) Fixed major bug involving engine modules where damage to an engine module is ignored until the next time the ship is damaged (should make fighters more vulnerable)
14) Rebel atlantis bomber now has it’s drifting space hulk triggered
15) Attempting to load a design of ship into the editor that is invalid now gives a nicer, in-game error rather than a crash!
16) New delete button on file opening windows lets you delete existing ship designs and deployments.

It’s the usual mixture of minor niggles like 1) and usability stuff like 2) plus big enhancements such as 5) which I already blogged about. The big ones here are definitely 5) and 9). You might enjoy trying out the emerald nebula again, and the last skirmish mission, as these now have some more interesting spatial anomalies. Hopefully this will make for some good new challenges too, because people who hate fighters or love frigates can now have their fun.

Also, fighters have been nerfed a bit, partly by huge balance change improvements to anti-fighter missiles (not listed here), but also more subtely by 13). This means that it’s all fun and giggles in your high speed mega fighter until you take a single lucky hit. Then you are just some slowly drifting piece of metal with ‘target’ written on your ass.

Repair Drones

It’s amazing how much extra effort had to go into this over the last 48 hours…

Repair drones have always looked a bit cool, but not been much help to the player. The problem is, their only tie to the core simulation was their quantity. Every repair module gave you a ‘swarm’ of repair drones, and once your ship took some damage, you would see them hovering around and looking like they were welding the ship back together. The problem was, they didn’t actually achieve anything froma  visual point of view.

Thios was worse than a visual bug, because it means that when you play against an enemy fleet that has lots of ships which make strong use of repair drones, you cannot tell if that enemy cruiser is on it’s last legs, or just cosmetically burned, yet at 100% hull integrity. Surely this had to be fixxored.

So now (behold the youtube vid below), those drones (as well as having nicer welding effects) do actually weld those damaged bits of your ship back together. To make it REALLY obvious in the vid, I built a ship with three repair modules, so until the repair supplies run out, it’s pretty nippy at welding stuff back together.

Let me know what you think. I reckon it not only looks better, but will make playing against repair-spammed ships much easier and more enjoyable. (in terms of learning from the battles. The simulation is unchanged)