Download

Best Way to Destroy Projectiles in Vertically Scrolling Shooter

Happy Tuesday Everyone!

What would be the best/most efficient way to destroy the player (and enemy) projectiles in a vertically scrolling shooter?

I have two ideas:

  1. A collision box at the top of the screen that travels forwards as the player travels and destroys all the bullets that hit it.
  2. Just kill of the projectiles after a certain period of time
  3. Or perhaps a number 3. that I haven’t thought of?

Any thoughts on what might be the best method? Thanks!

Giving them a certain lifetime is probably a bit more easy on the resources and less computationally intensive, so I would probably go with this solution. But that is just a guess.