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

Even Bigger, Better Explosions

It’s no good doing a game called gratuitous space battles without serious ship explosions. My current benchmark explosion is this one from revenge of the sith:

I’ve watched it hundreds of times, and taken about 30 still frame captures from the DVD to use as reference. I have quite a complex particle and effects system for GSB, and it’s coming along nicely. Currently, the average cruiser will have 17 distinct events as it explodes, not counting the release of escape pods

Those 17 events are scripted like this:

[explosions]
1 = 0,128,80,EXP_FRIGATE
2 = 11,97,149,EXP_DESTRUCTION_PLACED
3 = 20,199,205,EXP_DESTRUCTION_PLACED
4 = 20,196,238,EXP_DESTRUCTION_PLACED
5 = 101,108,41,EXP_DESTRUCTION_PLACED
6 = 120,143,163,EXP_DESTRUCTION_PLACED
7 = 200,47,189,EXP_FRIGATEBREAKUP
8 = 210,0,0,EXP_STARTBREAKUP
9 = 270,128,128,EXP_CRUISERDEBRIS
10 = 274,53,226,EXP_DESTRUCTION_PLACED
11 = 290,59,229,EXP_DESTRUCTION_PLACED
12 = 310,171,209,EXP_DESTRUCTION_PLACED
13 = 388,61,204,EXP_DESTRUCTION_PLACED
14 = 400,128,175,EXP_FRIGATEBREAKUP
15 = 400,128,175,EXP_PLUMES
16 = 400,128,128,EXP_BLASTGLARE
17 = 900,128,128,EXP_ANGLED_DEBRIS

They relate to particle effects and other graphics. So there are a number of different particle emitters called from different points on the hull, then at 210 milliseconds after detonation the sprite starts to tessellate into pieces. At the same point, the damaged hulk texture starts to cross fade into existence behind it, and the hulk components start to drift.  At 270 milliseconds a shower of permanent debris is spawned. At 400 milliseconds, plumes of wandering particles appear, accompanied by a bright flickering white glare which also generates a shockwave blasting existing debris out of the way. A final shower of temporary particle system debris is triggered right at the end.

This is all configured per-ship-hull, so different ships can detonate in different patterns and styles.

It looks cool :D

Update on current position of GSB

I’m trying to get towards a pre-order/beta situation, but I don’t want to rush anything. The game looks quite nice (I intend for it to look nicer,e specially the UI), and technically plays ok, but there are quite a few bugs and minor glitches right now. Here is what is currently on my immediate list to address:

  • Fighters sometimes retreat to their deployment zone (I thought I’d removed that code) and then just sit there. I’m considering letting fighters auto repair over time when not under fire.
  • Enemy ships actually occasionally path find off of the map. The game still works fine, but not seeing the enemy kind of sucks. The background is one big image, not a tile, so infinite scrolling can’t easily happen…
  • It’s possible that none of your weapons can penetrate your enemy flagships shields, or more likely, you don’t have enough fire-power per minute to actually knock the shields out entirely. I’m considering a number of fixes for this, because it can lead to infinite stalemates. One possibility is letting every weapon do some minor ‘leakage’ damage through shields. maybe just 2-3% of normal damage.
  • The code to unlock levels as you go along is broken
  • Some of the smoke particle effects look really bad. Something has gone wrong a bit there
  • I’m considering how to code an ‘alpha-strike’ order for ships, that basically says ‘try to co-ordinate your fire with a number of other weapons from you or other ships to blap in one go’. This is no mean task, and opens up the can of worms that orders are per-ship, not per-weapon. Hmmm.

So I’m pretty busy :D And this is all ignoring the graphical fluff I desperately want to find time to add to the game, plus other gameplay modes blah blah.

Much better deployment UI done

I’ve made good progress today and yesterday, despite distractions by Anno 1404, and being a bit ill. Here is a screen showing the new deployment layout. The UI needs polish, but this is how it looks.

