(A) solution to lag from previously-docked entities colliding

    Joined
    Aug 23, 2016
    Messages
    758
    Reaction score
    129
    When an entity that's docked to another gets shot off the lag caused by collisions between the two is problematic, especially when one entity was inside the other.

    For a solution, when one entity (the child) gets shot off another (the parent) allow the entities to collide for a short time (a fraction of a second) or until their travel directions are confirmed as different from each other, and then turn off clipping for the child entity until it has completely cleared the parent entity.

    This isn't a perfect solution (there probably isn't one) - we'd sometimes see detached internal entities float out *through* their surrounding parent entities - but it's effective,relatively simple, and doesn't require changes to game mechanics.
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    When an entity that's docked to another gets shot off the lag caused by collisions between the two is problematic, especially when one entity was inside the other.

    For a solution, when one entity (the child) gets shot off another (the parent) allow the entities to collide for a short time (a fraction of a second) or until their travel directions are confirmed as different from each other, and then turn off clipping for the child entity until it has completely cleared the parent entity.

    This isn't a perfect solution (there probably isn't one) - we'd sometimes see detached internal entities float out *through* their surrounding parent entities - but it's effective,relatively simple, and doesn't require changes to game mechanics.
    I'd talked this over with a few other devs I know. This is likely the solution I'd look for. Possibly adding explosions like power aux between the two as well.
     
    • Like
    Reactions: El_Shanta
    Joined
    Jan 1, 2015
    Messages
    923
    Reaction score
    292
    • Community Content - Bronze 2
    • Purchased!
    • Thinking Positive
    ... until it has completely cleared the parent entity.
    In order for the program to know whether or not the entity has cleared the parent, it would have to do collision detection. The end result is that this would not change the lag situation one iota. The lag is not caused by the game 'reacting' to a collision. The lag is caused by the game needing to calculate collisions.

    Instead, the game needs to react to a docked entity's rail or docker being destroyed, 'not' by sending that entity careening through all sorts of things that it will have to calculate collisions for. Instead the entity should simply die and become dead weight. This is the suggestion I made in 'Ghost Rails'. An entity with a destroyed rail docker or docked to a destroyed rail should simply do nothing at all. It should stop generating power and shields, it should stop passing power and shields up the chain, it should stop rotating, it should stop firing if it is a turret gun, it should do absolutely nothing. All of it's functionality has been destroyed, and it should just sit there. All it would do is be dead blocks that might soak some damage.

    We need to come up with mechanics that MASSIVELY reduce lag, most especially when large ships and large fleets start taking damage. The solutions cannot be tiny, as the problem is huge. Going with the ghost rails suggestion would make lag actually go 'down' as large ships and fleets take damage. (!!!)
     
    Last edited:

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    Panpiper You just use the cheap bounding box instead of the expensive vertex, or block algorithm
     
    Joined
    May 12, 2016
    Messages
    86
    Reaction score
    8
    I'd love to see this tied into some of the recent armor discussions. When SHP is over a certain amount and a docker gets hit, it locks up. When below the threshold, it detaches and noclips out beyond the bounding box. Makes the combat feel more dynamic (stuff malfunctions early as you take damage, then things fall apart later as damage accumulates)
     
    Last edited:

    Erth Paradine

    Server Admln & Bug Reporter
    Joined
    Feb 15, 2016
    Messages
    239
    Reaction score
    58
    I'd talked this over with a few other devs I know. This is likely the solution I'd look for. Possibly adding explosions like power aux between the two as well.
    Hmm, damage to the colliding entities...I like this idea. Although are we reinventing the wheel here (e.g. existing collision damage mechanic).
     
    Joined
    Aug 23, 2016
    Messages
    758
    Reaction score
    129
    In order for the program to know whether or not the entity has cleared the parent, it would have to do collision detection. The end result is that this would not change the lag situation one iota. The lag is not caused by the game 'reacting' to a collision. The lag is caused by the game needing to calculate collisions.
    As nightrune said, precision wouldn't be needed, you'd just use the bounding box.

    Instead, the game needs to react to a docked entity's rail or docker being destroyed, 'not' by sending that entity careening through all sorts of things that it will have to calculate collisions for. Instead the entity should simply die and become dead weight. This is the suggestion I made in 'Ghost Rails'. An entity with a destroyed rail docker or docked to a destroyed rail should simply do nothing at all. It should stop generating power and shields, it should stop passing power and shields up the chain, it should stop rotating, it should stop firing if it is a turret gun, it should do absolutely nothing. All of it's functionality has been destroyed, and it should just sit there. All it would do is be dead blocks that might soak some damage.
    I don't dislike this, but it's drawbacks include not being able to shoot entities that are obviously intended to be "separate ships" off the ship they're docked to.
    It also sounds like a ship A shot off ship B would cease to function at all, which doesn't seem like terribly reasonable behaviour.
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    Hmm, damage to the colliding entities...I like this idea. Although are we reinventing the wheel here (e.g. existing collision damage mechanic).
    True, but it might be a bit easier since explosions have gotten revamped.
     
    Joined
    Dec 8, 2014
    Messages
    226
    Reaction score
    52
    • Purchased!
    • Legacy Citizen 4
    One solution too is better docking design. Part of the problem is everyone is only docking on one rail. Thanks to my meticulous paranoia and OCD, i have started experimenting with multiple rails and docks for my ship board docked entities. I have found that it not only adds realism to the game, and hopefully it will add survivability AND cut down on lag as things don't break apart from one well placed shot.