StarMade dev update: why spherical planets don't fit in a block world

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Hello players,

    The newest update is currently in testing, and will come very soon.



    Meanwhile I did some proof of concept. While I always knew that spherical planets in a full 3d block world give problems, I've never actually tried to do it. Until now.



    don't get excited, this will probably not come in this way. It's a showcase I implemented. Maybe I'll add it as a gimmick one day, but I doubt it will be worth much.

    There are 2 basic ways used in games to project a plane or a cube to a sphere.

    The first one is simple spherical coordinates. You may have seen this on youtube on some other engines maybe. It looks great, but has one deciding disadvantage: the planet is not full 3D. It's just a simple visual effect. The planet surface is a plane that is warped (kind of like very wide lense photo cameras) by converting all the points into spherical coordinates and make the ends repeat (so it loops). But a plane has as we all know only one up direction, and while you could have the visual effect of it even rotating, other objects would have to be warped in the same way as the planed surface. It looks like it's working, but without a real 3d space, there will be logic problems with every other object not in that planet's context.



    The other one is what I used. It allows the planet to maintain its logic as a full 3d objects. However it also warps space: What is done is that the object is "spherified" from a cube shaped planet:



    You can see where the problems with that would come in: What to do with the gaps of 90 degrees? The spherification makes some strange shapes on the seams. The generation would have to be adapted on the seams. Other objects around it would either be normal which would be strange on a round surface (making it bigger would not really solve the problem), and the physics performance would be crippling, or it would warp with the planet, which would magnify the blocks the farther away the ship is (in that sector).



    Now some general problems with spherical objects: Performance of physics. Collision with a non box object is as you can imagine way harder. It's not only harder is several magnitudes more performance taking. While there is a way around by warping the object itself into the context and then do a normal collision, the work, very likely glitches, and bugs of doing so is just not worth it. Every aspect would have to be warped too: lasers, missiles and anything else would all be strange.

    Another general problem is that more than one standard is used to do things. Not only can that very confusing for the player, the core has to be always implemented for both cases.

    The nature of warping also magnifies blocks the farther they are from the zero surface. Adding more equally sized blocks per layer would kill performance as it would destroy the logic of the grid. Same problem with ships flying away or landing. Either the blocks of the ship grow as the ship flies away, or the blocks of the planet could have a different size as the blocks of the ship, and that not only is crippling for physics, and other calculations, it would also look and feel very strange.



    My solution will be a spherical two sided planet. Like putting another one on the bottom of the current planets, and elevating the middle a little. OR, a cube planet kind of like in the picture, but tugged in. The problem is that it's impossible to determine what direction the gravity should go, if for example a corner is mined out, and the player is standing right in the intersection of the polyhedrons of the cube.



    I hope I was able to explain myself. It's not that I wouldn't want to have spherical planets, but I don't want to destroy the simplicity of the block system for it.



    Thanks for playing StarMade,

    - schema
     
    • Like
    Reactions: Dire Venom
    Joined
    Aug 15, 2013
    Messages
    7
    Reaction score
    2
    • Legacy Citizen 2
    • Legacy Citizen
    • Purchased!
    I would say the third way i am thinking where it is a planet on both sides so not completly flat on either side.. now or just leave as is.. this would still come into play with gravity and such.. just like floating chunks of the worlds left... But coding all this is a pain and i understand all this and i support you 99.9% (have to take 1% as not agreeing what makes comments the best :P ) So with that i would say just stick to what is the best for you and enjoyable for game play get the core working and solid (which is pretty well done) then work on adding things..
     
    Joined
    Jul 28, 2013
    Messages
    53
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    The first screenshot looks way too awesome. People will never let go of spherical planets. Don\'t tease them so much. I like the orio idea. I also think that flat planets give the game a personality even if I didn\'t like them at first. Keep it up!

    Und nen schönen Gruß aus Dortmund :)
     
    Joined
    Jun 20, 2013
    Messages
    94
    Reaction score
    0
    HEMISPHERES, Schema. That is how you do it. Half the sphere is the actual planet that functions the same as the flat discs in the game right now. The OTHER half of the planet is its atmosphere. Simple enough, all that changes is the structure of the planet, you don\'t even need to mess with gravity or anything.
     
    Joined
    Jan 23, 2013
    Messages
    8
    Reaction score
    0
    You could just make it a cube, without the 90 degree drops, make it so when you walk to the edge of the cube and over the gravity changes or something, that way it\'s still a cube and you can dig to the center. You put four square together at the bottoms, just push them inwards so the top soil areas all touch and then it would Look better I imagine.
     
    Joined
    Jan 23, 2013
    Messages
    8
    Reaction score
    0
    IF you can fix the gravity problem on the outsides of a cube world, just fill the center with lava that kills people and you can\'t mine it, that simply solves the weird gravity problems you would have at the center
     
    Joined
    Jul 28, 2013
    Messages
    53
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    If you can salvage half the planet, you would end up with switching gravity directions all over the place. This would be especially problematic in caves or mines.
     

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    Did you not read. Determining the gravity on the edges of the cube is an issue. If you make one side of the cube larger or smaller how will the gravity know which way is down. You could extend one side of the cube to be larger and when you walk to the extended edge you would suddenly flip sideways because now youre in the other sides gravity. Its hard to explain without a diagram, but basically the its too much work to have the game determine exactly which direction the gravity should go.
     
    Joined
    Jul 11, 2013
    Messages
    44
    Reaction score
    1
    Woah, this is looking promising.

    Your game will be fantastic once you\'ve added more touches and fixes. (It already is fantastic!)

    Thank you for spending so much time on it. We appreciate it alot, Schema!
     
    Joined
    Jun 30, 2013
    Messages
    2
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Hey schema!

    You could implement the planet system of games like Freelancer. That means, you create visual objects (cube shaped planets of different colors) in the normal star system and then add the ability to enter them from every side. You then could create a simple plane world (like minecraft) where you land after entering the planets athmosphere (you always land on the same spot no matter where you enter from utside). This plane world would not be visual from outside and would be functioning as a disconnected place from the star system, but it would be in the same \"time\" as the universe around it, so players could enter and leave in real time.



    Thanks for making StarMade,

    - =3
     
    Joined
    Jul 11, 2013
    Messages
    84
    Reaction score
    3
    • Legacy Citizen 2
    • Legacy Citizen
    The only thing I found dissapointing in this game was when I saw the planets... two sided would be an improvement but still not as great...



    Sure, spherical ones would be great but indeed they have problems... however, cube planets would make sense in this cubed space and I vote for them instead of two sided planets.


    OR, a cube planet kind of like in the picture, but tugged in. The problem is that it\'s impossible to determine what direction the gravity should go, if for example a corner is mined out, and the player is standing right in the intersection of the polyhedrons of the cube.


    There is no middle ground... the player is on one side of the cube, if he can get on that exact coordinate that you fear so much then just randomly pick one side and stick with it until he moves to an actual side.

    Player view should rotate smoothly to accomodate the change in plane, I can just imagine it working... I really don\'t see how it can make problems with gravity since it goes outwards from the middle block core of the planet in a triangle style.
     
    Joined
    Jul 4, 2013
    Messages
    124
    Reaction score
    20
    • Community Content - Bronze 1
    • Legacy Citizen 7
    Yeah I think this will be great in the future. In the other hand, if I think about new bugs that will bring, not really...

    I really love this game because it give me opportunity to build something cool looking, fly it around and blow up other people with it. I don\'t care about how planets looks right now.

    I was Minecraft player, but something was always missing in that game, opportunity to move things that I built, even with some mods. Then I start plaing KSP, a lot of fun but nah, there is only singleplayer and building is some sort of restricted to parts.

    So you always saying to us that you thanks for playing StarMade, I wanna thank you for making this game for us ;]
     
    Joined
    Jul 11, 2013
    Messages
    84
    Reaction score
    3
    • Legacy Citizen 2
    • Legacy Citizen
    Hmm, actually, I think I understand what the problem is... @schema, how about this, dynamic gravity plane:



    The middle brown part would be the planet... on the top-right side it is in its normal state, gravity on top pulls perpendicular to the ground and on the right the same way... but in between the planes it pulls directtly towards the center.

    On the bottom-left part the planet is digged through and the fixed gravity planes won\'t work... however, if you make the gravity planes dynamic so they follow the shape of the ground, then it would look like that and it would still make sense and pull people/ships properly towards the ground.

    If you need further info about this method please ask as I think I didn\'t properly explain it but I feel that it\'s the best way for cube planets to work with propper gravity.
     
    Joined
    Jul 11, 2013
    Messages
    84
    Reaction score
    3
    • Legacy Citizen 2
    • Legacy Citizen
    Just no :( two sided planets are way better than that.
     
    Joined
    Jun 20, 2013
    Messages
    146
    Reaction score
    26
    • Legacy Citizen
    the sphere planet looks so great D: aaargg makes me sad just looking at it. its a shame planets won\'t be like that, but i guess what can\'t be done, can\'t be done :\'( .
     
    Joined
    Jun 7, 2013
    Messages
    403
    Reaction score
    67
    • Purchased!
    Spherical two-sided planets seem the best choice, to be honest.
     
    Joined
    Sep 6, 2012
    Messages
    396
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    why people dont get the obvious. This is NOT about round or not. But where are the fucking elephants and the turtle, damit?