I’m having another issue with this game in that after the player dodges the first set of obstacles, the game stops and the loop does not repeat. I don’t believe it’s crashing because it’s very consistent, as soon as the squisher sprites either squish the player or touch each other, the game simply stops running.
For debugging convenience, I’ve set a ton of console.log statements (slows the game down a whole lot) and I remixed the project so that the game automatically starts and the player automatically escapes from the trap.
What I expect to happen: If the player dodges or gets caught in the trap, the loop should continue. I even tried adding a new level in case it was getting stuck inside of the levelOne() function somehow.
What actually happens: The game stops running altogether as soon as the squisher sprites touch each other or both are touching Kurt.
What I’ve tried: I added a bunch of console.log statements to observe that all functions are reached successfully, and that the end of the loop is reached successfully, but the loop does not restart. I also tried adding the next level in case the program flow was somehow getting stuck inside the levelOne() function. levelTwo() starts successfully but the loop does not continue, as the player cannot move after the level is complete.