HTML and CSS Reference
In-Depth Information
A Basic Game Framework
Now that we have gotten our feet wet (so to speak) by taking a peek at some of the graphics,
transformations,andbasicphysicswewilluseinourgame,let'slookathowwewillstructure
a simple framework for all games that we might want to create on HTML5 Canvas. We will
beginbycreatingasimplestatemachineusingconstantvariables.Next,wewillintroduceour
game timer interval function to this structure, and finally, we will create a simple reusable ob-
ject that will display the current frame rate our game is running in. Let's get started.
Search WWH ::




Custom Search