I'm just getting into the code now, so maybe I will have better ideas soon. But, as quick first input, I prefer to use the ArrowUp, ArrowDown, ArrowLeft, and ArrowRight keys. But I also noticed a slight movement of the canvas when using them. So, I added this code:
// added minus 5 to prevent canvas from being slightly too large,
// which caused it to move when using arrow keys
canvas.width = innerWidth - 5
canvas.height = innerHeight - 5
Hi guys im having some movement issues too. When I made the map bigger the ghosts started moving through certain parts including the outer edge which is weird. Any suggestions welcome.
Here's my live site....
https://spur-tech.github.io/PACMAN/
Here's my code.....
Want to participate?
Create a free Chris Courses account to begin