Is there a simple way to make a game loop in JavaScript? something like...
onTimerTick() { // update game state }
Yep. You want setInterval:
function myMainLoop () { // do stuff... } setInterval(myMainLoop, 30);