Question derived from this tweet:
@Vincent_Scheib, thoughts on using using two loops for a HTML5 game: one requestAnimationFrame for rendering, and one setInterval for logic?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
Experimentation and prototyping are likely the only way to get the right answer for a given game, so I encourage keeping code easy to re-work into different loop paradigms. My thoughts: