If you’ve been following Starfarer for a while, you’ve probably seen some references and hints about phase cloaking crop up here and there – but there’s been nothing concrete, and with good reason. It’s only about two weeks ago I sat down to definitively answer the question, “what exactly is phase cloaking, and how does it fit into the game?”.
The combat in Starfarer is loosely based on 20th century naval engagements. There are many differences – the goal isn’t to reproduce naval battles in space, but to have a relatable starting point for someone learning the game (and for us, while designing it). If you see something is labeled as a battleship or a carrier, you immediately have a good idea about what you’re going to get. In the naval model, phase ships were originally envisioned as submarines – able to hide in another dimension and pop out for surprise attacks. Anti-phase measures could be modeled on depth charges for attacks and sonar for detection.
That concept sat unchanged (and therefore, untouched – no design survives contact with implementation!) for a long time. But now, finally, David had created some great-looking art for phase ships, and with me already working on ship systems, it was a good time to tackle it.
As envisioned, phase ships would be central to almost any engagement they were in – the threat of a ship coming into being behind your ship and firing a salvo of torpedoes at your engines is enough to make it the focus of your strategy. The problem is, adding this now would be a very disruptive change. Combat has been refined over many iterations – the mechanics, the AI, the balance of weapons – and adding this mechanic into the mix would wreck most of that work. I don’t mind throwing away things when it’s for the good of the game, but throwing away something that already works well – in the name of an unproven concept? Much better to throw away the concept that no longer fits, and start fresh.
This left me trying to figure out just what phase cloaking could be – in a way that fits nicely into the existing game.
Full invisibility is the most disruptive aspect – managing the uncertainty of where a phase ship could be, and making guesses to counter it, is where most of the problems would come from – that has to go. So, conceptually, let’s say the ship is still in an alternate dimension, but it’s got energy anchors in this one, so it can be detected – call them “phase coils” to build on the art, and we’ve got something that looks like this:
But, what does it actually do? Originally, the other property of being phased out was that a ship could not be hit – it simply passed through projectiles, missiles, asteroids, other ships, you name it. That’s still ok – the AI just has to know not to keep shooting at something it can’t hurt, easy enough. If that’s the main property, then the phase cloak becomes a defensive system, which means shields detract from its usefulness – in some situations, you might use shields instead. There’s nothing wrong with that, but it feels like the phase cloak should be more important – something that really determines how a ship plays, not something situational.
The first thing I tried was removing shields on all the phase ships. That immediately ramped up the importance of cloaking – all of a sudden, it’s your only means of defense – but it felt a bit of a waste to say “hey, right click (the command that activates shields) is now totally useless for a certain type of ship”. That line of thinking led to putting phase cloak itself on right click – making it very explicit that it’s the ship’s main defensive system, and also making it a ship-defining characteristic – something as core to the game as right-clicking to toggle the shields functions completely differently for phase ships. This also means that phase ships can have an active system other than the phase cloak, giving more room to make individual phase ships feel more unique.
At this point, I was happy with phasing as a mechanic, and felt like it was on a good track – but there were still many details to figure out.
First of all, being totally unhittable is pretty good – we need to have something place to make sure phase ships can’t be made invulnerable. Stopping all flux dissipation while phased, along with a slow flux buildup, nicely limits the amount of time a ship can spend phased. The important part here is that no amount of flux dissipation will change this – dissipation is simply set to zero, so there’s no way to create a design that can stay phased indefinitely.
Can ships fire while phased? That could go either way – if the ship isn’t dissipating flux, it actually wouldn’t be able to fire for all that long, so it’s not as big of a deal as it might seem at first. It’s cleaner if we say phased ships can’t fire at all, though – it takes care of having to have a visual transition for shots from a phased ship entering normal space, which could be awkward to manage well.
Is there a cooldown? Some playtesting showed the answer to be an emphatic no. Phasing in and out is something you want to do in response to the changing tactical situation – see some incoming missiles, cloak, see a window of opportunity, uncloak and fire, re-cloak to avoid the counter-fire, etc. A cooldown severely disrupted the flow of that, and led to watching the cooldown instead of the said tactical situation. It’s not a good sign when a mechanic encourages the player to watch a corner of the screen instead of the action! Instead, I added a small flux cost to turning the cloak on – that way, you can phase in and out as the situation demands, but pay a price for phasing too much without thought.
How is coming back into normal space handled? In particular, if you can pass through objects while phased, what happens when you try to come out on top of them? The game engine isn’t meant to resolve collision states that start out with a huge overlap between two objects – it’ll return to a neutral state, sure enough, but it won’t look good doing it. There’s just no way to handle it well in – if you’ve got two ships overlapping that look like they shouldn’t be, and that’s your starting position, there’s not much you can do to make that look good. The physics engine’s job is to avoid this situation in the first place! In fact, that’s what we’ll do here, too.
Let’s say a ship can’t unphase when it’s occupying the same space as another ship or an asteroid (you can unphase into missiles all you like). This could be abused – a faster phase ship could stay right on top of a slower ship and never come out – so, let’s add a bit of force that pushes a phased ship away from space occupied by another object. That way, you can stay phased a little longer by taking advantage of this mechanic, but you can’t keep it up indefinitely.
Where do these changes leave anti-phase weapons, like phase (depth) charges, phase beams, etc? In the original concept, these exist as specific counters to phase ships that don’t have other counters. With the new design, a phase cloak is a defensive system that is, in its way, just as limited as shields are – an opposing ship doesn’t need special weaponry to deal with a phase ship, it just needs to adjust its tactics. Having weapons that are able to hit a phased ship would be akin to having a weapon that can go through shields, and bypassing a ship’s primary defensive mechanic would trivialize those ships. So, these weapons will not do anything special to phase ships, but will remain in the game – possibly renamed and adjusted in other ways to make up for the lack of a special function.
With the new design, phase cloaking remains a system that changes how you play the ships that use it – but it doesn’t change (and break) the whole game.
As always, I’d love to hear what you think. Let me know in a comment!