Game Development Reference
In-Depth Information
Figure 11-1. The completed Space Hero game
Before getting into the game code that drives the Space Hero game, let's take a look at the files you will be using
and reusing to build the application.
Preparing for the Project
Several files and procedures need to be set up for the creation of this game project. This section will walk you through
the necessary steps to prepare for the Space Hero game.
Setting Up the HTML
The HTML file used for this game will include several JavaScript files. It will also create an instance of the application
and fire its init function, which will initialize the application. The index file will also be used to declare a handful of
global variables for use throughout the application. Listing 11-1 shows the entire index.html file.
Listing 11-1. The index.html File for Space Hero
<!DOCTYPE html>
<html>
<head>
<title>SPACE HERE</title>
<!--CREATEJS-->
<script src="js/lib/easeljs-0.7.1.min.js"></script>
 
Search WWH ::




Custom Search