UoB-COMSM0110 / 2024-group-3

0 stars 2 forks source link

Bug fix: Garbage collect data after game over #38

Open chriskerrc opened 8 months ago

chriskerrc commented 8 months ago

After multiple game instances have been played through, and the user has exited to the main menu by pressing ESC each time, the game overall slows down. Exiting and restarting the game is a workaround. Ensure that data is deleted and does not persist in the background.

chriskerrc commented 7 months ago

On game restart, sometimes you collide with objects from previous instances of the game, because they haven't been cleared from the metadata.

chriskerrc commented 7 months ago

When the snake dies, need a cleanup/reset method to destroy unused data/objects. Currently, data from previous game sessions are persisting. Do this within the existing GameOver() method in Main.pde

chriskerrc commented 7 months ago

Ensure that every object that's being pointed to in GameScreen is torn down.