#56: Crushing spaceships

As soon as I introduced the behemoth ships, I knew I wanted to be able to crush ships. It just didn´t feel right that pressing a much smaller ship against a wall did not have any major consequences, killing the whole “scale contrast” idea. Crushing seemed just natural due to the claustrophobic nature of the internal sections and feeling of “physicality” that I´m aiming for. Plus, knowing that one´s ship can be crushed introduces an extra layer of strategy while piloting.
On a technical level, not being able to crush ships was troublesome. Doors needed “safety sensors” at the tips to prevent them from pushing indestructible ships literally into wall colliders. The code to prevent that from happening resulted in quite complex logic (for a door…). Also, on an intuitive level… everyone is afraid of elevator doors, shouldn´t players be afraid of their giant, space-faring cousins?
What was the catch? Unity 2D physics port does not have access to the amount of stress an object is enduring, and I couldn´t find a viable alternative. Most games rely on cheats to emulate that, but being on a zero gravity / zero friction / zero orientation world, I couldn´t even find a cheat that applied. Crushing was sent to the huge bin of “Negspace II” ideas (coming soon provided I ever get filthy rich and/or able to hire people who actually know how to do stuff).
These days, playing with springs and joints on the switches, I imagined that, if I were to split ships in half, add a hinge at the bow and put a strong spring between the sides of the stern, I could get “stress” from the difference in orientation between both halves of the ship, simulating (in a very minimal way) structural resistance.

left: old collider, right: new colliders, held together
Changing the physics of your “main character” is A BAD THING. Plenty of weird stuff cropped up:
-Self crushing, accidental explosions, and springing yourself to outer space on spring decompression.
-General wobblyness and unexpected momentum.

Weird ´n´ wobbly
-Enemies not seeing ships through the right wing and friction chargers not charging the right side of the ship.
-The playable menu being completely broken, etc…
BUT door logic became WAY simpler, and now, after some fine tuning, you can be properly afraid of them:

FEARSOME
And small ships feel more fragile than ever from a behemoth´s point of view.
I´m sure I´ll be fixing plenty of bugs on the days to come, but the feeling of crushing spaceships…


