From 8a448bc04be867b1c8264fb829bd11dcbe8c2c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Baumg=C3=A4rtner?= Date: Tue, 6 Aug 2024 19:40:07 +0200 Subject: [PATCH] added sketches of maps --- Overworld.js | 13 +- OverworldMap.js | 226 +++++++++++++++++++++++++++- images/maps/map-room-bathroom.png | Bin 0 -> 1428 bytes images/maps/map-room-bedroom.png | Bin 0 -> 1971 bytes images/maps/map-room-livingroom.png | Bin 0 -> 1781 bytes images/maps/map-room-office.png | Bin 0 -> 1552 bytes 6 files changed, 232 insertions(+), 7 deletions(-) create mode 100644 images/maps/map-room-bathroom.png create mode 100644 images/maps/map-room-bedroom.png create mode 100644 images/maps/map-room-livingroom.png create mode 100644 images/maps/map-room-office.png diff --git a/Overworld.js b/Overworld.js index 2f455bb..b0d8a80 100644 --- a/Overworld.js +++ b/Overworld.js @@ -71,12 +71,13 @@ class Overworld { this.startGameLoop(); this.map.startCutscene([ - { who: "hero", type: "walk", direction: "down" }, - { who: "hero", type: "walk", direction: "down" }, - { who: "hero", type: "walk", direction: "down" }, - { who: "npc1", type: "walk", direction: "right" }, - { who: "hero", type: "stand", direction: "left", time: 200 }, - { type: "textMessage", text: "Hi! Lorem ipsum" }, + // { who: "hero", type: "walk", direction: "down" }, + // { who: "hero", type: "walk", direction: "down" }, + // { who: "hero", type: "walk", direction: "down" }, + // { who: "npc1", type: "walk", direction: "right" }, + // { who: "hero", type: "stand", direction: "left", time: 200 }, + // { type: "textMessage", text: "Hi! Lorem ipsum" }, + // { type: "changeMap", map: "Kitchen" }, ]) } } \ No newline at end of file diff --git a/OverworldMap.js b/OverworldMap.js index 8d185af..042031d 100644 --- a/OverworldMap.js +++ b/OverworldMap.js @@ -210,6 +210,34 @@ window.OverworldMaps = { ] } ], + [utils.asGridCoord(11,11)]: [ + { + events: [ + { type: "changeMap", map: "Bedroom" } + ] + } + ], + [utils.asGridCoord(8,13)]: [ + { + events: [ + { type: "changeMap", map: "Bathroom" } + ] + } + ], + [utils.asGridCoord(5,11)]: [ + { + events: [ + { type: "changeMap", map: "Livingroom" } + ] + } + ], + [utils.asGridCoord(1,6)]: [ + { + events: [ + { type: "changeMap", map: "Office" } + ] + } + ], } }, Kitchen: { @@ -270,5 +298,201 @@ window.OverworldMaps = { } ], } - } + }, + Bedroom: { + lowerSrc: "/images/maps/map-room-bedroom.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(1), + y: utils.withGrid(4), + }), + }, + walls: { + // "16,16": true + [utils.asGridCoord(1,2)] : true, + [utils.asGridCoord(1,3)] : true, + [utils.asGridCoord(0,4)] : true, + [utils.asGridCoord(1,5)] : true, + [utils.asGridCoord(1,6)] : true, + [utils.asGridCoord(1,7)] : true, + [utils.asGridCoord(1,8)] : true, + [utils.asGridCoord(2,9)] : true, + [utils.asGridCoord(3,9)] : true, + [utils.asGridCoord(4,9)] : true, + [utils.asGridCoord(5,9)] : true, + [utils.asGridCoord(6,9)] : true, + [utils.asGridCoord(7,9)] : true, + [utils.asGridCoord(8,8)] : true, + [utils.asGridCoord(8,7)] : true, + [utils.asGridCoord(8,6)] : true, + [utils.asGridCoord(8,5)] : true, + [utils.asGridCoord(8,4)] : true, + [utils.asGridCoord(8,3)] : true, + [utils.asGridCoord(8,2)] : true, + [utils.asGridCoord(7,1)] : true, + [utils.asGridCoord(6,1)] : true, + [utils.asGridCoord(5,1)] : true, + [utils.asGridCoord(4,1)] : true, + [utils.asGridCoord(3,1)] : true, + [utils.asGridCoord(2,1)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(1,4)]: [ + { + events: [ + { type: "changeMap", map: "DemoRoom" } + ] + } + ], + } + }, + Bathroom: { + lowerSrc: "/images/maps/map-room-bathroom.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(3), + y: utils.withGrid(1), + }), + }, + walls: { + // "16,16": true + [utils.asGridCoord(0,2)] : true, + [utils.asGridCoord(0,3)] : true, + [utils.asGridCoord(0,4)] : true, + [utils.asGridCoord(0,5)] : true, + [utils.asGridCoord(0,6)] : true, + [utils.asGridCoord(1,7)] : true, + [utils.asGridCoord(2,7)] : true, + [utils.asGridCoord(3,7)] : true, + [utils.asGridCoord(4,7)] : true, + [utils.asGridCoord(5,6)] : true, + [utils.asGridCoord(5,5)] : true, + [utils.asGridCoord(5,4)] : true, + [utils.asGridCoord(5,3)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,1)] : true, + [utils.asGridCoord(3,0)] : true, + [utils.asGridCoord(2,1)] : true, + [utils.asGridCoord(1,1)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(3,1)]: [ + { + events: [ + { type: "changeMap", map: "DemoRoom" } + ] + } + ], + } + }, + Livingroom: { + lowerSrc: "/images/maps/map-room-livingroom.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(11), + y: utils.withGrid(4), + }), + }, + walls: { + // "16,16": true + [utils.asGridCoord(0,2)] : true, + [utils.asGridCoord(0,3)] : true, + [utils.asGridCoord(0,4)] : true, + [utils.asGridCoord(0,5)] : true, + [utils.asGridCoord(0,6)] : true, + [utils.asGridCoord(0,7)] : true, + [utils.asGridCoord(1,8)] : true, + [utils.asGridCoord(2,8)] : true, + [utils.asGridCoord(3,8)] : true, + [utils.asGridCoord(4,8)] : true, + [utils.asGridCoord(5,8)] : true, + [utils.asGridCoord(6,8)] : true, + [utils.asGridCoord(7,8)] : true, + [utils.asGridCoord(8,8)] : true, + [utils.asGridCoord(9,8)] : true, + [utils.asGridCoord(10,8)] : true, + [utils.asGridCoord(11,7)] : true, + [utils.asGridCoord(11,6)] : true, + [utils.asGridCoord(11,5)] : true, + [utils.asGridCoord(12,4)] : true, + [utils.asGridCoord(11,3)] : true, + [utils.asGridCoord(11,2)] : true, + [utils.asGridCoord(10,1)] : true, + [utils.asGridCoord(9,1)] : true, + [utils.asGridCoord(8,1)] : true, + [utils.asGridCoord(7,1)] : true, + [utils.asGridCoord(6,1)] : true, + [utils.asGridCoord(5,1)] : true, + [utils.asGridCoord(4,1)] : true, + [utils.asGridCoord(3,1)] : true, + [utils.asGridCoord(2,1)] : true, + [utils.asGridCoord(1,1)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(11,4)]: [ + { + events: [ + { type: "changeMap", map: "DemoRoom" } + ] + } + ], + } + }, + Office: { + lowerSrc: "/images/maps/map-room-office.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(8), + y: utils.withGrid(4), + }), + }, + walls: { + // "16,16": true + [utils.asGridCoord(0,2)] : true, + [utils.asGridCoord(0,3)] : true, + [utils.asGridCoord(0,4)] : true, + [utils.asGridCoord(0,5)] : true, + [utils.asGridCoord(0,6)] : true, + [utils.asGridCoord(1,7)] : true, + [utils.asGridCoord(2,7)] : true, + [utils.asGridCoord(3,7)] : true, + [utils.asGridCoord(4,7)] : true, + [utils.asGridCoord(5,7)] : true, + [utils.asGridCoord(6,7)] : true, + [utils.asGridCoord(7,7)] : true, + [utils.asGridCoord(8,6)] : true, + [utils.asGridCoord(8,5)] : true, + [utils.asGridCoord(9,4)] : true, + [utils.asGridCoord(8,3)] : true, + [utils.asGridCoord(8,2)] : true, + [utils.asGridCoord(7,1)] : true, + [utils.asGridCoord(6,1)] : true, + [utils.asGridCoord(5,1)] : true, + [utils.asGridCoord(4,1)] : true, + [utils.asGridCoord(3,1)] : true, + [utils.asGridCoord(2,1)] : true, + [utils.asGridCoord(1,1)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(8,4)]: [ + { + events: [ + { type: "changeMap", map: "DemoRoom" } + ] + } + ], + } + }, } \ No newline at end of file diff --git a/images/maps/map-room-bathroom.png b/images/maps/map-room-bathroom.png new file mode 100644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al 0 HcmV?d00001 diff --git a/images/maps/map-room-livingroom.png b/images/maps/map-room-livingroom.png new file mode 100644 index 0000000000000000000000000000000000000000..5375ee83b81b8691d000752d90ca6dcc2502575d GIT binary patch literal 1781 zcma)6c~p{F6oa zAP|eG9%LVQ7s0a#tpl&XslG}C0+|xw=H?aaLvgjBy1O}S*y7-T-)Or5fw0Mm%XzdN zMZ#tf`>pGAz3)|2Y_<(Wb`T*)ui@g_$Y38%UP#-47vu+RTkT8=QFEvI6m^QPO0;JEimP^ZgR z=&)-4lNiq~$m~#b&4TJmPY@CxHps2gIYf|>g!hitU$5_9yXECTlyoJYYl{Z;5(1Bs zq(S~P{ZEns-xOkSRbLxAark6GhutpKeteWs{lwAlehv+Q9%ezgT?gaWti0n_qkYlF zI^BE4fzxP9=8Ehs!F@2fNuxn@BQ4S~=$rjkj%iI+yY??jvW>9eIKZ>(%AEHm{M7?U%x+~*NK zWRKO|W9Z{c%-NKpn4wdt`axycR_WO9{i^jN_6K-)Yvqi1tNPeY)zkUHq^7Gbqk ze1Yy|TRcXP*vQoXQUubM?JMYIsri|WNIyM{$e*4pY3OIKIj)n+9z$HN-7N2maVe-r zO+Cl8RwtTzm5d>rS*lpWEEGrIyoe?j*z~fh=B5WqlSc~ddTI}=CorwH3MChkUokJM z(Tlja-G^c~X97bBHU6HTlLlmSHE-9J?BSl^hv0^`2e2eV4%H7-j8D3^GUUP0Q`0!y zTNRB|o;4+5&h1Q}6hn?7gh!npjedbez(S0O0y%;qhI1K-vl9g&y+I&ewd`X&H?=8!M2CZ!&@6*4Ljc z>-!v!iyQNq>h)^TR$NiA)B6tEZCqd?`?c977HeiY8NnyChrxz#H2&6hz?07^oSIGR zXjpb`CvDG^(xcZ=OlGs|bZwYBZi(f&V+gKO=pGf@(fLM)j3MJGSf?vSQLkmzKvfTz zVvyYayEs7-#={hsSGR`ZJcz>r#&pV*-;AUlmCwgq1LHybHkYq>OBsmE_Ny{3mJ!<5PKwCY*D?>W4Eo zVMez~APeRAj2{t2s(O*+yO`iISSMo-DKdfg&Kzc~(~~~knom2gY1nAuQ~cx^Xj$2| zTVjgxgZh@>e7Wj&&>c)Mcno(4c6W%-Ovnzw?frUWwFCKpg}NBBfn1c-8E@EUB?59` z0&EC1w5pr(keIE3z!wGb5g^^y88eD07VAEk7Xuc+D|H?(X`m^fr?Q{f>%pI;j=yRa z%QQs#g!1x&=(V0NO&PD$pau#!z(%}hfcfkh%$nOIfo{YRL4LHLP_i2)>~ii01u$K* zjz|u_(7zD`r)L#czCBd9!4GkMM0@xb4ixzV2x1Gk3U-*Kr>cK314LsIV z$otuUKxYev2^Zm@ZjbWd2sM}gWhUx=avM7Sk|trwGKp@xfA_aapvQqQ$@5>SZ$g59 zRV%N;>MRa!-djyt<^#Gu3RS(S4cBsNf$PNw5W~d-yI9Gzr%*5nvW2wpeFWkN&^6y^ z+6VjDTzk0Hvb{Fy=DIia EPi^0OX#fBK literal 0 HcmV?d00001 diff --git a/images/maps/map-room-office.png b/images/maps/map-room-office.png new file mode 100644 index 0000000000000000000000000000000000000000..f7b9acf6367d15ab184f837adfa3fd2d9c3fb0b7 GIT binary patch literal 1552 zcmah|c~sI_6ozm?bHNjqEp9cLT5egUHku2ROM#LTnJJFAX1JRO;-FcLIl1Jhxinf@ zr=mo2s}#)4rA%>Y6Ae=$cX10sFy^P$%$dLDopaxP=icw0@80j7o9c!-qO7<@5d;D$ zJ3ApTfG+_o6DkMX88yCC5D1(U;^^oWjXC0=Qr!}gukQO`=Bad%tw@d(3uMh}dk#fovKqU?vg zuxR+#ex66tA@ACe9w>3*Le6Uwl*G@7u=&}1)Vjlgp5n(D;;U@`bB21Azck1e>hDN# z*TDY{)g@_US|Kuhp7pW7HmQ-PLx3`zfPDqGtTCMRE%=_S*(Z)g4(uQ=>{y9@3~1GP<=} z;(IT5$tWj{9HZ%jDhZR@Lcc*O@2)DQr1N!|dbn8GdUCh!=<)*2<SFU>GHxG7UQ?vo$=( z;eQf$Tj>gS=f8B+!RsLQkL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