Skip to content

Commit

Permalink
added dialog and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmiccoder committed Feb 11, 2022
1 parent 12c73ac commit 065af6f
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 51 deletions.
Binary file added images/ananya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/yash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
149 changes: 112 additions & 37 deletions js/OverworldMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ let allCutsceneSpaces = {
...generateCutsceneSpaces(vinamra_cutscene_set_of_coords_raw, vinamraPath),
...generateCutsceneSpaces(shreyas_cutscene_set_of_coords_raw, shreyasPath),
...generateCutsceneSpaces(sumona_cutscene_set_of_coords_raw, sumonaPath),
...generateCutsceneSpaces(yash_cutscene_set_of_coords_raw, yashPath),
};

// All redirects to other urls (also triggered by footsteps)
Expand All @@ -73,6 +74,33 @@ let allRedirects = {
}
],

[utils.asGridCoord(25,21)]: [
{
events: [
{type: "textMessage", text: "Redirecting to the Research Domain's form!"},
{type: "redirectPerson", link: "./research"},
]
}
],

[utils.asGridCoord(3,21)]: [
{
events: [
{type: "textMessage", text: "Redirecting to the Web Domain's form!"},
{type: "redirectPerson", link: "./web"},
]
}
],

[utils.asGridCoord(3,11)]: [
{
events: [
{type: "textMessage", text: "Redirecting to the App Domain's form!"},
{type: "redirectPerson", link: "./app"},
]
}
],

