diff --git a/hampsterengine b/hampsterengine index 7f3fcf04d35730b19cb00a3455d28fdc5d0c70fc..34d196b67f14040db020862d858b8e448ff639e3 160000 --- a/hampsterengine +++ b/hampsterengine @@ -1 +1 @@ -Subproject commit 7f3fcf04d35730b19cb00a3455d28fdc5d0c70fc +Subproject commit 34d196b67f14040db020862d858b8e448ff639e3 diff --git a/src/js/objects/ground.js b/src/js/objects/ground.js index a73e0d9501c8369dec55329a11afcdf8d86bbedb..ffdc25c4e7a8d688ac41e11650ef2e7f3b21b814 100644 --- a/src/js/objects/ground.js +++ b/src/js/objects/ground.js @@ -21,7 +21,7 @@ export default class Ground extends Entity { if (!(this.surface || this.below)) return; canvas.tileImage(this.surface, roundToRatio(this.x), roundToRatio(this.y), this.width, 8*this.scale, 8*this.scale, 8*this.scale); canvas.tileImage(this.below, roundToRatio(this.x), roundToRatio(this.y+8*this.scale), this.width, this.height-8*this.scale, 8*this.scale, 8*this.scale); - canvas.fillRect(this.x, this.y, this.width, this.height); + // canvas.fillRect(this.x, this.y, this.width, this.height); } } diff --git a/src/js/rooms/game.js b/src/js/rooms/game.js index 3d8d3289b6e6371304b926880ce431a16f808536..eefa66a91000dd18c2aafaee6e4f1356a9c14eae 100644 --- a/src/js/rooms/game.js +++ b/src/js/rooms/game.js @@ -9,8 +9,8 @@ const GRAVITY_X = 0; // I don't think we're going to use X gravity but i'm going const GRAVITY_Y = 300; // Per second const entities = rm_game.entities; -rm_game.width = 1000; -rm_game.height = 1000; +rm_game.width = 2560; +rm_game.height = 500; rm_game.start = _=>{ engine.running = true; @@ -78,8 +78,8 @@ rm_game.step = _=>{ // Update the camera canvas.camera.goTo( - Math.min(Math.max(player.x+canvas.width/8, canvas.width/8), rm_game.width-canvas.width), - Math.min(Math.max(player.y+canvas.width/8, canvas.width/8), rm_game.height-canvas.height) + Math.min(Math.max(player.x+(player.width/2)-canvas.width/2, canvas.width/8), rm_game.width-canvas.width), + Math.min(Math.max(player.y-canvas.height/8, canvas.height/8), rm_game.height-canvas.height) ); }