Jump to content

Why not n-body physics?


Recommended Posts

Not all around, since that would get computationally confusing, but would it be possible to get this as a feature when we're within, say, the SOI of a planet? (So the moons would have a minor effect on our orbits and maneuver planning, and so we'd have Lagrange points.)

I didn't see any other threads about this; I apologize if this is one of those things that was long-ago and emphatically dismissed, and anybody who asks is a dummy for asking.

Link to comment
Share on other sites

If you have a supercomputer purely for the purpose of playing Kerbal Space Program you can probably have n-body physics and still have a framerate instead of a slideshow, but the required calculations for even a "limited" version like what you propose are probably still far beyond what current commercially-available computers are capable of doing (at least while keeping the game playable).

Link to comment
Share on other sites

In addition, the side effects of n-body smulation would not be welcomed by most players. Stationkeeping will be a thing, and rapidly fast forwarding your Eeloo mission will be nearly impossible if you're maintaining a communications network.

Yes, it will be more realistic, but the "tedium/grinding" kind of realism.

Link to comment
Share on other sites

Orbiter 2010 has lower system reqs than ksp, and has n-body physics- so it is possible.  Orbiter 2010 also disproves claims that n-body makes time warp impossible.    

Orbiter 2010 also uses "semi-on-rails" planets.  So, while the perturbances aren't actually simulated, they are there, because they are precalculated.  

Link to comment
Share on other sites

28 minutes ago, DAL59 said:

Orbiter 2010 has lower system reqs than ksp, and has n-body physics- so it is possible.  Orbiter 2010 also disproves claims that n-body makes time warp impossible.    

Orbiter 2010 also uses "semi-on-rails" planets.  So, while the perturbances aren't actually simulated, they are there, because they are precalculated.  

Orbiter doesn't use true N-body calculations, it uses truncated versions of it to allow for ease of simulation.  

Reworking KSP to include even these 'simplified' systems would basically mean making a new game, from almost scratch.    If they were to do it, it would be in KSP2, if ever.  As buggy as this game can get at times, Imagine if they tried to work it into the game as is.  At times of Jool/Kerbol Conjuction, light weight rovers might start lifting off the ground.......  

Link to comment
Share on other sites

Also, Orbiter's craft are one piece.  KSP could possibly get orbiter style n-body physics if they remove the entire "build your rocket" concept.  The bulk of KSP's physics are part interactions, not orbital calculations.

Edited by Alshain
Link to comment
Share on other sites

4 minutes ago, RatchetinSpace said:

The Joolian system would definitely have to be re-arranged. Experiments with the Principia mod (adds n-body physics) show that Bop and Vall get kicked out of the system quite quickly by Tylo.

N-body physics doesn't necessarily mean the planets would no longer be on rails.  The on rails functionality is not part of patched conics, it's just something else entirely.

Link to comment
Share on other sites

15 hours ago, Alshain said:

Also, Orbiter's craft are one piece.  KSP could possibly get orbiter style n-body physics if they remove the entire "build your rocket" concept.  The bulk of KSP's physics are part interactions, not orbital calculations.

If the effects of gravity were only simulated on the center of mass, and not every part, would that fix the problem?

Link to comment
Share on other sites

I don't have full understanding of n-body physics but here's what I know.

Pros:

  • Lagrange points
  • Sun-synchronous orbits

Cons:

  • Increased computational cost
  • More grind (station-keeping, drift of KEO satellites)
  • Obscured basic principles of Kepler's laws - orbits of planets are still mostly elliptical, but everything near planets goes haywire: oscillating inclination of Moon, Lagrange-point satellites having different period from predicted by Kepler's law, no good orbital invariants etc.
  • (see Principia documentation) because there is no clear defined central body and orbits are no more planar, definitions of "prograde", "normal" and "radial" become quite vague if not inapplicable
  • Need to ensure planetary system is actually stable (meaning much less planet packs)
  • Much more complicated mission planning

Given that patched conics approximation is quite close to real-life dynamics in terms of delta-V requirements, so vehicle design stays the same.

All in all, current state of the game gives players without a degree in rocket science a good taste of what spaceflight is like. Adding n-body physics is going to just slap them in the face with all that complexity, no clue what to do etc. and is more likely to turn them away than encourage to learn something.

Link to comment
Share on other sites

2 hours ago, DAL59 said:

If the effects of gravity were only simulated on the center of mass, and not every part, would that fix the problem?

Thats not the issue at hand.  What is, is when part A moves, what happens to part B attached to it, and what happens to part C attached to B.... and D attached to C.  For each movement of each part, physical interactions must be calculated down the chain.  This is why there is a theoretical part count limit dependant on your system specs.  1000 part space statons make your computer crawl.

Now, add N-body calculations on top of that.

 

In orbiter, a space shuttle would probably be 4 parts max.  The plane, two boosters, and a fuel tank.  In KSP, an equivalent space shuttle is at least 100 parts or more.  It's just a different game concept.

Edited by Alshain
Link to comment
Share on other sites

Or maybe, instead of patched conics or n-body, workaround fake lagrange point?  The gravity wouldn't be simulated, but there would be on-rails spheres where if your ship is in them moving less than 1 m/s, your spacecraft would just be "docked" there. 

