I'm looking forward to reimplenting these scattering effects in the new engine (soon i hope).
In the last weeks i've been working on more physics. I realized things are not as simple as i initially thought.
Bear with me, it's not easy to explain. Basically, all my bodies are dynamic and hierarchical. You have planets, orbiting stars, moons orbiting planets, and space stations orbiting moons/planets. All of that in "accelerated" real-time.
So, in world space coordinates, the position of a specific planet is always changing - up to 1000 kilometers per second. Internally i store all my coordinates in 64-bits floats using the kilometer as the unit. The server controls how bodies are moving, and the client interpolates and predicts the movement using dead reckoning. It's all good in theory for one unique body.
But when you've got a hierarchy of bodies, the movement of one body should affect another's. What i mean is, if a space station is in the gravity field of a planet, translating the planet by +500 km in space should also translate the station by +500 km in space. If you don't do that.. the station will end up motionless in space while the planet it was orbiting goes away. Hence the motions of bodies must be somewhat "linked" together.
It gets even more tricky when you add imprecision due to networking. Let's say that your latency varies from 0 milliseconds to 10 milliseconds. Sure that's not a lot and no big deal.
In any other game, that wouldn't be a problem. But due to my time acceleration and huge speeds of my bodies (we're not playing with kilometers per hours here, but with kilometers per second), it can lead to huge errors.
A simple calculation: if a planet is moving at 1000 km/s in space, a latency of 10 ms leads to an error of 10 km in the body's position.. after one second!
Imagine what would happen with real Internet latencies.
Frontier, the classic David Braben's game in the 90s, probably solved the first part of these issues... except he didn't have to deal with networking, which made his life easier. I do not have the same luck..