KL-Corporation / Koponen-Dating-Simulator

Flagship Product of KL Corporation
0 stars 0 forks source link

Possible bullet optimisation #104

Open NALStudio opened 5 months ago

NALStudio commented 5 months ago

If bullet is iterated multiple times, it might be worth to cull out all of the enemies that will never be in the bullet's path.
compute a big rect for the whole path first and if colliderect, add to entities list

NALStudio commented 5 months ago

What if an entity is spawned/despawned during bullet travel? We have no way to guarantee world immutability as we pass the enemies as a list argument...