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 Defense</title> <link rel="stylesheet" href="styles/game.css"> </head> <body> <header> <div class="row"> <h1>Multiply Defense</h1> </div> <...