Tiles Game with Classes

final--add your elements

by DavisC_WL

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 = false;
//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 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 = 8;
//change to your images vvvv
var playerImage = "https://i.postimg.cc/fW60HpVf/Adventure-Game-Noodle-Man-Davis-C.png";
var baddieImage = "https://i.postimg.cc/D0CL0wvV/Adventure-Game-Baddie-Sprite-Sheet-Davis-C.png";
var tileImage = "https://i.postimg.cc/gc50zhdz/Adventure-Game-Tile-Sprite-Davis-C.png";
var bgImage = "https://i.postimg.cc/k5FVDgsj/Adventure-Game-Tile-Map-BG-Davis-C.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 =...