Random gravity

    Joined
    Jul 31, 2013
    Messages
    132
    Reaction score
    0
    I'd like each planet in SM had random gravity, so on one you'd have hard time moving around without vehicle while on others faster way would be to jump around (with jumps like 4-6 blocks high).
     
    Joined
    Sep 4, 2013
    Messages
    267
    Reaction score
    1
    This would be fun, and probably rather simple to implement, because as far as i understand, the gravity in starmade is simply a force that pulls \"down\". So gravity probably works this way:

    for(everytick)

    {

    ...

    If(playerincertaindistanceaboveplanet)

    {

    playercoordy=playercoordy-somenumber;

    collisioncheck();

    }

    }

    If i am right, making \"somenumber\" random for each planet will reach the goal.
     
    Joined
    Jul 31, 2013
    Messages
    132
    Reaction score
    0
    Actually, it\'d be playery+somenumer as lower number=higher/more to left position is. But overall you\'re right - this would be easy to code.