diff --git a/images/official_assets/ourMap32.png b/images/official_assets/ourMap32.png index b357e2f..9e24079 100644 Binary files a/images/official_assets/ourMap32.png and b/images/official_assets/ourMap32.png differ diff --git a/images/official_assets/ourMap32Old.png b/images/official_assets/ourMap32Old.png new file mode 100644 index 0000000..b357e2f Binary files /dev/null and b/images/official_assets/ourMap32Old.png differ diff --git a/js/Overworld.js b/js/Overworld.js index eec57bd..772ad80 100644 --- a/js/Overworld.js +++ b/js/Overworld.js @@ -2,13 +2,19 @@ class Overworld { constructor(config) { this.element = config.element; this.canvas = this.element.querySelector(".game-canvas"); - // this.canvas.height = window.innerHeight; - // this.canvas.width = window.innerWidth; + this.canvas.height = window.innerHeight; + this.canvas.width = window.innerWidth; + + + // this.gameContainer = this.element.querySelector(".game-container"); + // this.gameContainer.style.width = window.innerWidth; + // this.gameContainer.style.height = window.innerHeight; + // this.canvas.height = 1000; // TODO: Change this! // this.canvas.width = 1500; - console.log(this.canvas.height, this.canvas.width); + console.log(this.canvas.width, this.canvas.height); this.context = this.canvas.getContext("2d"); this.map = null; diff --git a/js/OverworldMap.js b/js/OverworldMap.js index 41ba236..5184dd0 100644 --- a/js/OverworldMap.js +++ b/js/OverworldMap.js @@ -20,7 +20,7 @@ class OverworldMap { drawLowerImage(context, cameraPerson) { // context.drawImage(this.lowerImage, utils.withGrid(10.5) - cameraPerson.x, utils.withGrid(6) - cameraPerson.y); - context.drawImage(this.lowerImage, utils.withGrid(10.15) - cameraPerson.x, utils.withGrid(6.5) - cameraPerson.y); // fixing offset + context.drawImage(this.lowerImage, utils.withGrid(10.33) - cameraPerson.x, utils.withGrid(6.5) - cameraPerson.y); // fixing offset } drawUpperImage(context, cameraPerson) { @@ -109,7 +109,7 @@ class OverworldMap { window.OverworldMaps = { DemoRoom: { - lowerSrc: "./images/official_assets/ourMap32.png", // current best map is= + lowerSrc: "./images/official_assets/ourMap32.png", // current best map is= ./images/official_assets/ourMap32.png // lowerSrc: "./images/ourMap16.png", // lowerSrc: "./images/DemoLower.png", upperSrc: "./images/DemoUpper.png", diff --git a/styles/global.css b/styles/global.css index 9686fa4..475b617 100644 --- a/styles/global.css +++ b/styles/global.css @@ -11,6 +11,7 @@ * { box-sizing: border-box; } + body { background-color: #202020; padding: 0; @@ -20,8 +21,8 @@ body { .game-container{ position: relative; - width: 352px; - height: 198px; + /* width: 352px; */ + /* height: 198px; */ /* height: 550px; */ /* height: 100vh; */ /* width: 100vw; */ @@ -29,8 +30,10 @@ body { margin: 0; outline: 1px solid white; - transform: scale(3) translateY(50%); - transform: scale(1.50) translateY(50%) translateX(90%); + /* transform: scale(3) translateY(-50%); */ + /* transform: scale(1.5) translateY(50%) translateX(30%); */ + transform: translate(0,0); + /* transform: scale(1.5); */ /* transform: scale(1) translateY(30%) translateX(50%); */ /* transform:translateY(20%); */ }