javascript canvas bottom and top collision detection -
so have been looking around , trying tutorials can't seem collision detection systems work. if able explain doing wrong or syntax errors great. player right touch object works player left touch object works 1--not working jump on objects 2-- not working hit top of objects i'm new in javascript first serious project while if http://codepen.io/guntarwii/pen/ebmnwb function startgame() { gamearea.start(); } var gamearea = { canvas: document.createelement("canvas"), start: function () { this.canvas.width = 720; this.canvas.height = 500; this.context = this.canvas.getcontext("2d"); document.body.insertbefore(this.canvas, document.body.childnodes[0]); this.interval = setinterval(updategamearea, 20); // console.log(gamearea.context) document.addeventlistener("keydown", optiones.moveme); ...