I’m making a Space Invaders game, but I have a problem.
When the player presses the ‘space’ button, the game creates a new object of the class ‘Bullet’.
When a bullet hits an enemy, I’d like for the bullet and the enemy to be removed and forgotten completely. I don’t want the computer to waste any power on checking if they’re still there and should be rendered. How would I do this?
I’m making my games in pure Java, btw!