Shield Projection

    Joined
    Mar 11, 2014
    Messages
    5
    Reaction score
    0
    • Legacy Citizen
    Let me give you a scenario lets say you are flying a carrier ship into combat and when you release fighters they are instantly destryoed by enemy heavy ships. Well basically what happens is instead you boost your shields out making them weaker by 5% by every block extended out of the ship this means your fighters can safely leave your ship before being blown up, but while your shields are extended enemy ships can fly inside and damage you while your shields are out. A way to stop people from just instantly moving shields back would be a system so that when you pull your shields in they have to turn off for maybe 2-3 seconds per block, this would allow for players to have to set up ships to protect your valuable carriers while unloading fighters.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    Shields were originally bubble shields, but the engine had trouble with all of the spheres. While I like the idea, it might not be practical to implement.

    How about carriers can transfer shields to their squadrons, while the members of that squadron are within a certain distance of the carrier? However, this transfer is not 100% efficent; to transfer 100 shields from a 500m carrier to a 15m fighter would require 120 shields from the carrier. And the larger the fighter in relation to the carrier, the worse it is. A 100m \"fighter\" deployer from the same carrier would require 400 shields from the carrier for 100 shields for the fighter.

    This ability would be togglable, and could also be done with stations.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Shields were originally bubble shields, but the engine had trouble with all of the spheres. While I like the idea, it might not be practical to implement.


    Afaik bubbles (even if scaled to elipses and rotated) should be better to calculate then 100000 single blocks.

    Maybe it caused lagg because ships weren\'t that big and calculating 100 boxes was faster.



    But I think with all the things Schema should have learned while deving StarMade, it could be enough to implement it in a better way.



    My idea of how to solve this is:


    1. Do not rotate the ship to it\'s angle. Rotate incoming projectile\'s coordinate system to make the ship be not rotated (turn with inverse ship angles).

      • Most projectiles neither need scale nor rotation, just movement (2 points), thus make it faster to calculate (shorter version for a 4x4 matrix multiplication)
    2. Transform the coordinate system (3x + -) to make the ship sit with it\'s center at the coordinate 0 0 0. All incoming projectiles as well.
    3. Then calculate x/x, y/y and z/z for projectile/shieldSize
    4. Now check if x*x+y*y+z*z of the projectile is > 1 (not colliding now) or colliding 1 checks to save some multiplications or a single check after 2 additions.

      It is a lot faster to calculate if many projectiles are one cluster with the same movement and a relative movement to each other, as it saves a lot of transformations and rotations.