ZakShearman / mc-tower-defence

Tower defence gamemode for minestom (EmortalMC)
GNU Lesser General Public License v2.1
11 stars 1 forks source link

perf: Opportunistic optimisations for findPossibleTargets #84

Open ZakShearman opened 1 month ago

ZakShearman commented 1 month ago

Currently, findPossibleTargets will find all the possible targets within range which is then filtered separately.

We can alleviate some memory pressure by allowing it to skip irrelevant targets - e.g. if we only want 1 target that is the furthers along the path