Gravity Orbit - Add an extra planetary gravity layer

    Joined
    Oct 17, 2013
    Messages
    40
    Reaction score
    77
    I've been toying around with the more recent dev-builds, and tried to replicate something I saw in an old mushroom fleet video. In this video, players attempted to enter and maintain an orbit about a dodecahedral planet using the shifting gravitational directions. However, this was impossible without the players constantly adding thrust to maintain elevation.

    There seem to be several major barriers to making gravity orbits work:

    1) Space linear damping gradually removes the player's tangential velocity, acting effectively as a "drag" force that causes the player's craft to deorbit (damping can be disabled in the server config file)

    2) Entering an elliptical orbit causes the player to pass very close to the planet on one face and slingshot out of the gravitational effect entirely on another planetary face. Not only does this make transfer orbits impossible, it also restricts orbits to very, very low elevations (no geosynchronous/geostationary or "high-planet" orbits)

    3) The "corners" created by "Cartesian-orientation" (+/- x, y, z) on the dodecahedral planets create anomalies in the orbital path. See the figure below:


    In this section highlighted by the red triangle, gravity is confused. In this gravitational "corner," the left face's gravity will pull the player's craft in a direction NOT orthogonal to the planet's surface, as you would expect when over a flat plane. Instead, something else happens..

    Assume the player is orbiting this planet clockwise. In this zone, the left-side gravity will accelerate the player orthogonal to the planet's surface at a fraction of the normal gravitational acceleration, and the remaining acceleration increases the player's tangential velocity, which will cause the player to gain kinetic energy for free (unrealistic and head-thump-inducing when trying to achieve a circular orbit).

    Similarly, if Starmade applies the right-side gravity to the player, the planet will also accelerate the player orthogonal to the surface at a fraction of the normal gravitational acceleration. However, in this case, the remaining acceleration will decrease the player's tangential velocity, as it acts retrograde to the player's motion. This causes the player to lose kinetic energy for no reason (also unrealistic and concussion-inducing).

    To solve this confusion and to allow planetary orbits to become possible, see the figure below:


    Create a range of distances from the planet center that correspond to a "planetary body" gravity, which applies a gravitational effect (constant directional acceleration) oriented towards the center of the planet. Below the inner boundary of the planetary body gravity range, only the relevant surface gravity is applied to the player (or other entities). However, above this inner boundary, the planetary body gravity takes precedence, and its effect is applied instead of the surface gravity's.

    This works because the radius of the inner boundary for this effect would be EQUIVALENT to the absolute ceiling of the surface gravity (from the center of the planet core). Thus, the surface gravity would always be applied near the planet except at the "corners" where the gravity becomes confused.

    Now, with a point-based gravitational field at extended distances from the planet, players (who disable linear-damping in the server config) can establish many different types of circular and elliptical orbits for satellites and ships.


    New Avenues for Gameplay:

    With the planetary body gravity, players could establish different orbits for different reasons.
    A) Player wants to keep guns pointed at certain place near the planet "equator"
    --->Player establishes a geostationary orbit with guns pointed at planet
    B) Player wants to establish a "spy" satellite
    --->Add in ability to interface with ship cockpits remotely and player can view location on planet/adjust orbit
    C) Player's fleet just entered the planet's gravitational influence
    --->Maneuver to establish orbit
    D) Player wants to have a moon and/or moon-base
    ---> Tows an asteroid/space object into orbit


    While I am not 100% on the performance impact, I have often seen AI get trapped on planets after flying too close. Even when they've been flopping around on the ground, I have never noticed a significant drop in performance. I am curious as to what others may have experienced.

    What do you all think?
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    Agreed. 10/10, awesome suggestion. But then will orbital stations remain, er, stationary, or will they be able to orbit too? And could there be an option to disable linear damping for just the planet sphere (Or a different damping value)?
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    I'm sorry, but i dont support this.

    This is a sandbox game, and I think that mechanics like this would be too complicated. Perhaps as a cool mod later, but not in vanilla. but its my opinion
     
    Joined
    Jun 19, 2013
    Messages
    387
    Reaction score
    62
    • Legacy Citizen 2
    • Purchased!
    • Legacy Citizen
    Either way, it would be a late-beta addition, but it does seem like a nice way to store ships, instead of having them just sit there.
     
    • Like
    Reactions: Ithirahad
    Joined
    Oct 17, 2013
    Messages
    40
    Reaction score
    77
    Agreed. 10/10, awesome suggestion. But then will orbital stations remain, er, stationary, or will they be able to orbit too? And could there be an option to disable linear damping for just the planet sphere (Or a different damping value)?
    Ithirahad Well, you could have the stations be either stationary or mobile, really. If you entered a build block on the planet, any blocks placed high above the planet would most likely orient to the planetary building grid -- thus, they'd be completely stationary (relative to the planet and face it was built upon).

    However, if you built a station as a ship-entity and flew it into a continuous, circular orbit, it would orbit the planet independent of the planet's motion. I think.

    I'm sorry, but i dont support this.

    This is a sandbox game, and I think that mechanics like this would be too complicated. Perhaps as a cool mod later, but not in vanilla. but its my opinion
    therimmer96 Thanks for sharing your opinion! :) Although, IMHO I completely disagree that the point-based gravity region would disrupt the sandbox game. That's like saying Kerbal Space Program can't be a "true" sandbox because it has "complicated" mechanics.

    And, I'll even dispute your claim that this mechanic would be complicated. Why?

    The distance between the entity/player and a planet core is already calculated (navigation panel, anyone?). You'd just run a check on whether the player's distance is within the extended gravity region. If the condition is true, then apply a constant acceleration to the player in the direction of the planet core. Simple.

    If you wanted to be really fancy, you could even scale the gravitational acceleration as a function of distance from the planet.

    outer boundary of point-based gravity region = 0 acceleration
    inner boundary = max gravitational acceleration
    anywhere in-between = if(in region), then gravitational acceleration = f(distance)

    The f(distance) could be = C*1/distance^2. Wait, where did that crazy idea come from..?

    To be fair, you would be correct that this kind of gravity feature would be silly when applied to "plate" planets. However, when Schema upgraded the planet shapes to dodecahedrons, the basis for implementing gravity features changed. The dodecahedrons approximate spherical planets, and, thus, can intuitively handle spherical gravitational fields at extended distances. I am not asking for Schema to change the existing gravity - I am completely fine with it. I suggest this as a way to create a "hybrid" system between unidirectional and point-based gravity systems that can make planets more intuitive -- and feature-rich to expand the sandbox.

    Either way, it would be a late-beta addition, but it does seem like a nice way to store ships, instead of having them just sit there.
    MineCatFTW While I'd be fine if this feature was held off for a bit, I don't quite follow why it must be a late-beta addition.

    Also yes, you can store ships in orbit. But why only store ships...?
     
    Last edited by a moderator:
    • Like
    Reactions: Ithirahad

    Winterhome

    Way gayer than originally thought.
    Joined
    Jun 29, 2013
    Messages
    1,929
    Reaction score
    636
    All that really would need to be done is to get the positions of the planet and the objects in range of gravity and apply force to them in the direction of the planet. Doesn't even really have to be calculated every tick as long as it's calculated something like 5-10 times per second. Doesn't need reorientation for players or anything like that - just a force. :P
     
    Joined
    Sep 3, 2013
    Messages
    757
    Reaction score
    109
    • Community Content - Bronze 1
    • Legacy Citizen 7
    • Legacy Citizen 8
    I so agree with this.
    Not sure why would you need a spy sat or guns aiming at equator but it would make a nice function
     
    Joined
    Oct 17, 2013
    Messages
    40
    Reaction score
    77
    All that really would need to be done is to get the positions of the planet and the objects in range of gravity and apply force to them in the direction of the planet. Doesn't even really have to be calculated every tick as long as it's calculated something like 5-10 times per second. Doesn't need reorientation for players or anything like that - just a force. :p
    Azereiah That's a good point -- I didn't consider reorientation of the player. I totally agree, they wouldn't need to be reoriented unless they fell below the lower boundary of the extended gravity and entered the influence of the surface plate gravity.. I'd imagine that they'd then reorient.
     
    Last edited by a moderator:
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    I kind of like this idea, but it already is hard to maintain a steay position near the surface of a planet, I don't thinkI will like it.