Performance Enhancements
I hit a major performance chokepoint when testing a significant scale up while preparing for a v0.4 playtest.
I've managed to tame the performance significantly, and have laid the groundwork that other systems can tap into to further optimize the game.
First I tackled objects that had come to a rest. Letting them sleep until something interacts with them greatly reduces the amount of physics work that Unity has to perform.
However this still left hundreds of rigidbodies with active colliders spread across the world. Most of these objects are sleeping and not on screen and yet still chew up valuable resources.
So next I've added a new system to manage which parts of the world need attention as you move around the planet.
However by itself this would mean you could be standing beside an offscreen area and fire a gun or throw a rock into it and things would fail to interact at all. Getting the performance back couldn't come at the expense of the physics sandbox.
So I also had to make sure objects could keep interacting when they left the screen. There's a lot happening on these worlds even when you're not looking at it.
This system has been a huge success. Now the game can be as performant as if the entire game were being played in a 100x100 meter square while you're walking around on a planet with 1,000's of meters of surface and cave systems.

