Welcome to the forum.
I have never known software to develop a bug unless the programmer has made changes to the code.
For future reference when posting code for others to read please note
- Format the code in Processing (Ctrl + T) before copying it to the forum - your code has irregular indentation which makes it really difficult to follow the code logic.
- The code posted is too long and can’t be executed. In this situation try and create a small executable sketch that demonstrates the problem.
It is unlikely that these are the cause of the problem it is almost certainly a logic bug in the sketch code. As I said you have over 200 lines of code that I can’t run because I don’t have the graphics and sound files.
I have looked at the code and the only thing I can see is that you don’t appear to clear the background for each frame so the display is built up with each call to draw. Most sketch animation makes the use of the background(...)
method being called at the start of draw()