I am trying to make Among Us but its coded in JavaScript(originally in C++ in Unity) and I have run across a problem: My player can move off the screen! This is really frustrating, as I am trying to make a game that is bigger than the window height and width. There is no way I can add a minimal reproducible example, as my code relies on itself to work. But the code is here: https://editor.p5js.org/LttntLark/sketches/03MGbFiUhG ...
What I have tried:
I have tried moving the map, and not the player, then I realized I wanted this to be a multiplayer game. If you can, please help, as all of it is appreciated. If there is something missing, I am open to share more information.