O'Reilly logo

HTML5 Game Development HOTSHOT by Makzan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up the canvas and EaselJS

In this task, we will get the project prepared for the CreateJS canvas game.

We will have the code skeleton ready for different modules, and we will initialize the CreateJS environment with a "Hello" message.

Prepare for lift off

Let's create a new folder for our project. Inside the project folder, we will create the following files/folders structure:

index.html

scripts/game.js

styles/game.css

vendors/easeljs-0.7.1.min.js

The vendors folder is used for external code. In this task, we put the downloaded easeljs.0.7.1.min.js file in this folder.

In the index.html file, we will construct a basic HTML structure, which is shown as follows:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Multiply ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required