diff --git a/images/FINAL_FOR_REALZ_.png b/images/FINAL_FOR_REALZ_OLD(OG Map).png similarity index 100% rename from images/FINAL_FOR_REALZ_.png rename to images/FINAL_FOR_REALZ_OLD(OG Map).png diff --git a/images/acmrpg.png b/images/acmrpg.png new file mode 100644 index 0000000..dc9bfbd Binary files /dev/null and b/images/acmrpg.png differ diff --git a/images/map_outline.png b/images/map_outline.png index ad315e4..b38d2e4 100644 Binary files a/images/map_outline.png and b/images/map_outline.png differ diff --git a/images/map_outlineOld.png b/images/map_outlineOld.png new file mode 100644 index 0000000..ad315e4 Binary files /dev/null and b/images/map_outlineOld.png differ diff --git a/images/wall_frame.png b/images/wall_frameOld.png similarity index 100% rename from images/wall_frame.png rename to images/wall_frameOld.png diff --git a/js/GameObject.js b/js/GameObject.js index df49635..c6bd98a 100644 --- a/js/GameObject.js +++ b/js/GameObject.js @@ -16,7 +16,7 @@ class GameObject { // all people } mount(map) { - console.log("Mounting"); + // console.log("Mounting"); this.isMounted = true; map.addWall(this.x, this.y); @@ -42,12 +42,6 @@ class GameObject { // all people let eventConfig = this.behaviorLoop[this.behaviorLoopIndex]; eventConfig.who = this.id; - // Event config for link teleportation - // eventConfig.link = this.link || ''; - // eventConfig.newTab = this.newTab || false; - - console.log(eventConfig.link); - // create an event instance out of our next event config const eventHandler = new OverworldEvent({map, event: eventConfig}); await eventHandler.init(); // wait until the event gets revolved diff --git a/js/OverworldEvent.js b/js/OverworldEvent.js index d49c01d..ace3ec4 100644 --- a/js/OverworldEvent.js +++ b/js/OverworldEvent.js @@ -82,13 +82,21 @@ class OverworldEvent { redirectPerson(resolve) { let link = this.event.link; - let newTab = this.event.newTab || false; + let newTab = this.event.newTab || false; // NOT WORKING. Always opening new tab if(newTab) { - console.log("AGAIN"); + // console.log("AGAIN"); window.open(link, '_blank'); } else { window.open(link); } resolve(); } -} \ No newline at end of file + + unlockTreasure(resolve) { + let box_id = this.event.box_id; + // console.log("BID: ", box_id); + applicantData['treasuresObtained'].push(box_id); + console.log(applicantData); + resolve(); + } +} diff --git a/js/OverworldMap.js b/js/OverworldMap.js index 69a639d..fee7640 100644 --- a/js/OverworldMap.js +++ b/js/OverworldMap.js @@ -115,8 +115,24 @@ const getRoute = (x,y, name, link) =>{ return route; } - - +const getTreasureBox = (x,y,box_id) => { + let box = new Person({ + x: utils.withGrid(x), + y: utils.withGrid(y), + src: "./images/blankGuy.png", + useShadow:false, + talking: [ + { + events: [ + {type: "textMessage", text: `Secret Treasure Unlocked!`}, + {type: "unlockTreasure", box_id:box_id}, + // {type: "redirectPerson", link: link, newTab: true}, + ] + }, + ] + }); + return box; +} class OverworldMap { constructor(config) { @@ -259,14 +275,14 @@ class OverworldMap { window.OverworldMaps = { DemoRoom: { - lowerSrc: "./images/FINAL_FOR_REALZ_.png", // current best map is= ./images/official_assets/ourMap32.png + lowerSrc: "./images/acmrpg.png", // current best map is= ./images/official_assets/ourMap32.png // upperSrc: "./images/blank_guy.png", gameObjects: { hero: new Person({ isPlayerControlled: true, src: "./images/Hero.png", useShadow: true, - x: utils.withGrid(28), // 32 44 + x: utils.withGrid(28), // Starting point: 28,32 y: utils.withGrid(32), }), @@ -494,6 +510,15 @@ window.OverworldMaps = { whatsappPerson1: getRoute(45,32,"Kick Start Learn Program", "https://with.acmvit.in/ksl"), whatsappPerson2: getRoute(46,32,"Kick Start Learn Program", "https://with.acmvit.in/ksl"), + treasureBox1: getTreasureBox(21,47,1), + treasureBox2: getTreasureBox(-2,37,2), + treasureBox3: getTreasureBox(44,32,3), + treasureBox4: getTreasureBox(32,19,4), + treasureBox5: getTreasureBox(26,19,5), + treasureBox6: getTreasureBox(43,18,6), + treasureBox7: getTreasureBox(15,68,7), + treasureBox8: getTreasureBox(37,50,8), + }, walls: WALLS, cutsceneSpaces: { diff --git a/js/init.js b/js/init.js index e1cb109..fcea5b5 100644 --- a/js/init.js +++ b/js/init.js @@ -1,3 +1,8 @@ +// contains the applicant's data (used to keep track of the treasure unlocked) +var applicantData = { + treasuresObtained: [] +}; + (function() { // console.log("Working"); const overworld = new Overworld({ diff --git a/js/walls.js b/js/walls.js index 933874b..58ef3b7 100644 --- a/js/walls.js +++ b/js/walls.js @@ -78,6 +78,9 @@ const WALLS = { [utils.asGridCoord(8,13)]: true, [utils.asGridCoord(20,13)]: true, [utils.asGridCoord(30,13)]: true, + [utils.asGridCoord(31,13)]: true, + [utils.asGridCoord(33,13)]: true, + [utils.asGridCoord(34,13)]: true, [utils.asGridCoord(35,13)]: true, [utils.asGridCoord(36,13)]: true, [utils.asGridCoord(41,13)]: true, @@ -286,17 +289,21 @@ const WALLS = { [utils.asGridCoord(47,33)]: true, [utils.asGridCoord(2,34)]: true, [utils.asGridCoord(47,34)]: true, + [utils.asGridCoord(-4,35)]: true, + [utils.asGridCoord(-3,35)]: true, + [utils.asGridCoord(-2,35)]: true, + [utils.asGridCoord(-1,35)]: true, [utils.asGridCoord(2,35)]: true, [utils.asGridCoord(35,35)]: true, [utils.asGridCoord(47,35)]: true, - [utils.asGridCoord(-1,36)]: true, + [utils.asGridCoord(-5,36)]: true, [utils.asGridCoord(0,36)]: true, [utils.asGridCoord(1,36)]: true, [utils.asGridCoord(2,36)]: true, [utils.asGridCoord(34,36)]: true, [utils.asGridCoord(35,36)]: true, [utils.asGridCoord(47,36)]: true, - [utils.asGridCoord(-2,37)]: true, + [utils.asGridCoord(-6,37)]: true, [utils.asGridCoord(23,37)]: true, [utils.asGridCoord(24,37)]: true, [utils.asGridCoord(33,37)]: true, @@ -305,15 +312,10 @@ const WALLS = { [utils.asGridCoord(38,37)]: true, [utils.asGridCoord(39,37)]: true, [utils.asGridCoord(46,37)]: true, - [utils.asGridCoord(-1,38)]: true, - [utils.asGridCoord(0,38)]: true, - [utils.asGridCoord(1,38)]: true, - [utils.asGridCoord(2,38)]: true, + [utils.asGridCoord(-5,38)]: true, [utils.asGridCoord(3,38)]: true, [utils.asGridCoord(4,38)]: true, - [utils.asGridCoord(8,38)]: true, - [utils.asGridCoord(9,38)]: true, - [utils.asGridCoord(10,38)]: true, + [utils.asGridCoord(5,38)]: true, [utils.asGridCoord(20,38)]: true, [utils.asGridCoord(21,38)]: true, [utils.asGridCoord(22,38)]: true, @@ -323,7 +325,11 @@ const WALLS = { [utils.asGridCoord(38,38)]: true, [utils.asGridCoord(44,38)]: true, [utils.asGridCoord(45,38)]: true, - [utils.asGridCoord(5,39)]: true, + [utils.asGridCoord(-4,39)]: true, + [utils.asGridCoord(-3,39)]: true, + [utils.asGridCoord(-2,39)]: true, + [utils.asGridCoord(-1,39)]: true, + [utils.asGridCoord(2,39)]: true, [utils.asGridCoord(6,39)]: true, [utils.asGridCoord(7,39)]: true, [utils.asGridCoord(11,39)]: true, @@ -332,15 +338,26 @@ const WALLS = { [utils.asGridCoord(26,39)]: true, [utils.asGridCoord(31,39)]: true, [utils.asGridCoord(44,39)]: true, + [utils.asGridCoord(-1,40)]: true, + [utils.asGridCoord(2,40)]: true, [utils.asGridCoord(13,40)]: true, [utils.asGridCoord(18,40)]: true, [utils.asGridCoord(19,40)]: true, [utils.asGridCoord(26,40)]: true, [utils.asGridCoord(44,40)]: true, + [utils.asGridCoord(-5,41)]: true, + [utils.asGridCoord(-4,41)]: true, + [utils.asGridCoord(-3,41)]: true, + [utils.asGridCoord(-2,41)]: true, + [utils.asGridCoord(-1,41)]: true, + [utils.asGridCoord(2,41)]: true, [utils.asGridCoord(13,41)]: true, [utils.asGridCoord(17,41)]: true, [utils.asGridCoord(26,41)]: true, [utils.asGridCoord(44,41)]: true, + [utils.asGridCoord(-6,42)]: true, + [utils.asGridCoord(-1,42)]: true, + [utils.asGridCoord(2,42)]: true, [utils.asGridCoord(4,42)]: true, [utils.asGridCoord(5,42)]: true, [utils.asGridCoord(6,42)]: true, @@ -349,6 +366,7 @@ const WALLS = { [utils.asGridCoord(13,42)]: true, [utils.asGridCoord(17,42)]: true, [utils.asGridCoord(44,42)]: true, + [utils.asGridCoord(-6,43)]: true, [utils.asGridCoord(3,43)]: true, [utils.asGridCoord(9,43)]: true, [utils.asGridCoord(13,43)]: true, @@ -359,6 +377,8 @@ const WALLS = { [utils.asGridCoord(21,43)]: true, [utils.asGridCoord(24,43)]: true, [utils.asGridCoord(43,43)]: true, + [utils.asGridCoord(-5,44)]: true, + [utils.asGridCoord(2,44)]: true, [utils.asGridCoord(3,44)]: true, [utils.asGridCoord(10,44)]: true, [utils.asGridCoord(11,44)]: true, @@ -371,6 +391,12 @@ const WALLS = { [utils.asGridCoord(33,44)]: true, [utils.asGridCoord(41,44)]: true, [utils.asGridCoord(42,44)]: true, + [utils.asGridCoord(-4,45)]: true, + [utils.asGridCoord(-3,45)]: true, + [utils.asGridCoord(-2,45)]: true, + [utils.asGridCoord(-1,45)]: true, + [utils.asGridCoord(0,45)]: true, + [utils.asGridCoord(1,45)]: true, [utils.asGridCoord(3,45)]: true, [utils.asGridCoord(22,45)]: true, [utils.asGridCoord(25,45)]: true, @@ -483,22 +509,49 @@ const WALLS = { [utils.asGridCoord(24,66)]: true, [utils.asGridCoord(25,66)]: true, [utils.asGridCoord(36,66)]: true, + [utils.asGridCoord(15,67)]: true, + [utils.asGridCoord(16,67)]: true, + [utils.asGridCoord(17,67)]: true, [utils.asGridCoord(22,67)]: true, [utils.asGridCoord(36,67)]: true, + [utils.asGridCoord(15,68)]: true, + [utils.asGridCoord(17,68)]: true, [utils.asGridCoord(23,68)]: true, [utils.asGridCoord(33,68)]: true, [utils.asGridCoord(34,68)]: true, [utils.asGridCoord(35,68)]: true, + [utils.asGridCoord(15,69)]: true, + [utils.asGridCoord(17,69)]: true, [utils.asGridCoord(24,69)]: true, [utils.asGridCoord(30,69)]: true, [utils.asGridCoord(31,69)]: true, [utils.asGridCoord(32,69)]: true, + [utils.asGridCoord(15,70)]: true, + [utils.asGridCoord(17,70)]: true, + [utils.asGridCoord(18,70)]: true, + [utils.asGridCoord(19,70)]: true, + [utils.asGridCoord(20,70)]: true, + [utils.asGridCoord(21,70)]: true, + [utils.asGridCoord(22,70)]: true, + [utils.asGridCoord(23,70)]: true, [utils.asGridCoord(24,70)]: true, [utils.asGridCoord(30,70)]: true, - [utils.asGridCoord(25,71)]: true, + [utils.asGridCoord(15,71)]: true, [utils.asGridCoord(26,71)]: true, [utils.asGridCoord(27,71)]: true, [utils.asGridCoord(28,71)]: true, [utils.asGridCoord(29,71)]: true, [utils.asGridCoord(30,71)]: true, + [utils.asGridCoord(15,72)]: true, + [utils.asGridCoord(16,72)]: true, + [utils.asGridCoord(17,72)]: true, + [utils.asGridCoord(18,72)]: true, + [utils.asGridCoord(19,72)]: true, + [utils.asGridCoord(20,72)]: true, + [utils.asGridCoord(21,72)]: true, + [utils.asGridCoord(22,72)]: true, + [utils.asGridCoord(23,72)]: true, + [utils.asGridCoord(24,72)]: true, + [utils.asGridCoord(25,72)]: true, + [utils.asGridCoord(26,72)]: true, }; \ No newline at end of file diff --git a/wallGenerator.py b/wallGenerator.py index d03dd33..e665d3e 100644 --- a/wallGenerator.py +++ b/wallGenerator.py @@ -6,7 +6,7 @@ def removeFlagged(coordinate_list): # For insta, twitter blocks - flagged = [[31,40],[32,40],[33,41],[34,41],[35,40],[36,40],[37,39],[38,39],[26,42],[25,42],[45,32],[46,32]] + flagged = [[31,40],[32,40],[33,41],[34,41],[35,40],[36,40],[37,39],[38,39],[26,42],[25,42],[45,32],[46,32],[10,38],[9,38],[8,38]] newList = [] for point in coordinate_list: diff --git a/wall_coordinates.txt b/wall_coordinates.txt index 59531a5..5cd3d0e 100644 --- a/wall_coordinates.txt +++ b/wall_coordinates.txt @@ -77,6 +77,9 @@ [utils.asGridCoord(8,13)]: true, [utils.asGridCoord(20,13)]: true, [utils.asGridCoord(30,13)]: true, +[utils.asGridCoord(31,13)]: true, +[utils.asGridCoord(33,13)]: true, +[utils.asGridCoord(34,13)]: true, [utils.asGridCoord(35,13)]: true, [utils.asGridCoord(36,13)]: true, [utils.asGridCoord(41,13)]: true, @@ -285,17 +288,21 @@ [utils.asGridCoord(47,33)]: true, [utils.asGridCoord(2,34)]: true, [utils.asGridCoord(47,34)]: true, +[utils.asGridCoord(-4,35)]: true, +[utils.asGridCoord(-3,35)]: true, +[utils.asGridCoord(-2,35)]: true, +[utils.asGridCoord(-1,35)]: true, [utils.asGridCoord(2,35)]: true, [utils.asGridCoord(35,35)]: true, [utils.asGridCoord(47,35)]: true, -[utils.asGridCoord(-1,36)]: true, +[utils.asGridCoord(-5,36)]: true, [utils.asGridCoord(0,36)]: true, [utils.asGridCoord(1,36)]: true, [utils.asGridCoord(2,36)]: true, [utils.asGridCoord(34,36)]: true, [utils.asGridCoord(35,36)]: true, [utils.asGridCoord(47,36)]: true, -[utils.asGridCoord(-2,37)]: true, +[utils.asGridCoord(-6,37)]: true, [utils.asGridCoord(23,37)]: true, [utils.asGridCoord(24,37)]: true, [utils.asGridCoord(33,37)]: true, @@ -304,12 +311,10 @@ [utils.asGridCoord(38,37)]: true, [utils.asGridCoord(39,37)]: true, [utils.asGridCoord(46,37)]: true, -[utils.asGridCoord(-1,38)]: true, -[utils.asGridCoord(0,38)]: true, -[utils.asGridCoord(1,38)]: true, -[utils.asGridCoord(2,38)]: true, +[utils.asGridCoord(-5,38)]: true, [utils.asGridCoord(3,38)]: true, [utils.asGridCoord(4,38)]: true, +[utils.asGridCoord(5,38)]: true, [utils.asGridCoord(8,38)]: true, [utils.asGridCoord(9,38)]: true, [utils.asGridCoord(10,38)]: true, @@ -322,7 +327,11 @@ [utils.asGridCoord(38,38)]: true, [utils.asGridCoord(44,38)]: true, [utils.asGridCoord(45,38)]: true, -[utils.asGridCoord(5,39)]: true, +[utils.asGridCoord(-4,39)]: true, +[utils.asGridCoord(-3,39)]: true, +[utils.asGridCoord(-2,39)]: true, +[utils.asGridCoord(-1,39)]: true, +[utils.asGridCoord(2,39)]: true, [utils.asGridCoord(6,39)]: true, [utils.asGridCoord(7,39)]: true, [utils.asGridCoord(11,39)]: true, @@ -331,15 +340,26 @@ [utils.asGridCoord(26,39)]: true, [utils.asGridCoord(31,39)]: true, [utils.asGridCoord(44,39)]: true, +[utils.asGridCoord(-1,40)]: true, +[utils.asGridCoord(2,40)]: true, [utils.asGridCoord(13,40)]: true, [utils.asGridCoord(18,40)]: true, [utils.asGridCoord(19,40)]: true, [utils.asGridCoord(26,40)]: true, [utils.asGridCoord(44,40)]: true, +[utils.asGridCoord(-5,41)]: true, +[utils.asGridCoord(-4,41)]: true, +[utils.asGridCoord(-3,41)]: true, +[utils.asGridCoord(-2,41)]: true, +[utils.asGridCoord(-1,41)]: true, +[utils.asGridCoord(2,41)]: true, [utils.asGridCoord(13,41)]: true, [utils.asGridCoord(17,41)]: true, [utils.asGridCoord(26,41)]: true, [utils.asGridCoord(44,41)]: true, +[utils.asGridCoord(-6,42)]: true, +[utils.asGridCoord(-1,42)]: true, +[utils.asGridCoord(2,42)]: true, [utils.asGridCoord(4,42)]: true, [utils.asGridCoord(5,42)]: true, [utils.asGridCoord(6,42)]: true, @@ -348,6 +368,7 @@ [utils.asGridCoord(13,42)]: true, [utils.asGridCoord(17,42)]: true, [utils.asGridCoord(44,42)]: true, +[utils.asGridCoord(-6,43)]: true, [utils.asGridCoord(3,43)]: true, [utils.asGridCoord(9,43)]: true, [utils.asGridCoord(13,43)]: true, @@ -358,6 +379,8 @@ [utils.asGridCoord(21,43)]: true, [utils.asGridCoord(24,43)]: true, [utils.asGridCoord(43,43)]: true, +[utils.asGridCoord(-5,44)]: true, +[utils.asGridCoord(2,44)]: true, [utils.asGridCoord(3,44)]: true, [utils.asGridCoord(10,44)]: true, [utils.asGridCoord(11,44)]: true, @@ -370,6 +393,12 @@ [utils.asGridCoord(33,44)]: true, [utils.asGridCoord(41,44)]: true, [utils.asGridCoord(42,44)]: true, +[utils.asGridCoord(-4,45)]: true, +[utils.asGridCoord(-3,45)]: true, +[utils.asGridCoord(-2,45)]: true, +[utils.asGridCoord(-1,45)]: true, +[utils.asGridCoord(0,45)]: true, +[utils.asGridCoord(1,45)]: true, [utils.asGridCoord(3,45)]: true, [utils.asGridCoord(22,45)]: true, [utils.asGridCoord(25,45)]: true, @@ -482,21 +511,48 @@ [utils.asGridCoord(24,66)]: true, [utils.asGridCoord(25,66)]: true, [utils.asGridCoord(36,66)]: true, +[utils.asGridCoord(15,67)]: true, +[utils.asGridCoord(16,67)]: true, +[utils.asGridCoord(17,67)]: true, [utils.asGridCoord(22,67)]: true, [utils.asGridCoord(36,67)]: true, +[utils.asGridCoord(15,68)]: true, +[utils.asGridCoord(17,68)]: true, [utils.asGridCoord(23,68)]: true, [utils.asGridCoord(33,68)]: true, [utils.asGridCoord(34,68)]: true, [utils.asGridCoord(35,68)]: true, +[utils.asGridCoord(15,69)]: true, +[utils.asGridCoord(17,69)]: true, [utils.asGridCoord(24,69)]: true, [utils.asGridCoord(30,69)]: true, [utils.asGridCoord(31,69)]: true, [utils.asGridCoord(32,69)]: true, +[utils.asGridCoord(15,70)]: true, +[utils.asGridCoord(17,70)]: true, +[utils.asGridCoord(18,70)]: true, +[utils.asGridCoord(19,70)]: true, +[utils.asGridCoord(20,70)]: true, +[utils.asGridCoord(21,70)]: true, +[utils.asGridCoord(22,70)]: true, +[utils.asGridCoord(23,70)]: true, [utils.asGridCoord(24,70)]: true, [utils.asGridCoord(30,70)]: true, -[utils.asGridCoord(25,71)]: true, +[utils.asGridCoord(15,71)]: true, [utils.asGridCoord(26,71)]: true, [utils.asGridCoord(27,71)]: true, [utils.asGridCoord(28,71)]: true, [utils.asGridCoord(29,71)]: true, [utils.asGridCoord(30,71)]: true, +[utils.asGridCoord(15,72)]: true, +[utils.asGridCoord(16,72)]: true, +[utils.asGridCoord(17,72)]: true, +[utils.asGridCoord(18,72)]: true, +[utils.asGridCoord(19,72)]: true, +[utils.asGridCoord(20,72)]: true, +[utils.asGridCoord(21,72)]: true, +[utils.asGridCoord(22,72)]: true, +[utils.asGridCoord(23,72)]: true, +[utils.asGridCoord(24,72)]: true, +[utils.asGridCoord(25,72)]: true, +[utils.asGridCoord(26,72)]: true,