Jump to content

Is it possible to now have true nbody simulation in KSP?


Recommended Posts

That article has little to do with the reason we don't have n-body physics. Computationally, many of the computers that play the game can't handle it. Even if they could, having n-body would mean constantly having to check your space stations and satellites to ensure they don't fall out of orbit. About the only advantage to having n-body physics is Lagrange points and I'm sorry to say that doesn't outweigh the tediousness of constantly checking our orbits while trying to timewarp for years traveling to other planets.

Link to comment
Share on other sites

I'm not totally sure if this is a game request or what, but if so, N-body is on the "What Not To Suggest" list. I don't think it's because they don't wanna do the work for it, I think it's because it would make the game insanely harder. And that's all we need, a steeper learning wall. ;_;

Link to comment
Share on other sites

I doubt that article is relevant. General relativity isn't required for KSP, Newtonian mechanics would do just fine. As sal_vager said it's already possible to do n-body gravity in KSP. The question is whether it's desirable. There are advantages in terms of some interesting effects such as Lagrange points. Orbital instability could be resolved by a station-keeping feature that consumes a trickle of fuel in exchange for keeping the orbit in place. The big issue I see is that it's a lot of work for not a lot of benefit and Squad have better things to do.

Link to comment
Share on other sites

I'm not totally sure if this is a game request or what, but if so, N-body is on the "What Not To Suggest" list. I don't think it's because they don't wanna do the work for it, I think it's because it would make the game insanely harder. And that's all we need, a steeper learning wall. ;_;

In an ideal world, Squad would have enough programmers on staff to make "n-body gravity" an option you could select in the game difficulty/realism section. Alas, KSP was made in the real world. (BTW, I don't think KSP's learning curve is steep at all. Go play a realistic flight simulator if you actually believe that KSP's learning curve is "steep".)

In all honesty though, if a game existed that was very similar to KSP- where we still design and build our own spacecraft, so NOT LIKE ORBITER- and that game just had much more realistic planets and physics- I'd drop KSP for that game in a heartbeat!!! KSP is way too easy on stock to keep me playing indefinitely. I was having a good time with the Realism Overhaul patches until 1.0 came out, even though RO was very buggy (including lots of crashes- I would have never put up with it if I didn't run KSP on an SSD). And RO doesn't even have the full solar system or 3+ body gravity. I'll probably be going back to playing with an RO install at some point in the relatively near future.

Edited by |Velocity|
Link to comment
Share on other sites

if you want something like nbody look into the mod called Principa. It adds a pseudo n body physics. with that being said it is nice seeing new research on nbody dynamics. and maybe one day personal computers will be able to do it on a gaming level. but that will not be for a long time.

Link to comment
Share on other sites

I can't help but wonder if it'd be far simpler to add artificial lagrange points into the game. Basically, something similar to an SOI, I guess. KSP already approximates a lot of the physics of space, so I'm fine if they apply an approximation mechanism for lagrange points. would add a wonderful new feature, and would not require n-body gravity... Since all celestial bodies are on rails... lagrange points could also be on rails. We just need a mechanism that makes it actually do something.

Link to comment
Share on other sites

If I was going to add N-body simulation, I would only apply secondary gravitational forces that are at least, say, 25% of the largest. This would allow for the creation of stable orbits anywhere sufficiently close to the celestial body that other bodies will not reach that 25% threshold, but would also create a more dynamic zone of instability than currently exists, where your orbit is unchanged as long as you don't hit the moon's exclusive sphere of influence.

Link to comment
Share on other sites

Principia main problem isn't directly from n-body calculations - that's not that demanding on CPU in itself - the main resource hog is calculating and displaying the resulting orbital lines - as those are open ended instead of oval based like in patched conics

-in patched conics 2-body simulation, you simply 'cut' the line where it reaches an SOI, and calculate and place the orbit line 'oval' around the new body.

- in n-body, you need to calculate how each body will affect each other for several +years in advance in order to generate the orbital line :)

Besides, KSP's solar system is not stable in the long run under n-body physics :) (especially the joolian system, were the moons gravitational interactions would eject some of them from orbiting jool.

Eggrobin sure put a lot of hard work into this :) - and it will interest people to play with it :) however, the performance hit and additionnal playing complexity would be a bit far fetched for a stock game scope :)

Link to comment
Share on other sites

Yes, calculating n-body orbits is "easy". The problem is that it's iterative, which means that each object's position is calculated from it's position in the previous frame. This means that there's no way of predicting an object's position at a given time without calculating all the intermediate steps. This rules out trajectory prediction and warp.

Unfortunately, not being able to predict where you're going without running a full simulation, and not being able to warp on a journey to Eeloo, would make the game not very fun at all.

Link to comment
Share on other sites

I'm not totally sure if this is a game request or what, but if so, N-body is on the "What Not To Suggest" list. I don't think it's because they don't wanna do the work for it, I think it's because it would make the game insanely harder. And that's all we need, a steeper learning wall. ;_;

Maybe we need a forum for threads that are not suppost to be placed in KSP Forums, Wen call it the Space Lounge.

Link to comment
Share on other sites