[utils.asGridCoord(27,68)]: [
{
events: [
Expand All @@ -86,19 +114,37 @@ let allRedirects = {
{
events: [
{type: "textMessage", text: "Redirecting to the UI/UX Form!"},
{type: "redirectPerson", link: "./design"},
{type: "redirectPerson", link: "./designUIUX"},
]
}
],

// [utils.asGridCoord(-2,31)]: [
// {
// events: [
// {type: "textMessage", text: "Redirecting to the UI/UX Form!"},
// {type: "redirectPerson", link: "./design"},
// ]
// }
// ],
[utils.asGridCoord(-3,37)]: [
{
events: [
{type: "textMessage", text: "Redirecting to the Graphic Design Form!"},
{type: "redirectPerson", link: "./designGraphic"},
]
}
],

[utils.asGridCoord(-3,43)]: [
{
events: [
{type: "textMessage", text: "Redirecting to the Motion Design Form!"},
{type: "redirectPerson", link: "./designMotion"},
]
}
],

[utils.asGridCoord(-3,37)]: [
{
events: [
{type: "textMessage", text: "Redirecting to the Graphic Design Form!"},
{type: "redirectPerson", link: "./designGraphic"},
]
}
],



Expand Down Expand Up @@ -249,6 +295,12 @@ class OverworldMap {
delete this.cutsceneSpaces[sumona_cutscene_set_of_coords[i]];
}
}

else if(yash_cutscene_set_of_coords.includes(hero_tile)) {
for(let i = 0; i < yash_cutscene_set_of_coords.length; i++) {
delete this.cutsceneSpaces[yash_cutscene_set_of_coords[i]];
}
}
}

addWall(x,y) {
Expand Down Expand Up @@ -276,13 +328,13 @@ window.OverworldMaps = {
src: "./images/Hero.png",
useShadow: true,
x: utils.withGrid(28), // Starting point: 28,31
y: utils.withGrid(31),// -3,37
y: utils.withGrid(31),
}),

npcA: new Person({
x: utils.withGrid(19),
y: utils.withGrid(9),
src: "./images/brownGuy1.png",
yash: new Person({
x: utils.withGrid(18),
y: utils.withGrid(8),
src: "./images/yash.png",
useShadow: true,
behaviorLoop: [
{type: "stand", direction: "left", time: 800},
Expand All @@ -294,17 +346,16 @@ window.OverworldMaps = {
{
// defined this way so that people can say different things, at different points in time
events: [
{type: "textMessage", text: "I'm busy...", faceHero: "npcA"},
{type: "textMessage", text: "Go away!"},
// {who: "hero", type: "walk", direction: "left"}
{type: "textMessage", text: "Yash: Young men, listen to the old man,", faceHero: "yash"},
{type: "textMessage", text: "to whom the old man heard, when he was young.", faceHero: "yash"},
]
},
],
}),

hemanth: new Person({
x: utils.withGrid(2),
y: utils.withGrid(10),
y: utils.withGrid(9),
src: "./images/brownGuy1.png",
useShadow: true,
behaviorLoop: [
Expand All @@ -318,8 +369,8 @@ 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: "what xD", faceHero: "hemanth"},
{type: "textMessage", text: "sup, nothing to stalk here"},
{type: "textMessage", text: "Hemanth: Hi", faceHero: "hemanth"},
{type: "textMessage", text: "Nothing to stalk here"},
{type: "textMessage", text: "xD"},
]
},
Expand All @@ -340,9 +391,8 @@ 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: "Dhriti: Design helps me relax", faceHero: "dhriti"},
]
},
]
}),
Expand All @@ -361,7 +411,7 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "Don't make a Diya joke around me", faceHero: "diya"},
{type: "textMessage", text: "Diya: Don't make a Diya joke around me", faceHero: "diya"},
]
},
]
Expand All @@ -381,8 +431,8 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "Am I Ishi?", faceHero: "ishi"},
{type: "textMessage", text: "Or any boring person?"},
{type: "textMessage", text: "Ishi: Hi I'm Ishi", faceHero: "ishi"},
{type: "textMessage", text: "And that's NOT my nickname"},
]
},
]
Expand All @@ -402,7 +452,7 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "Hey, I'm Rehber!", faceHero: "rehber"},
{type: "textMessage", text: "Rehber: 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"},
]
Expand All @@ -424,22 +474,22 @@ window.OverworldMaps = {
talking: [
{
events: [ // A tour of ACM's events
{type: "textMessage", text: "Let me give you a tour of our events", faceHero: "rishabh"},
{type: "textMessage", text: "Rishabh: Let me give you a tour of our events", faceHero: "rishabh"},
walkRight("hero"),walkUp("hero"),walkRight("hero"),walkRight("hero"),walkRight("hero"),walkRight("hero"),walkRight("hero"),
walkUp("hero"),standLeft("hero",200),

walkUp("rishabh"),walkLeft("rishabh"),walkUp("rishabh"),walkUp("rishabh"),walkUp("rishabh"),standRight("rishabh",200),
{type: "textMessage", text: "This is our app centric hackathon, Apptitude,"},
{type: "textMessage", text: "Where we gave away over 50k in cash prizes :D"},
{type: "textMessage", text: "in which we gave away over 50k in cash prizes :D"},

walkRight("rishabh"),walkRight("rishabh"),
{type: "textMessage", text: "This is Reverse Coding, our competitive coding event with a twist"},
{type: "textMessage", text: "This is Reverse Coding, our competitive coding event with a twist,"},
{type: "textMessage", text: "which got over 2800 participants this year!"},

walkRight("rishabh"),walkRight("rishabh"),walkUp("rishabh"),walkRight("rishabh"),walkRight("rishabh"),
standUp("rishabh",200),standUp("hero",200),
{type: "textMessage", text: "This is Code2Create, our flagship hackathon,"},
{type: "textMessage", text: "Where participants from all over the world compete to win."},
{type: "textMessage", text: "This is Code2Create, our flagship event."},
{type: "textMessage", text: "It is one of VIT's biggest hackathons, where students all across India compete to win."},

walkRight("rishabh"),walkRight("rishabh"),walkDown("rishabh"),walkRight("rishabh"),walkRight("rishabh"),walkRight("rishabh"),
standUp("rishabh",200),standRight("hero",200),
Expand Down Expand Up @@ -473,7 +523,9 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "It's about drive, it's about power", faceHero: "vinamra"},
{type: "textMessage", text: "Vinamra: Howdy", faceHero: "vinamra"},
{type: "textMessage", text: "I've always loved being in ACMVIT", faceHero: "vinamra"},
{type: "textMessage", text: "I hope you join us too!", faceHero: "vinamra"},
]
},
]
Expand All @@ -493,8 +545,8 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "Shh, I got social anxiety...", faceHero: "shreyas"},
{type: "textMessage", text: "P.S: Why don't you give the web domain a try though?", faceHero: "shreyas"},
{type: "textMessage", text: "Shreyas: Shh, I got social anxiety...", faceHero: "shreyas"},
{type: "textMessage", text: "P.S: Why don't you give the Web Domain a try though?", faceHero: "shreyas"},
]
},
]
Expand All @@ -511,7 +563,7 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "Dwayne: It's about drive, it's about power", faceHero: "theRock"},
{type: "textMessage", text: "The Rock: It's about drive, it's about power", faceHero: "theRock"},
{type: "textMessage", text: "We stay hungry, we devour!", faceHero: "theRock"},
{type: "textMessage", text: "Put in the work, put in the hour", faceHero: "theRock"},
{type: "textMessage", text: "To take what's ours!!", faceHero: "theRock"},
Expand All @@ -534,7 +586,30 @@ window.OverworldMaps = {
talking: [
{
events: [
{type: "textMessage", text: "It's about drive, it's about power", faceHero: "sumona"},
{type: "textMessage", text: "Sumona: Your path you must decide, young Padawan", faceHero: "sumona"},
{type: "textMessage", text: "That was my only Star Wars quote!", faceHero: "sumona"},

]
},
]
}),

