physics dilemma, assign sector to large objects?

    Joined
    Jan 29, 2013
    Messages
    67
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Physics dilemma: To keep StarMade as modular and extensible, the sector system described above is used. Every sector is using it's own physics context to handle scalability and number limits (float/double problem).

    • There has to be a function for secure transitions of objects from one in the next physics context. This is one of the most complex procedures (although it sounds easy at first): Bigger Objects can intersect the sector border: what sector does it belong to? The sector that has the bigger part of it of course. But now what happens if another object in the sector which the big object doesn't belong to collides with it? ... I basically have implement some kind of "bubble" which is formed around near objects to make sure they are in the same physics context.



    After reading this I have to wonder if some of the larger vessels could simply be assigned their own sector bubble like a planet?
     
    Joined
    Apr 14, 2013
    Messages
    8
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    its a very tough issue and has got me thinking hard

    is it possible that an object could exist in 2 sectors at the same time while only being rendered once?
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Yeah, it\'s possible. The problem is, that the collision detection would be independent, meaning, if the physics entity (of the same object) gets hit in one sector, there would have to be a way to tell that information to the entity of the other sector.

    The bubble system has it\'s own problem. On the border of void to a system there this is especially hard to solve, since there is no soft border if the rotation isn\'t zero.



    I might have to go a duplication of next-sector entities: the big ship\'s physics entity is duplicated into the sectors it\'s intersecting. I will have to handle the synchronization of both resulting entities somehow.
     
    Joined
    Apr 13, 2013
    Messages
    25
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Do sectors really have to have adjacent connections? It sounds like it\'ll an endless headache, never mind the bugs it\'s already causing. If you can make it work, great. But maybe it\'s better to start with something simpler?

    For example, place harder separations between sectors. Perhaps use some FTL doohicky to explain that 2,2,2 is too far away to interact with 2,2,3. Players who run around the \"edge\" of a sector simply jump to the next one, and have no further interest with the previous sector.

    The more isolated sectors are, the easier it is to place them on entirely separate threads and have higher scaling limits.