fufihiuse / Slorpus-Slaughter-VII

106 group game
4 stars 0 forks source link

Optimize bullet dereferencing in PhysicsManager.CollideAndMoveBullets #18

Closed the-argus closed 2 years ago

the-argus commented 2 years ago

instead of recreating the whole bullets array every time a bullet hits the wall, remove it and then after CollideAndMoveBullets go through and clean up the "dead" bullets. Idk how to indicate that a bullet is dead since they can't be null, maybe set their coordinates to a really large number or something.