I’ve got proper selection and multiple ship AI-editing working now. This means you can drag select, or double click select (no shift-add select yet) a group of ships, and then add a new behaviour to them all (if the behavior exist, it doesn’t matter) remove a behaviour, or edit the parameters of existing ones. This means that rubbish copy+paste stuff is gone, and you can edit groups of ships as you would expect to, including selecting a whole bunch and moving them as a group. The icon with a + on it creates a new ship design in the editor. I’m aware that it looks like a health icon, and I intend to redo it… I’ll also move the ‘main menu’ button to bottom left where it clearly belongs.

Also, I’m reliably told that AI ‘behaviours’ sounds weird, and programmy. Does ‘Orders’ sound better? I suspect it does. It’s only a GUI change.

Start of UI re-design for Gratuitous Space Battles

Here is a small screen of the new Deployment stuff for gratuitous space battles so people can tell me how I’m doing it all wrong :D

The fleet design screen and pre-deployment configuration screen are all gone. Now there is basically just this. The player chooses a battle to fight, and that brings them here. The difficulty setting selector will sit at the bottom once added. The strips at the top show the current fleet cost and pilot count as a fraction of the limit for this battle. A basic fleet is already shown (only for mission #1, other missions will start with an empty fleet). On the right hand side is a picker showing your current ship designs, and eventually some new icons over here will allow you to create totally new designs (launches a separate window).

How do you add new ships to the fleet or remove old ones?

Answer that in your head first, then feel free to tell me what you thought up.

My current solution is that you basically try and drag one of those far-right icons onto the map. It turns immediately into a ship silhouette of that type, and you can place it anywhere in the deployment zone (highlighted). if you drop it anywhere else, it’s deleted. To remove an existing ship, you just drag it out of the zone.

I will also include hotkeys and maybe a right click context menu to edit a design, delete a ship, rename a ship etc. This will all be in the manual, tooltips and tutorial windows, but I hope it will also be intuitive.

Thoughts? Gaps in the UI, font choices etc, are all place-holder and will be finalised later. At the moment, It’s a case of getting the general flow of things right at last. Work-in-progress UI’s rarely look awesome!

My idea is that this represents the ‘design’ of this battle. You can drag ship designs to and from the battle here, launch the ship editor from here, and generally this represents the central hub from which you play with this map.

In total, the game is going to be 4 areas:

  • Main Menu (goes to options screen, online stuff etc)
  • Select Battle screen, with a simple list of missions
  • This deployment screen, and its associated full-screen ship editor
  • The battle screen, where you view the real-time battles.

UI rethink

My UI sucks. Some people who tried the game have made me realise this. The battles are cool, the idea is ok, but the flow of the UI is too complex and fiddly and crap.
The actual ‘look’ of the UI isn’t so bad, but its just a really bad ‘flow’ from ship design to fleet design to fleet deployment to combat.
it need a bit of a re-arrangement and re-think, which will be messy and annoying and not as much fun as programming new explosion effects…

Right now you need to think like a programmer to play the game. I want it to be more like someone who wants to arrange a fun space battle would think. The current system is sort of boxy and procedural like this:

  • Create ships and save them as files.
  • Create fleets for a specific battle from saved ships, and save them as files
  • Create deployments of those fleets for that battle, and save them as files
  • Select one of those files to fight against an enemy fleet.

This sucks. What I think I need is more like this:

  • Select Battle to fight (together with difficulty level)
  • View an existing (crappy basic sample) fleet already deployed for it
  • Have the option to re-arrange the ships, add new ones from a picker, or add new designs to the picker all on that screen (new designs will effectively open a new interface to do that)
  • Hit the fight button

With that system, there will be options to save out ship designs that you use in the battle, and to save out the deployment (or maybe I always save the deployment for each battle so I have a ‘last-used’ deployment).
The key thing would be that its all based around a single process, and a single screen. The fleet design interface will effectively be dead