diff --git a/client/css/editor.css b/client/css/editor.css index 51c7571..23486da 100644 --- a/client/css/editor.css +++ b/client/css/editor.css @@ -11,10 +11,13 @@ canvas { padding: 1rem; } -#mapgen { +#mapgen, #mapload { display: flex; flex-direction: column; - position: absolute; +} + +#mapload { + margin-top: 3rem; } #export { diff --git a/client/css/main.css b/client/css/main.css index 26fab00..e40cbff 100644 --- a/client/css/main.css +++ b/client/css/main.css @@ -19,10 +19,16 @@ body { #center { width: 100vw; height: 100vh; - display: flex; + position: absolute; +} + +#center-inner { + width: 100%; + height: 100%; + position: relative; align-items: center; justify-content: center; - position: absolute; + display: flex; flex-direction: column; } diff --git a/client/img/atlas.png b/client/img/atlas.png index 135b960..b01108c 100644 Binary files a/client/img/atlas.png and b/client/img/atlas.png differ diff --git a/client/index.html b/client/index.html index 251c33d..3145ab0 100644 --- a/client/index.html +++ b/client/index.html @@ -8,16 +8,18 @@
W: Place Wall
-G: Place Ghost Wall
+G: Place Ghost Only Wall
+R: Place Ghost Exit
H: Place Ghost Spawn
F: Place Food
1: Place Pac Spawn 1
diff --git a/client/sfx/death.mp3 b/client/sfx/death.mp3 new file mode 100644 index 0000000..ff13045 Binary files /dev/null and b/client/sfx/death.mp3 differ diff --git a/client/sfx/ghost.wav b/client/sfx/ghost.wav new file mode 100644 index 0000000..6eeff02 Binary files /dev/null and b/client/sfx/ghost.wav differ diff --git a/client/sfx/intro.mp3 b/client/sfx/intro.mp3 new file mode 100644 index 0000000..e8881f1 Binary files /dev/null and b/client/sfx/intro.mp3 differ diff --git a/client/sfx/move.wav b/client/sfx/move.wav new file mode 100644 index 0000000..4a4a9a1 Binary files /dev/null and b/client/sfx/move.wav differ diff --git a/client/src/editor.ts b/client/src/editor.ts index 0be5c68..0f72545 100644 --- a/client/src/editor.ts +++ b/client/src/editor.ts @@ -1,9 +1,10 @@ import { InitialState } from "./logic/logic.js" -import { genMap, compressMap, decompressMap } from "./map.js" +import { genMap, compressMap, decompressMap, checkMap } from "./map.js" import { startGraphicsUpdater } from "./renderer.js" import { GameState, Vec2, Tile } from "./types.js" const mapgen = document.getElementById("mapgen") +const mapload = document.getElementById("mapload") const sidebar = document.getElementById("sidebar") mapgen.onsubmit = async (event) => { @@ -21,10 +22,30 @@ mapgen.onsubmit = async (event) => { } mapgen.style.display = "none" + mapload.style.display = "none" runMapEditor(width, height) } +mapload.onsubmit = async (event) => { + event.preventDefault() + + const data_str = (