You are browsing as a guest. Sign up (or log in) to start making projects!

25m 22s logged

I just fixed two bugs/issues:

  • Made it so you can no longer click a button while the game is running
  • Fixed a bug where if you mashed two inputs in the same frame, your snake could crash (e.g. moving down and mashing the right and up inputs). I fixed this by adding a check to make sure you can only switch directions once per frame.

How I did it: I made a boolean called hasMoved, set it to false, and made it check for if hasMoved was false. It also sets hasMoved to true after you change direction and sets it back to false at the end of the frame.

0
5

Comments 0

No comments yet. Be the first!