Tiles Game with Classes

final--add your elements

by Starsavior

HTML

<canvas id="myCanvas" width="500" height="500" style="border:1px solid #000000;"></canvas>
<br/><a href="http://www.etch.wlwv.k12.or.us/~windl/adventure_game_documentation/index.html" target="blank">Documentation</a>

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 = true;
//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 playerW = 62; //less than tileW
var playerH = 62; //less than tileH
//control jumping and falling
var gravity = 0.6;
var jumpstart = -14;
//bullets
var bulletSpeed = 10;
var bulletSize = 10;
var bulletColor = "red";
//baddie AI homing range in tiles
var baddieHomingRange = 5;
//change to your images vvvv
var playerImage = "https://s33.postimg.cc/yoj58uzzz/sprite.png";
var baddieImage = "https://s33.postimg.cc/ndl2xx5kf/sprite_sheet.png";
var tileImage = "http://s25.postimg.cc/ml4w7u4t7/mario_07.png";
var bgImage = "http://s28.postimg.cc/66hjuw9lp/mm_bg.png";
//////////////////////
//key controls
//////////////////////
var left = 37; //left arrow
var up = 38; //up arrow
var right = 39; //right arrow
var down = 40; //down arrow
var fire = 32; //space bar
//messages
var winMessage = "Player is Winner";
var loseMessage = "Player is Dead";
//set initial value for level
var level = 1;

/****************
change for your own maps
****************/
var map1 =...