ananya: new Person({
x: utils.withGrid(0),
y: utils.withGrid(22),
src: "./images/ananya.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: "Ananya: Hey!", faceHero: "ananya"},
{type: "textMessage", text: "Your DOM looks good from <head> to </footer>", faceHero: "ananya"},
]
},
]
Expand Down
46 changes: 32 additions & 14 deletions js/npc_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,39 @@ const getCutsceneSetOfCoords = (coordinateList) => {
// current person
let X = "hemanth";
let hemanthPath = [
walkRight(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),
standRight(X,500),
{type: "textMessage", text: "Are you up for applying to the technical department?"},
{type: "textMessage", text: "If so, enter the portal's center!"},
walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),
walkRight(X),walkRight(X),walkDown(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),standRight(X,200),
{type: "textMessage", text: "Are you up for applying to the App Domain?"},
{type: "textMessage", text: "If so, enter the portal!"},
walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),walkLeft(X),walkUp(X),walkLeft(X),walkLeft(X),standRight(X,200),
]

// hemanth's cutscene's set of coordinates
let hemanth_cutscene_set_of_coords_raw = [[10,9],[11,9],[12,9],[13,9],[14,9],[15,9],[16,9],[17,9],[18,9],[19,9]] // raw == tile format and not in pixel format
// raw == tile format and not in pixel format
let hemanth_cutscene_set_of_coords_raw = [[11,11],[11,10],[11,9],[11,8],[10,8],[11,12],[11,13],[11,14],[10,14]]
let hemanth_cutscene_set_of_coords = getCutsceneSetOfCoords(hemanth_cutscene_set_of_coords_raw); // pixel format

X = "yash";
let yashPath = [
walkLeft(X),walkUp(X),walkLeft(X),walkLeft(X),walkLeft(X),standDown(X,200),
{type: "textMessage", text: "Are you up for applying to the General Technical Domain?"},
{type: "textMessage", text: "If so, enter the portal!"},
walkRight(X),walkRight(X),walkRight(X),walkDown(X),walkRight(X),standLeft(X,200),
]

let yash_cutscene_set_of_coords_raw = [[10,9],[11,9],[12,9],[13,9],[14,9],[15,9],[16,9],[17,9],[18,9],[19,9]]
let yash_cutscene_set_of_coords = getCutsceneSetOfCoords(yash_cutscene_set_of_coords_raw);




