Power and Sheild Issues

    Joined
    Jan 1, 2013
    Messages
    772
    Reaction score
    452
    So I have found some issues from using lots of power/sheilds (Using http://starmade.org/content/max-reactor-continuation-project-hangman as a benchmark, with 1million sheild blocks added)

    • Power/Sheild Initiation - Either the power is finishing its calculations before sheilds, or its set to be done before sheilds even start, this isnt a problem in itself, its just highly noticeable in the higher numbers with power being updated minutes before sheilds are updating (all starting after the actual blocks are loaded)


      This really becomes an issue in 3 situations

    • First, when a ship is loading in, it is vulnerable for litterally minutes (perhaps locking the core and giving invulnerability until fully loaded would solve this?)

    • Second, the same update problem is a MAJOR issue when blocks are destoryed, it takes minutes before the ship actually registers the loss of power/sheild blocks (the blocks are gone, but their contribution to the ship stays for minutes)

    • Third, is that other ships trying to load in at the same time are stuck in que behind the massive calculations of the large ship, meaning that all ships not previously loaded into the sector are gimped until the large ship (or ships... god forbid) is finished calculating.

    [*]
    Sheild Lag - When shooting at shields they eventually begin letting damage through, BEFORE the sheilds are even close to failing. I tested this on several servers and it seems dependant on the servers hardware (weaker servers let damage past sooner) This sheild lag effectively reduces the potency of sheilds the more people/guns are shooting at it (as well as by increased cannon speeds)
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Very interesting!
    All cluster calculations are actually made asynchronous by server and client. This means the calculation can be already be completed on the server while the client is still loading. This might explain some of the shields-letting-through-damage issues, since it can happen that with dependence on power, the values might actually get out of synch (only synching up again when not active).
    I\'m thinking about doing the calculations on the server only and transferring the absolute values, but that could rip up the network performance, since those updates could be frequent and many.
    Maybe I\'ll do some kind of hybrid, where values are forces to synch every few cycles.
    This would however all be not a problem when I manage to optimize the cluster calculations. The current approach is pretty brute force, and as you experienced it doesn\'t scale very well. There are still countless options to optimize in this part of the code. The time to recalculate on block deletion could be optimized to instantly for example.
    I\'ll probably facilitate something from the same algorithms that are usually used in broadphase collision detection since the goal is kind of similar mathematically.
     

    gt

    Joined
    Mar 20, 2013
    Messages
    11
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    https://code.google.com/p/starmade/issues/detail?id=2