If you notice I made some global variables, I would move these global variables into a group and they become local variables.
Then run the game, the local variables are broken.
Do you know why?
Make them static
Kurz It worked!
I'm still unaware about "static" option... What does "static" mean? and What happens if is not "static"?
Develop games in your browser. Powerful, performant & highly capable.
What I know from C++ that static variables still exist after you leave the cycle, to example. But just local variables are destroyed.
Kurz Thanks for clearing that!