FPErfvv / Tank-Game

0 stars 0 forks source link

change code to only update the hitboxes of the sprites in the list of sprites within a certain range of the main character. #10

Open FPErfvv opened 2 years ago

FPErfvv commented 2 years ago

This will improve the performance of the game, as the calculations for the hitbox take a lot of processing power. When the game was ran with a few thousand game elements while updating their hitbox, it was very laggy. With the same number of cows but without updating their hitboxes it ran much faster.