N-Body Simulations

Discussion in 'Planetary Annihilation General Discussion' started by tatsujb, July 12, 2014.

?

N-body simulations

  1. YAY

    58.5%
  2. NAY

    24.6%
  3. heeey? I'm doing splits!

    16.9%
  1. UberGaf

    UberGaf Uber Alumni

    Messages:
    158
    Likes Received:
    83
    Here's what's hard to do with an N-body simulation: predict the future.
    If we were to just "turn on" N body simulation in game, the main thing that would break - horribly - would be traveling units from planet A to planet B. The straw that broke the N-body-camel's back was the requirement that units be able to get from point A to point B, reliably, predictably, and drawing the complete path of travel as soon as you click 'move'. Any true n-body simulation would require a much more complex (and micro-y) celestial navigation system.
  2. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Will we ever get that wonderful yet broken Halo ring of a planet? ;)
  3. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    would that mean that it could work, but you'd have random longer times all of the sudden for units to come out of a gate on the other side. or did this even affect basic ground unit's movement on a single planet?

    do you have footage of what that looked like in-game?
  4. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    @UberGaf, I want an answer. and I feel the branch of debate hasn't been shaken in the slightest.
  5. UberGaf

    UberGaf Uber Alumni

    Messages:
    158
    Likes Received:
    83
    No, this is strictly for units (and asteroids) that move from planet to planet. It never worked under the N-body model; I had already moved to the simplified model before implementing celestial travel.

    Most likely what would happen now is that units would just get lost in space and never arrive where they intended to. Or the server would crash.
    aevs likes this.
  6. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    I don't get why everything has to be so "on rails" why can't it just be that the server asks :
    "alright Herbert, according to my calculations you should now have arrived at coordinate 65:501"
    "nnnnnope"
    "goddamit Herbert, this is the last straw, If I have to get up, go over there and whack you in the back of the head I will!"
    "ok! ok! I'm going!"

    So sure... rubberbanding occurs... I think that's an acceptable inconvenience considering the massiveness of what's going on here.

    I'm surprised that rubberbanding would matter at all on a 2D plane and furthermore on a part of the game where units arriving on time is SOOO much less of a life and death case as ground unit interactions.

    I mean... banking your whole game on the arrival time of an SXX snipe.... nothing a strategist will respect there.

    so what I envision is an option for N-body physics. in this case people would willingly be dealing with eventual space rubber-banding (as rediculous as that fear is)

    When a target planet would be gone from it's original expected position, units would recalculate.

    I'm not saying, of course, this alone would provide a solution. I'm saying you need to box things in. We apparently can't allow N-body physics to be as wild and free as it would normally want to be, so lets provide some rules. some walls for the planets. and some other rules that would become an evident necessity as testing would prove.
    the wall.png
    Last edited: July 15, 2014
  7. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    How about making units transfer straight to the target planet and not go around the sun? To explain it better: You send unit to target body and the unit behaves as it would on the planet, it flies more or less straight towards the planet and chases it down. While this isn't realistic it would provide interesting openings like people waiting for planets to get closer together before launching invasions/nukes for minimum travel time.

    And I do not believe that the travel times should be consistent at all. I would much rather see dynamic travel times that would make timed invasions and invasion windows a thing.
    superjag24, websterx01 and tatsujb like this.
  8. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    N-body simulations are expensive, complex, and essentially pointless.
    There are no good reasons to want it with the game as it's currently envisioned, because every good reason you can think of would actually be thrown in the ****ter by n-body simulations. That's why most of the discussion has been about compensating for the problems it brings, and none of the discussion is about the benefits it brings.

    You don't need n-body physics to do this. In fact, n-body makes it harder, because the orbits change any time two planets get closer together. Something I learned from Universe Sandbox is that if you want sane orbital mechanics then you need to keep the planets synchronized and damned far away from each other.

    We're having enough problems with the orbital UI and interception with just 2-body physics.

    I'd rather see completely artificial orbits, without even 2-body physics. There's far more customization and control available, and just maybe it would be easier to give units more complex traveling options.

    Edit: I thought that would be censored. Oops.
  9. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    wow way to poop a party...

    ...not to metion .. provide backup arguments for your claims. here there are no arguments, just isolated statements.

    "There are no good reasons to want it with the game as it's currently envisioned, because every good reason you can think of would actually be thrown in the ****ter by n-body simulations" ...says you. why? where's my proof?

    plus I don't see why an added choice would be any issue to you.
    [​IMG]
    Last edited: July 16, 2014
  10. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    @UberGaf is right (of course). You can only easily predict the future state of a particle in a 2 body simulation (or in special cases for n-body simulations). For n-body simulations, you have to keep simulating it until a point in time to see what would happen.

    Where is your proof? What advantage does it bring over a 2-body system?

    We all know that n-body simulations would cause problems because they're chaotic, which means predicting the future state of something requires simulating the system until that point. This is slow and potentially troublesome, because we all know how inconsistent frame-by-frame chaotic simulations can be. Your system may not even run the same way every time, and units may occasionally get flung around in the wrong direction.

    I would also like to point out that barycenters, capturing moons, changing orbits and the likes are all possible with a 2 body simulation. In terms of gameplay, I can't see any reason to use an n-body simulation over a 2 body one that features all of these things.
    thetrophysystem likes this.
  11. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    the advantage of having a feel of realism. Planets being influenced by coming close to other planets a changing what body they orbit or being sent outwards for awhile.

    I already provided illustrations earlier in the thread (if your read) of how that could lead a strong hand to gameplay as players on certain planets would be put in certain new situations because of that planet's behavior.

    I want to have something that's not on rails.

    considering for planets that are far out it takes 30 mins to make a full circle. and that PA matches last from 30-40 mins (less in tourney matches) then you have a good set to mess around with bodies flinging to one place or another out of it's own gravitational pull, the spectacle of nature come to life and an added bit of pepper to the game.

    Not for everyone, I concur, but, allow e to repeat myself: where is the issue in that when you would have the choice?
    Last edited: July 16, 2014
  12. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    Realism? The distances between planets are nowhere near realistic here. Realistically, the state of a planetary system after billions of years is going to be rather stable.
    Gameplay? Well, aside from causing a serious logistical headache by dealing with a bunch of PSACE-hard problems, you now have planets being captured by others and colliding occasionally. Had you read my post, you'd know that you don't actually need an n-body simulation to do this.
  13. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    dude you're just arguing for the sake of it now even though I said three times this would be an option.

    realism yes. mixed in with fun. KSP isn't realistic.... yet it is. ....in some parts. ...in the right parts.

    N-body physics without the distances from planet to sun and planet to planet is the right part of realism ... the fun part. ...The one we're interested for a video game.

    And frankly I'm the wrong person the throw argumentation through absurdism at since i really do try to get as real as possible.

    I'm the only person thus far to have hosted multiplayer earth-like sized planets :

    I also hold the record for bigest non-0 height radius planet :


    and if it where up to me, heck I'd space them out from the sun the same distance as we are. But you know there are systems in the galaxy that have much shorter ranges between planets.

    Now I hope you're satisfied with the exploration of that argument.

    Back on topic, shall we?
  14. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    No, because you didn't address my second point, and the first was just there to point out that an n-body simulation isn't necessarily more 'realistic' due to the state real solar systems find themselves in after long periods of time.
    Making this an option really is a logistical problem, because we need to be able to predict the location of a body in the future. Remember what UberGaf said about interplanetary travel and the current code; one or several members of the dev team would have to put in considerable work for this, and the payoff is not a good one in my opinion. There is no advantage over a good 2 body simulation in terms of gameplay, and arguing for "options" doesn't really apply when it would require a significant amount of work.

    And as for KSP; it doesn't use n-body physics either. It uses a 2 body simulation.
    And reductio ad absurdum? I never made such an argument in my post. You should also have to explain why you think I did.
  15. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    This will cost substantial development resources and distract from other, better options. (The orbital mechanics and UI have been no small issue throughout development.)
    aevs likes this.
  16. eukanuba

    eukanuba Well-Known Member

    Messages:
    899
    Likes Received:
    343
    How do you picture a unit cannon working? Surely it's either going to fire towards point X on another planet (effectively the same as instant-landing interplanetary travel), or towards point Y on the same planet (effectively the same as teleport to point Y without needing a second teleporter)?
  17. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    But if it just instantly go there than it's pretty unfair.. Not to mention if it works like that- why is it shaped like a cannon? o.o
  18. mgmetal13

    mgmetal13 Active Member

    Messages:
    203
    Likes Received:
    151
    Using the 2 body problem is actually more realistic than using an n-body problem in this case. In real solar systems, the massive distances and large differences in mass of the bodies efficiently turns planetary orbits into a 2 (maybe 3) body problem. In this game, the planets are relatively close in distance and mass. So the n-body math makes the bodies interact more like an asteroid field.

    Also, we would all need supercomputers in order to calculate the orbital transfers of units with any degree of predictability if these systems were using n-body math. Your talking about solving a 6N first order differential equation fast enough to render the game in real time.
  19. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Yeah. Basically, I want orbital body changes to other orbital bodies, but not based on n body physics, but simply changing host. Also, binary systems are fun, but can exist with a 0 size planet acting as the center. Really, several things they can fix with the current system, can give us all the pros, with none of the cons.

    If Uber did allow all this in their engine, orbital changes of actual planets, and binary systems through planets with 0 radius acting as an empty space center of gravity, and elliptical orbits... then nobody would vote yes here. Nobody would see the "benefit" because all the benefits are claimed without the negatives in a more-polished 2-body simulation. Besides realism. Nobody but Tatsu would vote "realism cuz realism". Realism cuz realism, basically means remove the delta v planetary engine.
  20. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    To be honest I probably wouldn't use a true N-body system at least 75% of time, but those 25% would be a blast seeing planets randomly crash into each other and then get removed. But I would really like a N-body system where you define the N-bodies that interact with each other. That way you could set up interesting things like 3 bodies: 1 planet, 1 moon and 1 moonlet and see as the moon gets pulled from it's initial orbit or you could set up a a "no sun" solar system where planets behaved like asteroids.

Share This Page