im not near my pc but i think iv'e found another problem.
how the speed will work is confusing...
i know how to make my self go faster but the on wall check im not so sure about.
maybe somthing like this.
PHP Code:
function onKeydown(code){
if(code == "37"){ //Left Arrow
if(!onwall(player.x - 1.5, player.y){
But im not sure if theres an easier way to check if on wall besides manually entering that on each keydown check.