3 ms·
KSP takes some liberties with physics, simplifying things so that e.g. the N-body does not apply (that is, your craft are only affected by one body at once). Ot
by Cthulhu_ 6y ago
KSP takes some liberties with physics, simplifying things so that e.g. the N-body does not apply (that is, your craft are only affected by one body at once). Other challenges are the scale and number precision. It doesn't get it exactly right either, especially when you use the time accelleration, things can go a bit... weird. See https://wiki.kerbalspaceprogram.com/wiki/Deep_Space_Kraken https://wiki.kerbalspaceprogram.com/wiki/Deep_Space_Kraken
- NikolaeVarius 6y agoWe don't really know the scope of the original pitch, so hard to make a determination of feasibility. But yes, a fully modeled spacecraft simulator would have been effectively impossible.
- TeMPOraL 6y agoGoes to show that you don't need a fully modeled simulator, you need modeled enough, and then to iterate on it. (And let the community do some of the hard work for you. With appropriate mods, KSP can have a very realistic aerodynamics model (that handles supersonic speeds as well), and - as others mentioned - n-body physics simulation.)
- mrfredward 6y agoThere may not be an analytic solution, but solving the n-body problem numerically with newtonian physics isn't a difficult thing to do...it's simple enough that it has been used as a benchmark for doing computations: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/nbody.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- ben-schaaf 6y agoI'm sure they know this. The problem is that n-body simulations don't scale well with simulation speed. In KSP you can speed up time by up to 100,000x, which is essential for gameplay. If you want the same accuracy for n-body at that speed, you'll also need to do 100,000x the calculations. Whereas with KSPs simplified model you can calculate the position in orbit at arbitrary points in time, making 100,000x just as computationally expensive as 10x.
- bkanber 6y agoI don't know which integrators they're using but an algorithm like RKF45 should handle time acceleration with adaptive step sizes no problem. As grandparent said, n-body is very well-known. Regardless, KSP's workaround of using SOIs is simple and quite effective.
- mrfredward 6y agoThe top entry in my link above simulates 50 million years in 6 seconds for an n=6 system. That's 11,000,000,000,000X running on a normal PC.
- e_y_ 6y agoFrom a gameplay perspective, there isn't much sense in a full N-body simulation. Players only care about their spacecraft, which is a restricted three-body problem (small spacecraft, massive gravitational bodies) outside of special cases like gravity tractors. And the simplified two-body SOI worked pretty well in practice. In any case, the bigger gameplay problem tends to be the vehicle physics simulation, where you have hundreds+ parts interacting and not in the most stable fashion especially above 2x time warp. That's the part that seemed amazing when KSP first came out, moreso than the orbital simulation (although the solar system exploration clinched the overall experience).
- philwelch 6y agoFrom a gameplay perspective, I would love to put some propellant depots at Lagrangian points.
- perl4ever 6y agoI haven't played the game, and I don't know if it matters, but I would think that considering the processing necessary for attractive graphics in today's world, doing the physics right would have a cost too small to practically measure. I don't understand how something that could easily be done on an 8 MHz computer in 1985 could strain a modern machine. Especially if you look up a decent algorithm and don't do the naive one. Maybe there is some misunderstanding. Like, "n-body" to me doesn't imply a detailed simulation of inhomogenities in the celestial objects, like in real life they talk about mascons and such when landing on the moon. I'm assuming it's just that you calculate the forces of each body on every other body. And while you can do better than a simple N^2 calculation, if you have less than a dozen what does it matter?
- sq_ 6y agoKSP is already heavily CPU-bound, so I wonder if part of the reason they've avoided implementing n-body in the game is that it would crater framerates and simulation speed.
- garaetjjte 6y agoKSP community implemented n-body physics: https://github.com/mockingbirdnest/Principia https://github.com/mockingbirdnest/Principia
- sq_ 6y ago> Principia is released on every new moon with whatever features and bug fixes are ready at the time. This ensures relatively timely improvements and bug fixes. This may be the funniest/best way to say "we have a roughly monthly release cadence" that I've ever seen.
- afterburner 6y agoAny idea how well it works? Are there trade offs, or is it all upside, physics-fidelity-wise?
- cydonian_monk 6y agoIt worked really well when I used it. It replaces a bunch of the stock navigation tools, and takes a bit of learning, but really seemed to be a good n-body simulation engine. It's been well over a year since I touched KSP though, so I can't speak for the current versions of either Principia or the base game.