Sphere planet illusion from cube planet

    Joined
    Jul 5, 2013
    Messages
    372
    Reaction score
    0
    Just showing 1 way to make planet from cubes, kind of illusion of sphere when it's actually not. What you get from planet like this?

    • It is repeatable in X and Z axis just like real planet. If you fly plane in 1 direction, you come around where you started, and all you ever saw was flat (a little round) surface.
    • There are 2 states: space and surface. In space state, gravity is calculated as sphere, towards the planet like Newton's physics for example. In planet state, gravity is directed towards the cube surface bottom. It is all very simple math.
    • You do not need loading screens for state transition. Only thing this has is planet voxels, exactly same way as there already is. Some kind of quick cloud phase might be required, but not necessarily. The coordinate mapping with angles as explained in image, should represent the real planet surface from 3D to 2D pretty good. Pole areas may have rapid movement in X-axis though.
    • Bottom of the cube should be impenetrable, perhaps some new kind of lava-core block that cannot be destroyed or moved through.
    • I recommend having planets loaded in chunks, so we could even have giganticly big planets.

     
    Joined
    Jul 5, 2013
    Messages
    372
    Reaction score
    0
    And no, i don\'t claim to be first one who came up with the idea, many people here have already talked about this. But also many that haven\'t grasped the concept.
     
    Joined
    Jun 24, 2013
    Messages
    130
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    I can sort of see what you\'re suggesting, but I\'m afraid I think it only makes sense to you at the moment. You need to put a lot more explanation into this.
    Think about how you could explain it to someone who doesn\'t have the faintest idea of what you\'re going on about.

    What are the blue rectangles, white dots, and grey/red dividers supposed to be?

    What sort of co-ordinate system are you using for the sphere?

    Also, the planetary gravity would not be simple as it currently is. Simple to think about perhaps, but likely not to implement. Currently, gravity is purely a single directional vector right now. It doesn\'t have a single point that it \'radially\' heads towards, it doesn\'t have the inverse square law, and it doesn\'t even trigger/activate as someone would intuitively expect.
    If you do even use the inverse square law, it would be incorrect once you start removing voxels as it\'s only applicable above the surface of a planet. As you get deeper into a planet, the force of gravity decreases.

    Having a single \'looping\' plane is a very compelling solution. However, implementing it would likely require a large engine revamp/addition, and wouldn\'t work if some huge ship decided to destroy the planet from space.

    In fact, having a large ship attempt to destroy a planet from space is pretty much the reason why many of these \'illusion\' suggestions will not work as the planet needs to be within the same frame of reference as the rest of space.
     
    Joined
    Jul 5, 2013
    Messages
    372
    Reaction score
    0
    The blue rectangle represents a player made building on a planet. He built 2 of them, and the planet stored in memory is just 1 of those 16 cubes, it just repeats forever visually. But he will never see more than one instance of each building at the time, because roundness for the surface will be applied. Programmatically if:
    PlayerX = PlayerX+1;
    if (PlayerX>=PlanetSizeX) PlayerX = PlayerX-PlanetSizeX;
    (Player coordinates on the surface loops within boundary of [0..PlanetSize[ and that is why infinity is possible)

    Sphere coordinates i explained above. 2 vector angles towards planet is mapped to X, Z coordinates on the surface of the planet.

    About gravity, it might be enough that it would only start pulling when player gets close enough, and the surface state activates. At that point gravity is simply reducing Y coordinate of the player.

    Large ship can destroy planet like this from space. As explained above, the coordinate system goes 1:1, and each projectile can be mapped coming from space to surface, same way as player\'s ship is. It matters if player approaches from above or below, it will map to different location on the planet surface.

    Also as programmer i can give you the complicated \"pseudo\" formula for spherical gravity :D


    float d:=vectordist(@player.pos, @planet.pos);
    if d>0 then begin
    d:=G_FORCE / (d*d*d);
    vector3 vec:=(planet.pos - player.pos) * d;
    player.movement:=player.movement + vec;
    end;