My game is lagging alot and I'm not sure how to fix it

1 Like

I’m guessing its the overlap blocks that are causing the lag!
For example, this code is meant to cause hearts when you touch a green tile and make the player speak when they touch an enemy:


However, this code will actually run for every frame (fraction of a second) that the player is overlapping either of these things.
So, each of these blocks could run THOUSANDS of times before the player gets out of the way, causing a lot of lag!
I’d suggest using a cooldown like this so the same overlap can’t happen too often:

Here’s the link, and let me know if there’s another way the game is lagging that I missed!
Also, I love the art and story in this game!! The opening really got me invested in the story and the characters are so cute :laughing:

2 Likes