Best way for simple game-loop in Javascript?

前端 未结 8 588
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 01:51

Is there a simple way to make a game loop in JavaScript? something like...

onTimerTick() {
  // update game state
}
8条回答
  •  心在旅途
    2020-12-14 02:44

    This page sums it up nicely: http://nokarma.org/2011/02/02/javascript-game-development-the-game-loop/index.html

提交回复
热议问题