object library zombies as tile game

tiles with baddie adder from map

by soggydoughnut54

HTML

<canvas id="myCanvas" width="700" height="500" style="border:1px solid #000000;"></canvas>
<p id="t">

</p>
<a href="http://www.etch.wlwv.k12.or.us/~windl/zombie_game_documentation/" target="0">Documentation</a>
To Do:
Build an object that can be placed like a goal
Make it so that you can bring up store screen when it is touched
build store interface
Money?
Inventory?

JavaScript

function init() {
  //initalize the game variable as a Game object
  game = new Game();
  game.mouse = true;
  //call other game methods here for customization
  
}
//change to show or hide tile numbers
var displayTile = true;
//which tiles are walkable???
var walkableTiles = [0, 2];
//size of tiles
var tileW = 64;
var tileH = 64;
//size of sprites
var playerW = 48; //less than tileW
var playerH = 48; //less than tileH
//speed of player
var spd = 8;
//bullet variables
var bulletSpeed = 10;
var bulletColor = "black";
//baddie homing distance
var baddieDistance = 10;
var winMessage = "Player is the winner!";
var loseMessage = "player is dead!";
//change to your images vvvv
var playerImage = "https://i.imgur.com/xbQlij2.png";
var baddieImage = "https://i.imgur.com/IV2hnMF.png";
var tileSheet = "https://i.imgur.com/VeMSbGb.png";
var bgImage = "http://s28.postimg.cc/66hjuw9lp/mm_bg.png";
var splatImage = "http://s32.postimg.cc/3l9ir67up/splat.png";
var goalImage = "";
//images for guns
var shotgunImage = "https://i.imgur.com/On1bPfk.png";
var pistolImage = "https://i.imgur.com/gCbXmZG.png";
var sniperImage =""
var assaultrifleImage = "https://s14.postimg.cc/vgzpyxvf5/sword.png";
// ammo, damage, rof, image
var gunsInGame = [];
shotgun = new Gun(21, 10, 1.5, shotgunImage);
//xTile, yTile, ammo, damage, rof, image
pistol = new Gun(20, 5, 20, pistolImage);
///////////////////////
sword = new Gun(0, 5, 1, swordImage);
///////////////

//keys
//////////////////////
var left = 65; //left arrow
var right = 68; //right arrow
var up = 87; //up arrow
var down = 83; //down arrow
var fire = 32; //space
var reload = 82; //r
var drop = 69; //e
var cycle = 81; //q
/****************
change for your own maps
****************/
var map1 =...