TheAdamSmith / precursor

0 stars 0 forks source link

Improve weapon targeting performance #43

Open TheAdamSmith opened 6 months ago

TheAdamSmith commented 6 months ago

With a large amount of enemies/players/guns the weapon targeting causes a lag in performance. This because we scan every enemy for every revolver every frame. We can fix this by reducing the number of times we calculate the targeting, caching the nearest enemies so we don't re poll all the enemies every time, or using some sort of area detection to poll enemies in a smaller area

mitchellkazin15 commented 4 months ago

This is less important now that we're not spawning multiple copies of the same gun on top of each other. Still probably worth doing at some point though