Skip to content

Instantly share code, notes, and snippets.

@McFunkypants
Created January 12, 2013 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McFunkypants/4515998 to your computer and use it in GitHub Desktop.
Save McFunkypants/4515998 to your computer and use it in GitHub Desktop.
// 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() {} };
@MarcoWorms
Copy link

There is a small typo at line 26, "concole.log"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment