Skip to content

Commit

Permalink
fixed map
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmiccoder committed Feb 9, 2022
1 parent a3fc2fa commit 810ec96
Show file tree
Hide file tree
Showing 23 changed files with 24,580 additions and 10 deletions.
Binary file added images/brownGuy1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/official_assets/ourMap16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions images/official_assets/ourMap16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/official_assets/ourMap16_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/official_assets/ourMap16_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/official_assets/ourMap16_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/official_assets/ourMap32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12,277 changes: 12,277 additions & 0 deletions images/official_assets/ourMap32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12,277 changes: 12,277 additions & 0 deletions images/official_assets/our_map_official.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/official_assets/whichMap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
using ourMap32.svg and changing the whole game accordingly
Binary file added images/ourMap16Old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_3_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_4_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_6_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ourMap16_7_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
<body>
<div class="game-container">
<!-- going with 16/9 aspect ratio -->
<canvas class="game-canvas" width="352" height="198"></canvas>
<!-- <canvas class="game-canvas" width="352" height="198"></canvas> -->
<!-- <canvas class="game-canvas" width="704" height="296"></canvas> -->
<!-- <canvas class="game-canvas" width="1120" height="296"></canvas> -->
<canvas class="game-canvas"></canvas>
</div>

<script src="./js/utils.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions js/Overworld.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ 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.context = this.canvas.getContext("2d");
this.map = null;
}
Expand Down
11 changes: 6 additions & 5 deletions js/OverworldMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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.5) - cameraPerson.x, utils.withGrid(6) - cameraPerson.y);
}

Expand Down Expand Up @@ -108,16 +109,16 @@ class OverworldMap {

window.OverworldMaps = {
DemoRoom: {
// lowerSrc: "./images/HarshGeniusMap1.png",
lowerSrc: "./images/ourMap16.png",
lowerSrc: "./images/official_assets/our_map_official.svg", // current best map is=
// lowerSrc: "./images/ourMap16.png",
// lowerSrc: "./images/DemoLower.png",
upperSrc: "./images/DemoUpper.png",
gameObjects: {
hero: new Person({
isPlayerControlled: true,
// src: "./images/hero16.png",
x: utils.withGrid(5),
y: utils.withGrid(6)
src: "./images/brownGuy1.png",
x: utils.withGrid(20),
y: utils.withGrid(20)
}),

// myDrone: new Person({
Expand Down
8 changes: 4 additions & 4 deletions styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ body {

.game-container{
position: relative;
width: 352px;
height: 198px;
/* width: 352px; */
/* height: 198px; */
margin: 0 auto;
outline: 1px solid white;

transform: scale(3) translateY(50%);
/* transform: scale(1.5) translateY(50%); */
/* transform: scale(3) translateY(50%); */
transform: scale(1.5) translateY(0%);
/* transform: scale(1) translate(50%); */
/* transform:translateY(20%); */
}
Expand Down

0 comments on commit 810ec96

Please sign in to comment.