<canvas id="view" width="1280" height="600" style="padding: 0 auto; max-height: 600px;">
Canvas not supported<br/>
<img id="maptiles" src="tileset.png" width="64" style="overflow: hidden;" />
- <img id="character" src="character.png" speed="4"/>
+ <img id="character" src="character.png" speed="2.75"/>
<div id="map" columns="18" rows="36">
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
case 'sw': dy = .45 * this.speed; dx = -.9 * this.speed; break;
case 'se': dy = .45 * this.speed; dx = .9 * this.speed; break;
}
+
+ if (player.frame % 6 > 2) {
+ dx *= 1.375;
+ dy *= 1.375
+ } else {
+ dx *= .625;
+ dy *= .625;
+ }
if (map.data[map.tile_at(this.x + dx, this.y + dy)] != 4) {
this.x += dx; this.y += dy;