corenominal

Full stack web developer, interested in all the things, but especially the web, code, design, Linux, OS X, PHP, WordPress, JavaScript & robots.

Quick Tip: How to Make a Game Loop in JavaScript image/svg+xml

The “game loop” is a name given to a technique used to render animations and games with changing state over time. At its heart is a function that runs as many times as possible, taking user input, updating the state for the elapsed time, and then drawing the frame.

In this short article you’ll learn how this fundamental technique works and you’ll be able to start making your own browser based games and animations.

A good introduction to writing a game loop with JavaScript and the HTML5 canvas element.

Leave a comment

Your email address will not be published. Required fields are marked *