|
Post by airc777 on Dec 19, 2018 13:35:08 GMT
So if you have a lot of projectiles with fuses in transit to a target at the same time it causes the game to lag, makes building flack guns less fun. Would it be possible for instead of each of the fuses running their own separate logic to instead create one capsule or sphere game object on top of the target that approximates the detonation range of the projectile and then have it be the thing that checks every tic weather any projectiles have gotten in range to detonate? Then you could have it start a detonating script on the projectile that takes the input vector and velocity of the projectile and out puts the shrapnel or nuclear yield. That should cull the total number of running scripts from the total number of projectiles in transit to just the capsule script and the number of projectiles currently detonating. A capsule could approximate the shape of hull length and hull diameter plus detonation range relatively closely, I guess you would add logic for a flattened cube volume to accommodate radiators.
Posting here instead of suggestions because I haven't actually looked at the games code.
|
|