X = "dhriti";
let dhritiPath = [
walkDown(X),walkRight(X),walkDown(X),walkRight(X),walkRight(X),walkRight(X),walkRight(X),
standRight(X,500),
{type: "textMessage", text: "Are you good looking?"},
{type: "textMessage", text: "Of course you are!"},
{type: "textMessage", text: "But we want people that can make things that are good looking..."},
{type: "textMessage", text: "If you're interested, enter the portal's center!"},
{type: "textMessage", text: "But we want people that can make things look good..."},
{type: "textMessage", text: "If you're interested, enter the portal!"},
walkLeft(X), walkLeft(X), walkLeft(X),
walkLeft(X),walkUp(X),walkLeft(X),walkUp(X),
]
Expand All @@ -79,7 +93,7 @@ let diyaPath = [
walkUp(X),walkLeft(X),walkUp(X),walkUp(X),walkUp(X),
standUp(X,500),
{type: "textMessage", text:"Will you be able to manage management, while having a great social life?"},
{type: "textMessage", text: "If so, enter the portal center to apply!"},
{type: "textMessage", text: "If so, enter the portal!"},
walkRight(X),walkDown(X),walkDown(X),walkDown(X),walkDown(X),
]

Expand All @@ -91,7 +105,7 @@ let rehberPath = [
walkRight(X),walkRight(X),walkRight(X),walkRight(X),walkUp(X),walkUp(X),
standUp(X,500),
{type: "textMessage", text:"Wanna join our cool competitive team?"},
{type: "textMessage", text: "If so, enter the portal's center!"},
{type: "textMessage", text: "If so, enter the portal!"},
walkLeft(X),walkDown(X),walkDown(X),walkLeft(X),walkLeft(X),walkLeft(X),
]

Expand All @@ -103,8 +117,8 @@ let rehber_cutscene_set_of_coords = getCutsceneSetOfCoords(rehber_cutscene_set_o
X = "vinamra";
let vinamraPath = [
walkDown(X),walkLeft(X),walkLeft(X),walkLeft(X),standLeft(X,200),
{type: "textMessage", text:"In the Research domain we work on cool, nonstandard technologies..."},
{type: "textMessage", text:"If you have a curious mindset, fill the research form!"},
{type: "textMessage", text:"In the Research Domain we work on cool, novel technologies..."},
{type: "textMessage", text:"If you have a curious mindset, fill the Research form!"},
walkRight(X),walkRight(X),walkRight(X),walkUp(X),standDown(X,200),
]

Expand All @@ -116,7 +130,7 @@ let vinamra_cutscene_set_of_coords = getCutsceneSetOfCoords(vinamra_cutscene_set
X = "shreyas"
let shreyasPath = [
walkDown(X),standRight(X,200),
{type: "textMessage", text:"To join our awesome web domain, hop into this portal you see ahead!"},
{type: "textMessage", text:"To join our awesome Web Domain, hop onto the portal ahead!"},
walkUp(X),standRight(X,200),
]

Expand All @@ -127,7 +141,11 @@ let shreyas_cutscene_set_of_coords = getCutsceneSetOfCoords(shreyas_cutscene_set
X = "sumona"
let sumonaPath = [
walkUp(X),walkRight(X),walkRight(X),walkRight(X),walkUp(X),standUp(X,200),
{type: "textMessage", text:"Welcome Message!"},
{type: "textMessage", text:"Welcome to ACM-RPG!"},
{type: "textMessage", text:"Thank you for hopping in."},
{type: "textMessage", text:"Make sure you check out all the domains we have to offer."},
{type: "textMessage", text:"We hope you have fun while applying to ACMVIT"},
{type: "textMessage", text:"Best of luck!"},
walkDown(X),walkLeft(X),walkLeft(X),walkLeft(X),walkDown(X),standUp(X,200),
];

Expand Down

0 comments on commit 065af6f

Please sign in to comment.