Quote:
if (!onwall(playerx+this.walkSpeed+vecx(i)*this.walkSpeed,playery+this.walkSpeed+vecy(i)*this.walkSpeed)){
|
unless the player is getting bigger as he goes faster, use x+1.5,y+2
Quote:
this.lastStep=strtofloat(i);
|
i isn't a string here so you don't need the strtofloat()
and I would suggest an increment checker for speed movements so you cant bump into a wall when your not even touching it as you go fast. meaning use a for loop inside the keydown to check each tile before the one you want to move to and jump to the furthest one without passing over a wall