diff --git a/.gitignore b/.gitignore index 66982ae..db3ceef 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ Thumbs.db* *.afpub* *.zip +*.pdf /tiles-paid /modern-tiles_free diff --git a/OverworldMap.js b/OverworldMap.js index b5aebdd..10083e5 100644 --- a/OverworldMap.js +++ b/OverworldMap.js @@ -111,26 +111,8 @@ window.OverworldMaps = { talking: [ { events: [ - { type: "textMessage", text: "Schau dich ruhig um.", faceHero: "npc1" }, - { type: "textMessage", text: "Vielleicht findest du etwas interessantes ..." }, - ] - } - ] - }), - npc2: new Person({ - x: utils.withGrid(2), - y: utils.withGrid(5), - src: "/images/characters/people/hero-default.png", - behaviorLoop: [ - { type: "stand", direction: "right", time: 300 }, - // { type: "stand", direction: "down", time: 300 }, - ], - talking: [ - { - events: [ - { type: "textMessage", text: "Dieser Raum darf nicht betreten werden.", faceHero: "npc2" }, - { type: "textMessage", text: "Geh weg!" }, - { who: "hero", type: "walk", direction: "right" }, + { type: "textMessage", text: "Verstehst du wo wir sind?", faceHero: "npc1" }, + { type: "textMessage", text: "Ich habe schon gesucht, vielleicht findest du ja etwas Interessantes." }, ] } ] @@ -240,19 +222,6 @@ window.OverworldMaps = { isPlayerControlled: true, x: utils.withGrid(1), y: utils.withGrid(4), - }), - npc1: new Person({ - x: utils.withGrid(3), - y: utils.withGrid(6), - src: "/images/characters/people/hero-default.png", - // src: "/images/characters/people/hero-run.png", - talking: [ - { - events: [ - { type: "textMessage", text: "You made it!", faceHero: "npc1" }, - ] - } - ] }) }, walls: { @@ -274,12 +243,12 @@ window.OverworldMaps = { [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, + [utils.asGridCoord(7,2)] : true, + [utils.asGridCoord(6,2)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,2)] : true, + [utils.asGridCoord(3,2)] : true, + [utils.asGridCoord(2,2)] : true, }, cutsceneSpaces: { [utils.asGridCoord(1,4)]: [ @@ -308,9 +277,10 @@ window.OverworldMaps = { [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,5)] : true, + [utils.asGridCoord(3,6)] : true, + [utils.asGridCoord(3,7)] : true, + [utils.asGridCoord(2,8)] : true, [utils.asGridCoord(2,9)] : true, [utils.asGridCoord(3,9)] : true, [utils.asGridCoord(4,9)] : true, @@ -324,10 +294,10 @@ window.OverworldMaps = { [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(7,2)] : true, + [utils.asGridCoord(6,2)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,2)] : true, [utils.asGridCoord(3,1)] : true, [utils.asGridCoord(2,1)] : true, }, @@ -371,7 +341,7 @@ window.OverworldMaps = { [utils.asGridCoord(4,1)] : true, [utils.asGridCoord(3,0)] : true, [utils.asGridCoord(2,1)] : true, - [utils.asGridCoord(1,1)] : true, + [utils.asGridCoord(1,2)] : true, }, cutsceneSpaces: { [utils.asGridCoord(3,1)]: [ @@ -396,22 +366,23 @@ window.OverworldMaps = { }, walls: { // "16,16": true - [utils.asGridCoord(0,2)] : true, - [utils.asGridCoord(0,3)] : true, - [utils.asGridCoord(0,4)] : true, + [utils.asGridCoord(2,2)] : true, + [utils.asGridCoord(2,3)] : true, + [utils.asGridCoord(2,4)] : true, + [utils.asGridCoord(1,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(3,7)] : true, + [utils.asGridCoord(4,7)] : true, + [utils.asGridCoord(5,6)] : true, + [utils.asGridCoord(6,6)] : true, + [utils.asGridCoord(7,5)] : true, + [utils.asGridCoord(8,5)] : true, + [utils.asGridCoord(9,5)] : true, + [utils.asGridCoord(10,5)] : true, [utils.asGridCoord(11,7)] : true, [utils.asGridCoord(11,6)] : true, [utils.asGridCoord(11,5)] : true, @@ -419,15 +390,16 @@ window.OverworldMaps = { [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(9,2)] : 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, + [utils.asGridCoord(5,3)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,2)] : true, + [utils.asGridCoord(3,2)] : true, + [utils.asGridCoord(2,2)] : true, + [utils.asGridCoord(1,2)] : true, }, cutsceneSpaces: { [utils.asGridCoord(11,4)]: [ @@ -437,6 +409,13 @@ window.OverworldMaps = { ] } ], + [utils.asGridCoord(7,2)]: [ + { + events: [ + { type: "changeMap", map: "LivingroomDark" } + ] + } + ], } }, Office: { @@ -452,8 +431,8 @@ window.OverworldMaps = { }, walls: { // "16,16": true - [utils.asGridCoord(0,2)] : true, - [utils.asGridCoord(0,3)] : true, + [utils.asGridCoord(1,2)] : true, + [utils.asGridCoord(1,3)] : true, [utils.asGridCoord(0,4)] : true, [utils.asGridCoord(0,5)] : true, [utils.asGridCoord(0,6)] : true, @@ -474,8 +453,9 @@ window.OverworldMaps = { [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, + [utils.asGridCoord(3,2)] : true, + [utils.asGridCoord(2,3)] : true, + [utils.asGridCoord(1,3)] : true, }, cutsceneSpaces: { [utils.asGridCoord(8,4)]: [ @@ -487,4 +467,369 @@ window.OverworldMaps = { ], } }, + EntranceDark: { + lowerSrc: "/images/maps/map-room-entrance-dark.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(5), + y: utils.withGrid(11), + src: "/images/characters/people/hero-witch.png", + }) + }, + walls: { + // "16,16": true + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(5,3)] : true, + [utils.asGridCoord(5,4)] : true, + [utils.asGridCoord(4,4)] : true, + [utils.asGridCoord(3,4)] : true, + [utils.asGridCoord(2,4)] : true, + [utils.asGridCoord(1,5)] : true, + [utils.asGridCoord(0,6)] : true, + [utils.asGridCoord(1,7)] : true, + [utils.asGridCoord(2,8)] : true, + [utils.asGridCoord(3,8)] : true, + [utils.asGridCoord(4,8)] : true, + [utils.asGridCoord(5,8)] : true, + [utils.asGridCoord(5,9)] : true, + [utils.asGridCoord(5,10)] : true, + [utils.asGridCoord(4,11)] : true, + [utils.asGridCoord(5,12)] : true, + [utils.asGridCoord(6,12)] : true, + [utils.asGridCoord(7,12)] : true, + [utils.asGridCoord(7,13)] : true, + [utils.asGridCoord(8,14)] : true, + [utils.asGridCoord(9,13)] : true, + [utils.asGridCoord(9,12)] : true, + [utils.asGridCoord(10,12)] : true, + [utils.asGridCoord(11,12)] : true, + [utils.asGridCoord(12,11)] : true, + [utils.asGridCoord(11,10)] : true, + [utils.asGridCoord(11,9)] : true, + [utils.asGridCoord(11,8)] : true, + [utils.asGridCoord(11,7)] : true, + [utils.asGridCoord(11,6)] : true, + [utils.asGridCoord(12,5)] : true, + [utils.asGridCoord(11,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, + }, + cutsceneSpaces: { + [utils.asGridCoord(1,6)]: [ + { + events: [ + { who: "npc2", type: "walk", direction: "down" }, + { who: "npc2", type: "stand", direction: "left" }, + { who: "hero", type: "stand", direction: "right", time: 300 }, + { type: "textMessage", text: "Du kannst hier nicht rein!" }, + { who: "npc2", type: "walk", direction: "up" }, + { who: "npc2", type: "stand", direction: "right" }, + { who: "hero", type: "walk", direction: "right" }, + { who: "hero", type: "walk", direction: "right" }, + ] + } + ], + [utils.asGridCoord(11,5)]: [ + { + events: [ + { type: "changeMap", map: "KitchenDark" } + ] + } + ], + [utils.asGridCoord(11,11)]: [ + { + events: [ + { type: "changeMap", map: "BedroomDark" } + ] + } + ], + [utils.asGridCoord(8,13)]: [ + { + events: [ + { type: "changeMap", map: "BathroomDark" } + ] + } + ], + [utils.asGridCoord(5,11)]: [ + { + events: [ + { type: "changeMap", map: "LivingroomDark" } + ] + } + ], + [utils.asGridCoord(1,6)]: [ + { + events: [ + { type: "changeMap", map: "OfficeDark" } + ] + } + ], + } + }, + KitchenDark: { + lowerSrc: "/images/maps/map-room-kitchen-dark.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(1), + y: utils.withGrid(4), + src: "/images/characters/people/hero-witch.png", + }) + }, + walls: { + // "16,16": true + [utils.asGridCoord(1,1)] : 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(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(8,4)] : true, + [utils.asGridCoord(8,3)] : true, + [utils.asGridCoord(8,2)] : true, + [utils.asGridCoord(7,2)] : true, + [utils.asGridCoord(6,2)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,2)] : true, + [utils.asGridCoord(3,2)] : true, + [utils.asGridCoord(2,2)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(1,4)]: [ + { + events: [ + { type: "changeMap", map: "EntranceDark" } + ] + } + ], + } + }, + BedroomDark: { + lowerSrc: "/images/maps/map-room-bedroom-dark.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(1), + y: utils.withGrid(4), + src: "/images/characters/people/hero-witch.png", + }), + }, + 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(2,5)] : true, + [utils.asGridCoord(3,6)] : true, + [utils.asGridCoord(3,7)] : true, + [utils.asGridCoord(2,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,2)] : true, + [utils.asGridCoord(6,2)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,2)] : true, + [utils.asGridCoord(3,1)] : true, + [utils.asGridCoord(2,1)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(1,4)]: [ + { + events: [ + { type: "changeMap", map: "EntranceDark" } + ] + } + ], + } + }, + BathroomDark: { + lowerSrc: "/images/maps/map-room-bathroom-dark.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(3), + y: utils.withGrid(1), + src: "/images/characters/people/hero-witch.png", + }), + }, + 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,2)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(3,1)]: [ + { + events: [ + { type: "changeMap", map: "EntranceDark" } + ] + } + ], + } + }, + LivingroomDark: { + lowerSrc: "/images/maps/map-room-livingroom-dark.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(7), + y: utils.withGrid(2), + src: "/images/characters/people/hero-witch.png", + }), + }, + walls: { + // "16,16": true + [utils.asGridCoord(2,2)] : true, + [utils.asGridCoord(2,3)] : true, + [utils.asGridCoord(2,4)] : true, + [utils.asGridCoord(1,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,7)] : true, + [utils.asGridCoord(4,7)] : true, + [utils.asGridCoord(5,6)] : true, + [utils.asGridCoord(6,6)] : true, + [utils.asGridCoord(7,5)] : true, + [utils.asGridCoord(8,5)] : true, + [utils.asGridCoord(9,5)] : true, + [utils.asGridCoord(10,5)] : 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,2)] : true, + [utils.asGridCoord(8,2)] : true, + [utils.asGridCoord(7,1)] : true, + [utils.asGridCoord(6,1)] : true, + [utils.asGridCoord(5,3)] : true, + [utils.asGridCoord(5,2)] : true, + [utils.asGridCoord(4,2)] : true, + [utils.asGridCoord(3,2)] : true, + [utils.asGridCoord(2,2)] : true, + [utils.asGridCoord(1,2)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(11,4)]: [ + { + events: [ + { type: "changeMap", map: "EntranceDark" } + ] + } + ], + [utils.asGridCoord(7,2)]: [ + { + events: [ + { type: "changeMap", map: "Livingroom" } + ] + } + ], + } + }, + OfficeDark: { + lowerSrc: "/images/maps/map-room-office-dark.png", + // upperSrc: "/images/maps/room-builder.png", + upperSrc: "", + gameObjects: { + hero: new Person({ + isPlayerControlled: true, + x: utils.withGrid(8), + y: utils.withGrid(4), + src: "/images/characters/people/hero-witch.png", + }), + }, + walls: { + // "16,16": true + [utils.asGridCoord(1,2)] : true, + [utils.asGridCoord(1,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(3,2)] : true, + [utils.asGridCoord(2,3)] : true, + [utils.asGridCoord(1,3)] : true, + }, + cutsceneSpaces: { + [utils.asGridCoord(8,4)]: [ + { + events: [ + { type: "changeMap", map: "EntranceDark" } + ] + } + ], + } + }, } \ No newline at end of file diff --git a/images/characters/people/hero-witch.png b/images/characters/people/hero-witch.png new file mode 100644 index 0000000..fe6aaaf Binary files /dev/null and b/images/characters/people/hero-witch.png differ diff --git a/images/characters/people/hero.png b/images/characters/people/hero.png index ff8cb54..fa49fc5 100644 Binary files a/images/characters/people/hero.png and b/images/characters/people/hero.png differ diff --git a/images/maps/map-room-bathroom-dark.png b/images/maps/map-room-bathroom-dark.png new file mode 100644 index 0000000..b6bb929 Binary files /dev/null and b/images/maps/map-room-bathroom-dark.png differ diff --git a/images/maps/map-room-bathroom.png b/images/maps/map-room-bathroom.png index ba728ce..4a14d0d 100644 Binary files a/images/maps/map-room-bathroom.png and b/images/maps/map-room-bathroom.png differ diff --git a/images/maps/map-room-bedroom-dark.png b/images/maps/map-room-bedroom-dark.png new file mode 100644 index 0000000..292d477 Binary files /dev/null and b/images/maps/map-room-bedroom-dark.png differ diff --git a/images/maps/map-room-bedroom.png b/images/maps/map-room-bedroom.png index 6a3918a..cf67751 100644 Binary files a/images/maps/map-room-bedroom.png and b/images/maps/map-room-bedroom.png differ diff --git a/images/maps/map-room-entrance-dark.png b/images/maps/map-room-entrance-dark.png new file mode 100644 index 0000000..4d7648e Binary files /dev/null and b/images/maps/map-room-entrance-dark.png differ diff --git a/images/maps/map-room-entrance.png b/images/maps/map-room-entrance.png index 6ce4c89..705e955 100644 Binary files a/images/maps/map-room-entrance.png and b/images/maps/map-room-entrance.png differ diff --git a/images/maps/map-room-kitchen-dark.png b/images/maps/map-room-kitchen-dark.png new file mode 100644 index 0000000..746cab4 Binary files /dev/null and b/images/maps/map-room-kitchen-dark.png differ diff --git a/images/maps/map-room-kitchen.png b/images/maps/map-room-kitchen.png index d2d43bd..44ae1e8 100644 Binary files a/images/maps/map-room-kitchen.png and b/images/maps/map-room-kitchen.png differ diff --git a/images/maps/map-room-livingroom-dark.png b/images/maps/map-room-livingroom-dark.png new file mode 100644 index 0000000..92a9b9b Binary files /dev/null and b/images/maps/map-room-livingroom-dark.png differ diff --git a/images/maps/map-room-livingroom.png b/images/maps/map-room-livingroom.png index 5375ee8..5a9fa2f 100644 Binary files a/images/maps/map-room-livingroom.png and b/images/maps/map-room-livingroom.png differ diff --git a/images/maps/map-room-office-dark.png b/images/maps/map-room-office-dark.png new file mode 100644 index 0000000..cdde017 Binary files /dev/null and b/images/maps/map-room-office-dark.png differ diff --git a/images/maps/map-room-office.png b/images/maps/map-room-office.png index f7b9acf..5e28d30 100644 Binary files a/images/maps/map-room-office.png and b/images/maps/map-room-office.png differ