Created
January 12, 2013 04:05
-
-
Save McFunkypants/4515998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the game's canvas element | |
var canvas = null; | |
// the canvas 2d context | |
var ctx = null; | |
// an image containing all sprites | |
var spritesheet = null; | |
// true when the spritesheet has been downloaded | |
var spritesheetLoaded = false; | |
// the world grid: a 2d array of tiles | |
var world = [[]]; | |
// size in the world in sprite tiles | |
var worldWidth = 16; | |
var worldHeight = 16; | |
// size of a tile in pixels | |
var tileWidth = 32; | |
var tileHeight = 32; | |
// start and end of path | |
var pathStart = [worldWidth,worldHeight]; | |
var pathEnd = [0,0]; | |
var currentPath = []; | |
// ensure that concole.log doesn't cause errors | |
if (typeof console == "undefined") var console = { log: function() {} }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a small typo at line 26, "concole.log"