Besides, KSP's solar system is not stable in the long run under n-body physics :) (especially the joolian system, were the moons gravitational interactions would eject some of them from orbiting jool.

Exactly. People requesting N-Body physics don't realize our beautifully crowded tiny solar system would be gone in no time flat if we introduced n-body interactions. People just hear "Lagrange point" and imagine N-Body will bring more gameplay options, but most of what it will do is make almost every orbit unstable in the long term and actually reduce the gameplay options. Not many people would be able to actually enter orbit around a true L point, and what for? You can already simulate L4/5 quite accurately by putting them co-orbital with the target, but leading or trailing outside its SOI. L3 is a bit iffier because you will have to be considerably higher than in RL, and L1/2 are undoable, but hey, that is much more gameplay that "only 1% of players know how to calculate if their orbit is stable over long periods or not".

Rune. It's probably the most important reason, technical ones can be solved with fancy math (i.e: Universe Sandbox does it).

Link to comment
Share on other sites

Universe Sandbox is a pretty terrible simulation as far as N-body sims go. A better example would be Orbiter, which has on-rails Sol System with N-body interactions for the craft.

In principle, nothing prevents KSP from cheating and running the system on rails as well. But the benefits would still be marginal.

Link to comment
Share on other sites

Exactly. People requesting N-Body physics don't realize our beautifully crowded tiny solar system would be gone in no time flat if we introduced n-body interactions. People just hear "Lagrange point" and imagine N-Body will bring more gameplay options, but most of what it will do is make almost every orbit unstable in the long term and actually reduce the gameplay options. Not many people would be able to actually enter orbit around a true L point, and what for? You can already simulate L4/5 quite accurately by putting them co-orbital with the target, but leading or trailing outside its SOI. L3 is a bit iffier because you will have to be considerably higher than in RL, and L1/2 are undoable, but hey, that is much more gameplay that "only 1% of players know how to calculate if their orbit is stable over long periods or not".

Rune. It's probably the most important reason, technical ones can be solved with fancy math (i.e: Universe Sandbox does it).

It is possible to create SOI for the lagrange points, it would not be greatly accurate but at least it woukd give players a chance to explore their use. Arguing for lagrange points is not neccesarily arguing for the use of N-body physics. One deficiency of KSP is the complete lack of a stellar scientifci program, and a great thing to do with L2 is park telescopes.

Link to comment
Share on other sites

It is possible to create SOI for the lagrange points, it would not be greatly accurate but at least it woukd give players a chance to explore their use. Arguing for lagrange points is not neccesarily arguing for the use of N-body physics. One deficiency of KSP is the complete lack of a stellar scientifci program, and a great thing to do with L2 is park telescopes.

Is there some kind of special gravity calculation that can approximate the trajectory inside an L point? You couldn't use the standard laws of gravity, cuz then spacecraft could be flung to ludicrous speeds if you just hit the right spot in the center. You could also exploit that for crazy gravity assists.

Link to comment
Share on other sites

Is there some kind of special gravity calculation that can approximate the trajectory inside an L point? You couldn't use the standard laws of gravity, cuz then spacecraft could be flung to ludicrous speeds if you just hit the right spot in the center. You could also exploit that for crazy gravity assists.

One way to do it is to basically warp the calculation of an orbit that intecpts L points if the crafts trajectory reaches inside the soi. It would make slowing down for insertion easier.

Link to comment
Share on other sites

It is possible to create SOI for the lagrange points, it would not be greatly accurate but at least it woukd give players a chance to explore their use. Arguing for lagrange points is not neccesarily arguing for the use of N-body physics. One deficiency of KSP is the complete lack of a stellar scientifci program, and a great thing to do with L2 is park telescopes.

Lagrange points "SOI" is not possible because they are not analog of gravitating body, they are complex regions on overlap of gravitational field of two bodies that orbit common barycenter. Without barycenter where are no real sence in lagrange points surrogate. And by the way, how you'll think to emulate Duna and Ike orbining common barycenter? Add more fake "SOI" to empty space? This will not work.

Link to comment
Share on other sites

Besides, KSP's solar system is not stable in the long run under n-body physics :) (especially the joolian system, were the moons gravitational interactions would eject some of them from orbiting jool.
The Jool system should be stable if the orbital elements were interpreted correctly (as barycentric rather than as body-centric). Simulations which show it as unstable, such as Matt Roesle's, use a body-centric interpretation of the orbital elements. Specifically, Scott Manley (private communication) has simulated the Jool system for 1000 years (probably with the MERCURY integrator), and has found it to be stable.
In any event modest changes to masses and objects of bodies should not be a problem.
Yes, calculating n-body orbits is "easy". The problem is that it's iterative, which means that each object's position is calculated from it's position in the previous frame. This means that there's no way of predicting an object's position at a given time without calculating all the intermediate steps. This rules out trajectory prediction and warp.
From what I've heard Principia does it OK. True problems will arise if you want to predict an encounter with Eeloo after going round the Sun five times but for reasonable duration journeys I don't believe it's an issue. The Principia folks state that timewarp above 100,000x, such as in RSS, is slow, but the stock game tops out at 100,000x anyway.
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...