Shooting works now.
Instead of constantly creating and deleting bullet objects, I made a pool of 100 bullets that get reused throughout the game.
When a bullet is fired, one inactive bullet is switched on, and once it leaves the screen, it becomes available again. It should help avoid unnecessary slowdowns during longer sessions.I also added a short firing cooldown so holding the button down does not fill the entire screen with bullets.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.