Final Tiles Game

final--add your elements

by Kyle Bezio

HTML

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

JavaScript

/***********************
Adjust game variables to make it work
************************/
//change if you make a zelda style
var overhead = true;
//change to show or hide tile numbers
var displayTile = false;
//do you want to shoot bullets?
var bulletsInGame = true; //change to shoot bullets
//jumpstomp?
var jumpstomp = false;
//size of tiles
var tileW = 64;
var tileH = 64;
//size of sprites
var manW = 52; //less than tileW
var manH = 52; //less than tileH
//control jumping and falling
var gravity = 0.6;
var jumpstart = -14;
//bullets
var bulletSpeed = 10;
var bulletSize = 10;
var bulletColor = "red";
//change to your images vvvv
var manImage = "https://s17.postimg.org/7ki7pofxb/Adventure_Game_Sprite.png";
var baddieImage = "https://s17.postimg.org/h9qsx04an/Baddie_Sprite_Robot.png";
var tileImage = "https://s21.postimg.org/3leinmfpj/Cobble_Stone_Wall_Tile.jpg";
var bgImage = "https://s22.postimg.org/3p4j0lmdd/Background_Image.jpg";
/* Images List
https://s17.postimg.org/7ki7pofxb/Adventure_Game_Sprite.png
https://s17.postimg.org/h9qsx04an/Baddie_Sprite_Robot.png
https://s21.postimg.org/3leinmfpj/Cobble_Stone_Wall_Tile.jpg
https://s14.postimg.org/nwzh37z0x/Cobble_Stone_Wall_Round_Tile.png
https://s22.postimg.org/ou2mq3t81/Cobble_Stone_Wall_Tile.png //Round and Hi-Def
https://s22.postimg.org/3p4j0lmdd/Background_Image.jpg
*/
//////////////////////
//key controls
//////////////////////
var left = 37;
var up = 38;
var right = 39;
var down = 40;
var fire = 32;
/****************
change for your own maps
****************/
var map1 = [
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
  [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
  [1, 0, 0, , 0, 0, 0, 0, 1, 0, 0, 1],
  [1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1],
  [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
];
var map2 = [
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
  [1, 0, , 0, 0, 0, 0, 0, 0, 0, 0, 1],
  [1, 0, , , , 0, 0, 0, 1, 0, 0, 1],
  [1, 0, , 0, , 0, 0, 1, 0, 0, 0, 1],
  [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...