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

Redesigning formation orders in GSB2

Formation orders in GSB sucked a bit. You had to select a ship, then a target and basically the order was ‘stay at this position relative to that ship’. This sucks in two different ways. Firstly, it means if the ‘target’ ship gets destroyed, the formation is instantly abandoned (yikes). Secondly, it is laborious to set up 32 ships into a formation.

The new system for GSB2 is simpler. You group select a bunch of ships and then add a formation order in one go. They then attempt to stay relative to each other, regardless who gets destroyed. Internally, the ships ‘elect’ a command ship, that has ‘free-will’ and the other ships will try to stay in relative position to that ship. That ship getting destroyed or tractored results in a new election. So far so good, and certainly better when it comes to ship destruction and setting-up GUI. However, it leads me to question a few things. Take this formation (coder art!)

form1

Just a simple line of 6 ships where randomly I’ve made the blue one the commander. If the commander heads to the right, then all is well. However, if he heads at an angle what do the ships do? Should they stay relative to the ship in absolute world terms, or in relative to the lead ships-angle terms? in other words, do we wheel?

form2

Obviously the two different behaviors are vastly different. It also brings up the topic of what to do if the command ship decides to retreat when damaged, does the formation follow? what if it’s just 1 damaged frigate… I’#m guessing they leave the formation at this point. In my mind, the reason behind formations is to keep ships trogether in the sense that they should be able to cover each other in terms of support, and shooting down incoming missiles etc. With that in mind, I reckon it would make sense to always elect the biggest ship as the commander, where viable.  Theoretically you could have a super-slow ship with the entire fleet locked into formation with it, effectively preventing anyone from moving.

What do you think? do I ignore angles and stick to world space, or pivot? and will the system of commander elections work ok? For reference, this is how fighter squadrons already work in GSB 1.

 


10 thoughts on Redesigning formation orders in GSB2

  1. I’d make ship formations independent of individual ships. Make the formation its own invisible, non-interacting, decision-making entity, assign it the average position of all the ships in the formation plus a small vector for the formation’s desired movement, and then make the ships assume positions relative to the formation’s position. Recalculate the average position when/before the ships reach the calculated desired position.

    As a bonus, a formation like that with a lot of ships retreating in panic will actually fall back slowly in good order as the average position is dragged back by the routing ships, then regroup and advance again when the panic stops, which is a nice behaviour.

  2. well the thing is, the beauty of the current system is you can give orders to ships, and *then* make them a formation, and the ships will follow their given orders when they command the formation, so you have some direct control over the ‘grand plan’ for the formation

  3. Wheeling should have much more satisfying results. Right now in GSB, when two formations come at each other at an angle, the ships on the ends closest to the opposing formation attract a huge amount of damage while those on the opposite end face no damage and often end up out of firing range. If formations actually hit each other head on, targeting choices would vary more, and more of the formation’s damage output would actually come into play.

    Also, if you’ve set up a formation to put ships with heavy armour/anti-missile capabilities in front of more lightly armoured ones, it doesn’t really work properly in the current system.

  4. Wheeling would probably be better, but it would be good to have the option of forcing your ships to stay in a flat line. The more options, the better!

  5. Instead of having a master ship, what about having a weighted master “point”? Each would contribute a vector to find the “center of mass” of the entire formation. And then they would all take up positions around that point.

    When a ship decides to leave, then it no longer contributes to the center of mass and everyone adjusts accordingly.

    The “front” of the formation would be direction pointed the velocity vector from the change-in-position of the center of mass. So whatever direction the ships are moving collectively would define where the front is.

  6. If only one behaviour was implemented I would expect it to be wheeling.

    As an aside, it might be interesting (particularly for smaller, faster craft like fighters) to look into various flocking algorithms as the results would feel very organic. If a formation’s barycenter could be pathed towards a target (not unlike as described by Smingleigh, Drew, etc.,) fighters could move together towards the target, break away from the formation (and/or go Newtonian) to turn and fire, and then return and reform into a continually-adjusting swarm heading to a new target. Not so much a roiling flock of birds going nowhere, of course, but rather a continual shifting of space between the ships in the formation, so they don’t look like they are locked together as can easily happen with some formation implementations.

    If we were given the option to choose between the two, as opposed to having them fixed per ship type, for example, perhaps some kind of per-formation switch could let us choose wheel vs “swarm” or what have you.

  7. Of course they should wheel. Not wheeling would be changing the formation (line, arrow, etc).

    Now, wheeling is slightly tricky, but as flocking algorithms go, I am sure you will manage it.

    While I am here, fighters should also:

    – Refuel (when they get to an appropriately low fuel level, given the distance to nearest base / carrier)
    – Repair
    – Re-arm

    This can be managed at an individual level with some simple heuristics, but can also have some higher order squadron level heuristics, where the squadron leader could take them all back to base if any of their stats falls too low collectively (bullets, fuel, damage).

    Just thinking about it makes me want to write a whole lot about other aspects of GSB. Am I missing a thread somewhere? Hmmm, let me check.

  8. Speaking from experience as a GSB1 player:
    -It isn’t hard creating big formations, as I can mass-select all the relevant ships and have them all enter Formation with a “driver” ship.

    -The main difficulty when creating formations was that there is a delay between when “driver” of a formation moves, and when all its “followers” move. The linked forum post provides a good explanation of this phenomenon.

    http://positech.co.uk/forums/phpBB3/viewtopic.php?f=19&t=4681

    -Regarding “Wheeling”: A lot depends on how gameplay will change between GSB1 and 2. I’m not sure what the impact would be on a typical GSB1 challenge map (rectangle, two battle lines lean on each other until one dies), but on a Survival map wheeling would be amazing. Is it even necessary to choose between wheeling and not-wheeling? How much work would implementing both be?

    -Some GSB1 strategies depend on quirks of the Formation order. For example, if a fleet contains both fast-moving Frigates and slow-moving Cruisers, then without exploiting the “if the ‘driver’ dies the formation ends” quirk it’s difficult to keep the Frigates from charging the enemy before the Cruisers can provide backup.

    (Disclaimer: I’ve only played the Mac version of GSB that shipped with Humble Bundle 4, and can’t seem to install updates. And I’m aware that gameplay changes between GSB1 and 2 could invalidate all my observations.)

Comments are currently closed.