diff --git a/src/game.coffee b/src/game.coffee index 9ce5570..c67af58 100644 --- a/src/game.coffee +++ b/src/game.coffee @@ -4,10 +4,15 @@ app.game = @map[i] = new Tile render: -> + app.layer.save().scale(5, 5) + for tile, i in @map y = Math.floor(i/20) x = i-(y*20) tile.render(x, y) + + app.layer.restore() + @hud.render() step: -> diff --git a/src/hud.coffee b/src/hud.coffee index fb2abc6..32d96f1 100644 --- a/src/hud.coffee +++ b/src/hud.coffee @@ -5,6 +5,6 @@ app.game.hud = if amount > 0 app.layer .fillStyle "#000" - .font "20px Minecraftia" + .font "22px Minecraftia" .wrappedText(amount+" x "+type, 11, posy, 800) posy += 29 diff --git a/src/main.coffee b/src/main.coffee index 569a43f..b44a511 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -1,6 +1,6 @@ app = playground({ - width: 8*20, - height: 8*15, + width: 8*20*5, + height: 8*15*5, scaleToFit: true, smoothing: false, @@ -29,7 +29,7 @@ app = playground({ @game.render() posToTile: (x, y)-> - pos = (Math.floor(y/8)*20) + Math.floor(x/8) + pos = (Math.floor(y/8/5)*20) + Math.floor(x/8/5) @game.map[pos] })