Physics cleanup
I am not sure how realistic the game physics is supposed to be. But there are many many things that are slightly wrong and for submitting fixes I need to understand the roadmap.
-
Time scale in the movement code.
x+=100*dt*dx
is almost a literal quote. Then people wonder why you need to divide theoretical orbital speed by 10 — that's why, that 100 effectively changes the timescale and lowers G. -
Various cleanup like the
fuel_to_stop
formula (which happens to be wrong). This should be fixed anyway, but it is frustrating to fix it without fixing the basic movement logic. -
Acceleration cap. It seems to be intended for flying inside the star disk, but there are planets with orbits affected by the acceleration cap. And it caps absolute value of acceleration instead of degree of non-uniformity. Not to start with the basic idea of controlling for energy…
-
Unequal time steps and basic precision optimisations… I think that enforcing a fixed time step in physics (even if wall clock time between frames is slightly different), calculating all the forces before moving anything and alternating the order of «change x» and «change dx» can do quite a lot for numerical stability without costing much in performance.
And in the ideal world it would be great to be able to accelerate time.
But to properly fix physics there has to be some decision about what parameters are supposed to be the tunables.
I hope that the magic constants like 100 can be eradicated — but this requires rebalancing the default time scale.
I also hope you won't object to changing the acceleration cap…
Whether you want precision management cleanup — I don't know.