KL-Corporation / Koponen-Dating-Simulator

Flagship Product of KL Corporation
0 stars 0 forks source link

Possible bullet optimisation #104

Open NALStudio opened 1 week ago

NALStudio commented 1 week 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 1 week 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...