Chapter 3. Understanding the Gravity of HTML5
Before we dive into the game that we'll build in this chapter, we will examine why writing applications in HTML and JavaScript can be difficult when deploying in multiple different browsers. We will focus on simple and practical solutions to these problems, especially with regards to HTML5 and the latest APIs used today.
The game we will build in this chapter will be a basic jelly wobbly gravity game. It will make use of HTML5's new API for vector graphics, native audio manipulation, and drag-and-drop. As the backbone of the rendering system for this game, we will use the old JavaScript timer, which, as we will see, is not at all appropriate for games such as this one where we need multiple updates per second. Thankfully, modern browsers have solved this issue, and taken into account the need we have for highly efficient rendering engines. However, we won't be discussing this new feature until the next game. Just for completion, this new feature...