January 2016
Beginner
188 pages
3h 22m
English
To add the user interface and the game's functionalities, we will be needing JavaScript. We will need the following JavaScript files in the scripts folder:
app.main.jsapp.display_functions.jsapp.init.jsapp.key_handler.jsapp.movement_functions.jsapp.constants.jsOur app.main.js file should contain the following function that will deal with the app.key_handler.js file and your computer's keyboard. It will also call the app.init.js file for the initialization of our variables.
Here we used app.main.js; You need not name your JavaScript file like this. But it is a good practice to maintain the naming convention.
The following code is the content of the app.main.js file:
(function () { "use strict"; ...Read now
Unlock full access