From e2f1811bcddd8ccfd4708ad38484f69ef1eca7ce Mon Sep 17 00:00:00 2001 From: chasmiccoder Date: Thu, 10 Feb 2022 23:58:00 +0530 Subject: [PATCH] Added tour + some cleanup --- images/rishabh.png | Bin 0 -> 1479 bytes js/OverworldEvent.js | 6 +- js/OverworldMap.js | 245 +++++++++++++++++++++---------------------- 3 files changed, 121 insertions(+), 130 deletions(-) create mode 100644 images/rishabh.png diff --git a/images/rishabh.png b/images/rishabh.png new file mode 100644 index 0000000000000000000000000000000000000000..d37b0193ecb8b737a512daecf887116af974d83e GIT binary patch literal 1479 zcmW-heLT}!9LJ}tJmu!6k?Wyp8-*yhtNUs*8pGys7K+N_i}H|>2s6}+YaW-eSMlm$ zG0elJVUmpNl~6aL!fR4`kZ{d3wp~x{{`ljZ^E%&i&i8!2=ktD@e4@9Twx*#b1Om|} z;Bh2y37YI14U#g1u9wvV3^xoWo8->;v*sp-S9fYvI)dtO`o~sQeUWL@Hm|cbZ zV)Mpe5Fphi@LjU|jPm+zu17OgoD=UVR4l5PeGl_|PA~>XeJjexVq_a5a#=dn&wR#9 z#e!3Ee~vaIx3O_BnUcumNr6=uuAD_f-l34|X~?GxjCPDqbBc~|D-X^{XcB)a#&=Ig zpyN+M2o1R$JtLt;%3Ek9)ctPLw2GrA~=8%IwAgaj+NB|N%ay1bQsY2(Gb zzv$zzSUT{BWe3!RN7?{ydhk4|30y}A||0h1+)lNneoN* zHR>arV*I>)5V}J*CSMLKz~3~i*{rX&`#lvm9$cN(9U_U#+PD&l3P$nTP5O=~AJUMV z*4jB*`Qp_Qa{RCH%H*`QFNs{S!8b=}X^t>({{zP}IllCmQulL+0nNwc;*3~|U_~cb z8Li}srh3sCN8lO@t>y=Tas2J2quj+}6=jLS(hEgr1~_tr`(9>(Max|i9LTk?6( zVp3oG@O1vTZNqgmn@@YqVE0(5xFEyGMI5U6YKHaFYFs|-m`m+RwBgvVOU(*TM)2k3~Ds#Pxc=R3NstTjdIa(8! zPU97RO3`>#Y5uHH7q4Qrji;z2uz zNg=H`q=>nI;Fu^BKJQ--^W3#Ye>ww%<8)vYn9p7O*+Hr7QDnkwC$m5?AELaf5sX_c ze7E;wmu1`Uz7|;a*v51n1F5^cwe!w?%@b^ZIfMlUPe`K9Ai+y#4N>)(;q`;Yks*dw z>1+F3kiA_}NRPfpQNUmN6X_RPTcx7p+nL8p2HD@`X;;uS04==})X-#QUQ)pS9s$N)k%oRPgw>z5}G zVYa6@^y8C09%%><55UPpL) zd#DSyQ49^hUBgKWOi+@iNtMs<-p0FbY>U6({MZi{)bo|NK~)=y-vPdIVzum?<%4_! z*}?FgKy5w!mbAb%66!AJn!Y8IUP%ya!K1XyQ4YViGVDMNZYYaP0fFw&!>%@HaRfc( zx?I_zk9@5HypuxEn_ts_a`QJIo0Wza-6@LKbFOYAq*1CC5FN^o$Li1BfHR0f{egVG zgXu!WYm!_&!|@CAc%*gjp6Ep{0NN+~2vf**U>&?bUJ#OOy*|u)67=fY4&U`x<8{j)(3wD}Ji>WZmlC7bYP4 z>p)9Y{Q-NUNlI}B@4yiUHnT)1KY!M9R^BD&ie^ArQwl)9bl$Wd57Zi<6wjuLrE<#F z_wS{ksjL#9>oAOx{wI1ebx1bM`0ppfsZHeBc+u(){m+G#WpAw&$=8H81L_{NQFlFQ bE?ZGstTWc-_oobk|1N~!;*H}uh2H!hnAOI3 literal 0 HcmV?d00001 diff --git a/js/OverworldEvent.js b/js/OverworldEvent.js index f2d6e09..d49c01d 100644 --- a/js/OverworldEvent.js +++ b/js/OverworldEvent.js @@ -2,9 +2,6 @@ class OverworldEvent { constructor({map, event}) { this.map = map; this.event = event; - - // this.link = event.link - // this.newTab = event.newTab; } init() { @@ -85,8 +82,9 @@ class OverworldEvent { redirectPerson(resolve) { let link = this.event.link; - let newTab = this.event.link || false; + let newTab = this.event.newTab || false; if(newTab) { + console.log("AGAIN"); window.open(link, '_blank'); } else { window.open(link); diff --git a/js/OverworldMap.js b/js/OverworldMap.js index 8c05c01..4de7ed4 100644 --- a/js/OverworldMap.js +++ b/js/OverworldMap.js @@ -139,8 +139,6 @@ 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.33) - cameraPerson.x, utils.withGrid(6.5) - cameraPerson.y); // fixing offset context.drawImage(this.lowerImage, utils.withGrid(10.40) - cameraPerson.x, utils.withGrid(6.7) - cameraPerson.y); } @@ -157,8 +155,6 @@ class OverworldMap { Object.keys(this.gameObjects).forEach( key => { let object = this.gameObjects[key]; object.id = key; - - // TODO: determine if this object should be mounted or not object.mount(this); }) } @@ -264,28 +260,16 @@ class OverworldMap { window.OverworldMaps = { DemoRoom: { lowerSrc: "./images/FINAL_FOR_REALZ_.png", // current best map is= ./images/official_assets/ourMap32.png - // lowerSrc: "./images/ourMap16.png", - // lowerSrc: "./images/DemoLower.png", // upperSrc: "./images/blank_guy.png", gameObjects: { hero: new Person({ isPlayerControlled: true, src: "./images/Hero.png", useShadow: true, - x: utils.withGrid(15), // 32 44 - y: utils.withGrid(20), + x: utils.withGrid(5), // 32 44 + y: utils.withGrid(35), }), - // myDrone: new Person({ - // x: utils.withGrid(8), - // y: utils.withGrid(8), - // src: "./images/myDrone.png", - // animations: { // these values are according to the drone's spritesheet - // "spinning": [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7]] - // }, - // currentAnimation: "spinning", - // }), - npcA: new Person({ x: utils.withGrid(19), y: utils.withGrid(9), @@ -308,38 +292,6 @@ window.OverworldMaps = { }, ], }), - // // saying a different thing later - // // { - // // events: [ - // // {type: "textMessage", text: "Congrats on beating that boss!"} - // // ] - // // } - // ] - // }), - - // npcB: new Person({ - // x: utils.withGrid(8), - // y: utils.withGrid(5), - // src: "./images/brownGuy1.png", - // behaviorLoop: [ - // {type: "walk", direction: "left"}, - // // {type: "stand", direction: "left", time: 800}, - // {type: "walk", direction: "up"}, - // {type: "walk", direction: "right"}, - // {type: "walk", direction: "down"}, - // ], - // talking: [ - // { - // // defined this way so that people can say different things, at different points in time - // events: [ - // {type: "textMessage", text: "It's about drive, it's about power", faceHero: "hemanth"}, - // {type: "textMessage", text: "We stay hungry, we devour!"}, - // // {who: "hero", type: "walk", direction: "left"} - // ] - // }, - // ] - // }), - hemanth: new Person({ x: utils.withGrid(2), @@ -357,8 +309,9 @@ window.OverworldMaps = { // defined this way so that people can say different things, at different points in time events: [ // independent event where Hemanth gets to say what he wants - {type: "textMessage", text: "It's about drive, it's about power", faceHero: "hemanth"}, - {type: "textMessage", text: "We stay hungry, we devour!"}, + {type: "textMessage", text: "what xD", faceHero: "hemanth"}, + {type: "textMessage", text: "sup, nothing to stalk here"}, + {type: "textMessage", text: "xD"}, ] }, ] @@ -378,7 +331,6 @@ window.OverworldMaps = { talking: [ { events: [ - // independent event where Dhriti gets to say what he wants {type: "textMessage", text: "It's about drive, it's about power", faceHero: "dhriti"}, {type: "textMessage", text: "We stay hungry, we devour!"}, ] @@ -386,7 +338,6 @@ window.OverworldMaps = { ] }), - diya: new Person({ x: utils.withGrid(16), y: utils.withGrid(44), @@ -445,7 +396,86 @@ window.OverworldMaps = { {type: "textMessage", text: "Hey, I'm Rehber!", faceHero: "rehber"}, {type: "textMessage", text: "I am here to help and guide you in the world of competitive programming.", faceHero: "rehber"}, {type: "textMessage", text: "Walk into this portal to be a part of the legendary ACM competitive team.", faceHero: "rehber"}, + ] + }, + ] + }), + rishabh: new Person({ + x: utils.withGrid(32), + y: utils.withGrid(13), + src: "./images/rishabh.png", + useShadow: true, + behaviorLoop: [ + {type: "stand", direction: "left", time: 800}, + {type: "stand", direction: "up", time: 800}, + {type: "stand", direction: "right", time: 1200}, + {type: "stand", direction: "up", time: 300} + ], + talking: [ + { + events: [ + {type: "textMessage", text: "Let me give you a tour of our events", faceHero: "rishabh"}, + {who: "hero", type: "walk", direction: "right"}, + {who: "hero", type: "walk", direction: "up"}, + {who: "hero", type: "walk", direction: "right"}, + {who: "hero", type: "walk", direction: "right"}, + {who: "hero", type: "walk", direction: "right"}, + {who: "hero", type: "walk", direction: "right"}, + {who: "hero", type: "walk", direction: "right"}, + {who: "hero", type: "walk", direction: "up"}, + {who: "hero", type: "stand", direction: "left", time:200}, + {who: "rishabh", type: "walk", direction: "up"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "up"}, + {who: "rishabh", type: "walk", direction: "up"}, + {who: "rishabh", type: "walk", direction: "up"}, + {who: "rishabh", type: "stand", direction: "right", time:200}, + {type: "textMessage", text: "This is our app centric hackathon, Apptitude,"}, + {type: "textMessage", text: "We gave away over 50k in cash prizes xD"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "right"}, + {type: "textMessage", text: "This is Reverse Coding, our competitive coding event with a twist"}, + {type: "textMessage", text: "which got over 2800 participants!"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "up"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "stand", direction: "up", time:200}, + {who: "hero", type: "stand", direction: "up", time:200}, + {type: "textMessage", text: "This is Code2Create, our flagship hackathon,"}, + {type: "textMessage", text: "Where participants from all over the world compete to win."}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "down"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "walk", direction: "right"}, + {who: "rishabh", type: "stand", direction: "up", time:200}, + {who: "hero", type: "stand", direction: "right", time:200}, + {type: "textMessage", text: "In ACM Bootcamp,"}, + {type: "textMessage", text: "we introduced newcomers to our domains through many mini projects!"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "down"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "stand", direction: "left", time:200}, + {type: "textMessage", text: "It's fun being a participant,"}, + {type: "textMessage", text: "however, it's even better being an organizer."}, + {type: "textMessage", text: "If you choose to join ACMVIT you'll get to learn and grow as person :)"}, + + {who: "rishabh", type: "walk", direction: "down"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "left"}, + {who: "rishabh", type: "walk", direction: "down"}, + {who: "rishabh", type: "walk", direction: "down"}, + {who: "rishabh", type: "stand", direction: "up", time:200}, ] }, ] @@ -464,11 +494,6 @@ 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"), - - - - - }, walls: WALLS, cutsceneSpaces: { @@ -503,73 +528,41 @@ window.OverworldMaps = { [utils.asGridCoord(34,63)]: [{events: rehberPath}], [utils.asGridCoord(35,38)]: [{events: rehberPath}], - - - - - - - - - - - - // [utils.asGridCoord(5,10)]: [ - // { - // events: [ - // {type: "changeMap", map: "Kitchen"} // gets referenced in OverworldEvent - // ] - // } - // ] - // [utils.asGridCoord(7,4)]: [ - // // doing it this way so that for example if you step on a cutscene space - // // and if the cutscene gets over, then the same cutscene should not play when you step on the same tile again - // { - // events: [ - // {who: "npcB", type: "walk", direction: "left"}, - // {who: "npcB", type: "stand", direction: "up", time:500}, - // {type: "textMessage", text: "You can't be in there!"}, - // {who: "npcB", type: "walk", direction: "right"}, - // {who: "hero", type: "walk", direction: "down"}, - // {who: "hero", type: "walk", direction: "left"}, - // ] - // } - // ], - // [utils.asGridCoord(5,10)]: [ - // { - // events: [ - // {type: "changeMap", map: "Kitchen"} // gets referenced in OverworldEvent - // ] - // } - // ] - - } - }, - - Kitchen: { - lowerSrc: "./images/KitchenLower.png", - // upperSrc: "./images/KitchenUpper.png", - gameObjects: { - hero: new Person({ - isPlayerControlled: true, - x: utils.withGrid(5), - y: utils.withGrid(5), - }), - - npcB: new Person({ - x: utils.withGrid(10), - y: utils.withGrid(8), - src: "./images/npc2.png", - talking: [ - { - events: [ - {type: "textMessage", text: "You made it!", faceHero: "npcB"} - ] - } - ] - }), - - + [utils.asGridCoord(14,5)]: [ + { + events: [ + {type: "textMessage", text: "Redirecting to the Technical Form!"}, + {type: "redirectPerson", link: "./technical"}, + ] + } + ], + + [utils.asGridCoord(27,68)]: [ + { + events: [ + {type: "textMessage", text: "Redirecting to the Competitive Coding Form!"}, + {type: "redirectPerson", link: "./competitive"}, + ] + } + ], + + [utils.asGridCoord(-2,31)]: [ + { + events: [ + {type: "textMessage", text: "Redirecting to the Design Form!"}, + {type: "redirectPerson", link: "./design"}, + ] + } + ], + + [utils.asGridCoord(6,44)]: [ + { + events: [ + {type: "textMessage", text: "Redirecting to the Management Form!"}, + {type: "redirectPerson", link: "./management"}, + ] + } + ], } }, }