You are previewing Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL.

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Cover of Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL by James L. Williams Published by Addison-Wesley Professional
O'Reilly logo

3. Learning JavaScript

Although the title of the book explicitly calls out SVG, HTML5 Canvas, and WebGL, they wouldn’t be able to do much without the help of JavaScript. SVG, Canvas, and WebGL need JavaScript to drive the interactions between the user and the game. JavaScript also provides the basis for libraries and languages such as GWT and CoffeeScript, which are referenced later in the book. Node.js, also covered later in the book, uses JavaScript to run server-side code. In this chapter, we will cover the basics of JavaScript, along with some useful utilities and libraries that will aid in creating games, and use a JavaScript library to create your first game.

What Is JavaScript?

JavaScript is a loosely typed dynamic language that began ...

The best content for your career. Discover unlimited learning on demand for around $1/day.