From 91635ab2fe93d111296fb97b58f43bf579a2a208 Mon Sep 17 00:00:00 2001 From: chasmiccoder Date: Thu, 10 Feb 2022 15:20:32 +0530 Subject: [PATCH] misc --- images/rehber.png | Bin 0 -> 1539 bytes js/OverworldMap.js | 74 ++++++++++++++++++++++++++++++++------------- js/Person.js | 2 +- js/Sprite.js | 3 +- wallGenerator.py | 0 5 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 images/rehber.png create mode 100644 wallGenerator.py diff --git a/images/rehber.png b/images/rehber.png new file mode 100644 index 0000000000000000000000000000000000000000..0106c80b39bb229723e7f74dcf8e30aba378a7d8 GIT binary patch literal 1539 zcmXApdr;C@6vwf5mdg4_w@_+V*Ob($(ZVEOp@>dqOhJOJJ=RB3U z1hPR#Au)je8L+FHHUMYgN5x*iZO)8}&jx|Ed05N}jd7m`F0HaLsBjQh44DFgbtz#- z!a$%Wj4kFf>p`IP6=-DGaf;RKz3v=`FtAX9*l6tv27@u{)`Q~;t?z@PNmjn09^g1o z1l)b+&P>);^Pbm*$pQa-W>&VVsNF9mjW4QQ<>cm0dB)ar8zvny-YN1#VgRRaw@i-hp=#E#_hW znxgOo<&N@P6l>D14@y6(d`_Z~d$e!}9Y&pd%{D(UxHnyiBJ%99Jzs~l9i`M!TD!sg z+O*t14js33mT7FEetiMk6VGB-;_~h5l=V(1(o${%WpuK&lMhiW9oC}nG(X+nBVEF) zBy`xl#9I=6jQXmwZ1*fhuup=Up1#W;XogQA@PTaudBtL&h46F{frr42rKZ(gI1v0G zTJ*L2`n;vL@C!rpmmfuDG)EG9Qu{`XA_5^0-yC_JZ<02}d+~GRR|ID}oMSPN^v0l~ ze|^&LsNUsz*)lxuGFG~Sww9l3M<|Sk_L$a=7d)f6(T~=(s&eHoe|HoyJQZVpM^Z(E z8454!q-t<+5!t;rJb!m^aW&C@Il);gNaV;|>St5j8bAM$VCxgSy7Dk9REw^l2GmFu zp*B8UMYupVHGF=E4LPA5Evw<3`BUHpuqH<1Yk#Vttt zdm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verworldMap.js index a0bd30b..c6370e9 100644 --- a/js/OverworldMap.js +++ b/js/OverworldMap.js @@ -82,7 +82,7 @@ let rehberPath = [ {who: "rehber", type: "walk", direction: "up"}, {who: "rehber", type: "walk", direction: "up"}, - {who: "diya", type: "stand", direction: "up", time:500}, + {who: "rehber", type: "stand", direction: "up", time:500}, {type: "textMessage", text:"Wanna join our cool competitive team?"}, {type: "textMessage", text: "If so, enter the portal and hit 'Enter'!"}, @@ -96,6 +96,27 @@ let rehberPath = [ let rehber_cutscene_set_of_coords = [`${33*32},${63*32}`, `${34*32},${63*32}`, `${35*32},${63*32}`]; +const getRoute = (x,y, name, link) =>{ + let route = new Person({ + x: utils.withGrid(x), + y: utils.withGrid(y), + src: "./images/blankGuy.png", + useShadow:false, + talking: [ + { + events: [ + {type: "textMessage", text: `Redirecting to ACMVIT's ${name}!`}, + {type: "redirectPerson", link: link, newTab: true}, + ] + }, + ] + }); + + return route; +} + + + class OverworldMap { constructor(config) { @@ -250,6 +271,7 @@ window.OverworldMaps = { hero: new Person({ isPlayerControlled: true, src: "./images/Hero.png", + useShadow: true, x: utils.withGrid(32), // 32 44 y: utils.withGrid(44), }), @@ -268,6 +290,7 @@ window.OverworldMaps = { x: utils.withGrid(19), y: utils.withGrid(9), src: "./images/brownGuy1.png", + useShadow: true, behaviorLoop: [ {type: "stand", direction: "left", time: 800}, {type: "stand", direction: "up", time: 800}, @@ -322,6 +345,7 @@ window.OverworldMaps = { x: utils.withGrid(2), y: utils.withGrid(10), src: "./images/brownGuy1.png", + useShadow: true, behaviorLoop: [ {type: "stand", direction: "left", time: 800}, {type: "stand", direction: "up", time: 800}, @@ -344,6 +368,7 @@ window.OverworldMaps = { x: utils.withGrid(2), y: utils.withGrid(31), src: "./images/dhriti.png", + useShadow: true, behaviorLoop: [ {type: "stand", direction: "left", time: 800}, {type: "stand", direction: "up", time: 800}, @@ -366,6 +391,7 @@ window.OverworldMaps = { x: utils.withGrid(16), y: utils.withGrid(44), src: "./images/diya.png", + useShadow: true, behaviorLoop: [ {type: "stand", direction: "left", time: 800}, {type: "stand", direction: "up", time: 800}, @@ -375,8 +401,7 @@ window.OverworldMaps = { talking: [ { events: [ - {type: "textMessage", text: "It's about drive, it's about power", faceHero: "dhriti"}, - {type: "textMessage", text: "We stay hungry, we devour!"}, + {type: "textMessage", text: "Don't make a Diya joke around me", faceHero: "diya"}, ] }, ] @@ -386,6 +411,7 @@ window.OverworldMaps = { x: utils.withGrid(11), y: utils.withGrid(46), src: "./images/ishi.png", + useShadow: true, behaviorLoop: [ {type: "stand", direction: "left", time: 800}, {type: "stand", direction: "up", time: 800}, @@ -405,7 +431,8 @@ window.OverworldMaps = { rehber: new Person({ x: utils.withGrid(30), y: utils.withGrid(66), - src: "./images/brownGuy1.png", + src: "./images/rehber.png", + useShadow: true, behaviorLoop: [ {type: "stand", direction: "left", time: 800}, {type: "stand", direction: "up", time: 800}, @@ -415,26 +442,33 @@ window.OverworldMaps = { talking: [ { events: [ - {type: "textMessage", text: "It's about drive, it's about power", faceHero: "rehber"}, - {type: "textMessage", text: "We stay hungry, we devour!"}, - ] - }, - ] - }), + {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"}, - twitterRoute1: new Person({ - x: utils.withGrid(31), - y: utils.withGrid(40), - src: "./images/blankGuy.png", - talking: [ - { - events: [ - {type: "textMessage", text: "Redirecting to ACMVIT's Twitter!"}, - {type: "redirectPerson", link: "https://twitter.com/ACM_VIT", newTab: true}, ] }, ] }), + + twitterPerson1: getRoute(31,40,"Twitter", "https://twitter.com/ACM_VIT"), + twitterPerson2: getRoute(32,40,"Twitter", "https://twitter.com/ACM_VIT"), + instagramPerson1: getRoute(33,41,"Instagram","https://www.instagram.com/acmvit/"), + instagramPerson2: getRoute(34,41,"Instagram","https://www.instagram.com/acmvit/"), + discordPerson1: getRoute(35,40,"Discord", "https://with.acmvit.in/discord"), + discordPerson2: getRoute(36,40,"Discord", "https://with.acmvit.in/discord"), + linkedinPerson1: getRoute(37,39,"LinkedIn", "https://www.linkedin.com/company/acm-vit/"), + linkedinPerson2: getRoute(38,39,"LinkedIn", "https://www.linkedin.com/company/acm-vit/"), + facebookPerson1: getRoute(26,42,"Facebook", "https://www.facebook.com/acmvitchapter/"), + facebookPerson2: getRoute(25,42,"Facebook", "https://www.facebook.com/acmvitchapter/"), + 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: { @@ -475,8 +509,6 @@ window.OverworldMaps = { [utils.asGridCoord(34,63)]: [{events: rehberPath}], [utils.asGridCoord(35,38)]: [{events: rehberPath}], - // [utils.asGridCoord(31,41)]: [{events: [{type: "redirectPerson", link:'https://twitter.com/ACM_VIT', newTab:true}] }], - // [utils.asGridCoord(32,41)]: [{events: [{type: "redirectPerson", link:'https://twitter.com/ACM_VIT', newTab:true}] }], diff --git a/js/Person.js b/js/Person.js index 813d771..7413dd3 100644 --- a/js/Person.js +++ b/js/Person.js @@ -32,7 +32,7 @@ class Person extends GameObject { }) } this.updateSprite(state); - } + } } startBehavior(state, behavior) { diff --git a/js/Sprite.js b/js/Sprite.js index 2889e80..2ccc456 100644 --- a/js/Sprite.js +++ b/js/Sprite.js @@ -8,7 +8,8 @@ class Sprite { } this.shadow = new Image(); - this.useShadow = true; // later, config.useShadow || false; + this.useShadow = config.useShadow || false; + if(this.useShadow) { this.shadow.src = "./images/shadow.png"; diff --git a/wallGenerator.py b/wallGenerator.py new file mode 100644 index 0000000..e69de29