You could set them as targets and use the target system as if they were spacecraft, but they would have no SOI.  Like asteroids.  

 

3 hours ago, Pand5461 said:

Need to ensure planetary system is actually stable (meaning much less planet packs)

Planets can still be on rails.

Link to comment
Share on other sites

23 hours ago, eloquentJane said:

If you have a supercomputer purely for the purpose of playing Kerbal Space Program you can probably have n-body physics and still have a framerate instead of a slideshow, but the required calculations for even a "limited" version like what you propose are probably still far beyond what current commercially-available computers are capable of doing (at least while keeping the game playable).

The Principia mod works quite well on my old machine, KSP framerate is limited far more by the current engine than anything else.

If KSP was not shoehorned into the current engine (which won't change) FR would have nothing to do with it, honestly.

Link to comment
Share on other sites

Well, there's ways around the fact that craft are a bunch of parts flying around together - I'm not sure how often you're going to have more than one body exerting enough force on a craft to think about *pulling it apart* ( as opposed to just one body, which is already covered and tends to only pull craft apart when they're in contact with it ) so most of the time you could treat the whole craft as one item; if there's something that delicate on it then you can precalc forces for the whole ship, and if there's something which looks like a stressful conjunction of force then only apply it to parts below a threshold, and whatever they're attached to. Of course if someone's built a completely mad system then the threshold might cover the entire ship & things get expensive, but that does seem something of an edge case.

Link to comment
Share on other sites

I have no idea of how hard would be to implement that and the impact in game performance. Sufice to say those are real concerns. 

My skepticism is about what it brings to the game. As I see it patched conics is a fairly good approximation that's even used in some real life applications. 

I concede that for those on the hyper-realism niche n-body calculation would be a big thing. But IMHO that puts it in mod territory, not stock.

 

Link to comment
Share on other sites

4 hours ago, DAL59 said:

Planets can still be on rails.

Maybe so, but the gravitational effects caused by several on-rails moons in close proximity which aren't stable relative to each other would be unrealistic (due to the planets experiencing magical forces keeping them on their on-rails orbits) and probably quite difficult to plan for because reality doesn't include that sort of effect (so the only situation where these effects occur is in the game) and so the player is presented with a complex and unprecedented situation that they nevertheless have to account for in order to make things work in simulated n-body physics while accounting for magic forces keeping planets on rails.

Link to comment
Share on other sites

RE: planets on rails, and given the existence of an n-body mod already ( if you're worried about performance, go and test performance already ) this is a relevant question: can you save systems from Universe Sandbox in a convertable format? you can pre-test your system for stability then.

Link to comment
Share on other sites

On 9/15/2017 at 6:58 PM, eloquentJane said:

If you have a supercomputer purely for the purpose of playing Kerbal Space Program you can probably have n-body physics and still have a framerate instead of a slideshow, but the required calculations for even a "limited" version like what you propose are probably still far beyond what current commercially-available computers are capable of doing (at least while keeping the game playable).

If you want to calculate the N-body calculations of the Kerbol system on a spacecraft, that is 16 additional calculations per frame/update.  This should be trivial.  If you want to simulate the N-body effects on the Kerbol system, that 289 additional calculations, and the only real issue is that you have to stabilize Juno's moons into something like how Jupiter's work.  Now if you want to calculate all the asteroids you might more power than most computers running KSP.  If you want to include the gravitational effects of the asteroids, expect to need a "supercomputer".

If you look at classical supercomputer design, like Seymour Cray and God had in mind, you will see something strongly related to how a GPU works.  And while GPUs almost always are designed for "floats" and not "doubles" (supercomputers only see doubles), KSP is designed using only "floats".  It is entirely possible your GPU could keep up with the calculations needed for all the asteroids and do all the graphics without too much of a hit (although it would make principia considerably harder to program.  No idea if they bother).

The real problem with N-body physics is that it defeats the entire "on rails" system for physicsless time acceleration.  Since I'm a big fan of ion engines (in real life, the warp issues in KSP make me not like them in game) I would be happy if a system provided the "high acceleration" gameplay while dealing with minor acceleration forces.

Link to comment
Share on other sites

47 minutes ago, wumpus said:

 I would be happy if a system provided the "high acceleration" gameplay while dealing with minor acceleration forces.

Same.

I can't but wonder why 4x physical time warp is the fastest to be safe. Is it really? Because I think it depends per ship. More parts and more weight is more often a bad combination at physical time warp then with smaller vessels ime, obviously that's the case for ION probes. It would atleast cut some of that burn time if we had 8x physical warp. Although I'm sure somebody is going to tell me why it's limited at 4.

Edited by Helmetman
Link to comment
Share on other sites

19 hours ago, DAL59 said:

Or maybe, instead of patched conics or n-body, workaround fake lagrange point?  The gravity wouldn't be simulated, but there would be on-rails spheres where if your ship is in them moving less than 1 m/s, your spacecraft would just be "docked" there. 

You could set them as targets and use the target system as if they were spacecraft, but they would have no SOI.  Like asteroids.  

Planets can still be on rails.

I could get behind this.

Maybe this could also be an additional use for the gravioli detector. If you have a gravioli detector on your craft and the electricity to run it, then you can find on-rails lagrange points and enter halo orbits.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...