Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LudoNarrative/ClimateChange
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeOsborn committed Feb 13, 2018
2 parents 7139bfc + d976f72 commit e542580
Show file tree
Hide file tree
Showing 7 changed files with 721 additions and 584 deletions.
32 changes: 24 additions & 8 deletions Coordinator/Coordinator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs


//selectable scenes from main menu
var scenes = ["finalDinner", "finalLecture", "intro:deanOrTravel", "intro:tempDinnerWithFam", "finalBeach"];
var scenes = ["finalDinner", "finalLecture", "intro:deanOrTravel", "intro:tempDinnerWithFam", "finalBeach", "intro:theEnd"];


//for reference, easy access to old temporary scenes.
Expand All @@ -21,7 +21,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
//var finalScenes = ["finalDinner", "finalLecture", "finalTravel", "finalDean", "finalFamilyDinner", "finalBeach", "finalUN", "finalFaculty"];

//scenes played when you hit Begin
var playGameScenes = ["finalDinner", "finalLecture", "finalDean", "finalFamilyDinner", "finalBeach"];
var playGameScenes = ["finalDinner", "finalLecture", "intro:deanOrTravel", "intro:tempDinnerWithFam", "finalBeach", "intro:theEnd"];
State.set("scenes", playGameScenes);

if (Display.interfaceMode == "timeline") {
Expand Down Expand Up @@ -81,6 +81,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
//returns index of next scene
//available scenes: ["finalDinner", "finalLecture", "finalTravel", "finalDean", "finalFamilyDinner", "finalBeach", "finalUN", "finalFaculty"]
var getNextScene = function(currentScene) {
/* This is the old conditional code for moving between scenes based on states, needs to be refactored away from here to evaluate custom State compares put in each scene to see if it's valid, but that means we have to write them, so leaving for now
switch(currentScene) {
case "finalDinner":
return 1;
Expand Down Expand Up @@ -114,6 +115,10 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
case "finalFaculty": //this should return epilogue eventually
return 0;
}
*/

return State.get("scenes").indexOf(currentScene)+1;

}


Expand Down Expand Up @@ -1126,7 +1131,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "undergradDean",
text : "<p>You've been having a somewhat rough time with your lectures. It looks like your superiors are starting to notice as Dean Smith has called you to come meet with him in private.</p><p>Choose what Emma says, but make sure to keep your cool or your job might be in jeoprardy!</p>"
text : "<p>You've been having a somewhat rough time with your lectures. It looks like your superiors are starting to notice as Dean Smith has called you to come meet with him in private.</p><p>Choose what Emma says, but make sure to keep your cool or your job might be in jeopardy!</p>"
},
{
id : "undergradTravel",
Expand Down Expand Up @@ -1174,7 +1179,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "finalDinner",
text : "<p>You are Emma Richards, a PhD student finishing up your degree on the effects of climate change.</p><p>Tomorrow, you'll be defending your thesis. Your friends have decided to throw a dinner party for you.</p><p>Choose what Emma says, but keep an eye on the task you're performing, too!</p>"
text : "<p>It's the year 2025. You are Emma Richards, a PhD student finishing up your degree on the effects of climate change.</p><p>Tomorrow, you'll be defending your thesis. Your friends have decided to throw a dinner party for you.</p><p>Choose what Emma says, but keep an eye on the task you're performing, too!</p>"
},
{
id : "finalLecture",
Expand All @@ -1198,22 +1203,33 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "finalBeach",
text : "<p>As years have passed, you've fought the good fight as best you can, locally. You've managed to keep the Oxbow Marshes designated as a wildlife refuge, and pushed for tighter regulations of the local paper mill. Sometimes it feels hopeless, given global events, but you've kept working. One day you have a memorable conversation with your co-worker about this very thing.</p>"
text : "<p>{ifState|failedLecture|true|As years have passed, you've fought the good fight as best you can, locally.|You took Mom's words to heart, and later on got involved with a local group helping with habitat remediation for crabs.}<p> You managed to keep the Oxbow Marshes designated as a wildlife refuge, and pushed for tighter regulations of the local paper mill. Sometimes it feels hopeless, given global events, but you've kept working. One day you have a memorable conversation with your co-worker about this very thing.</p>"
},
{
id : "finalFaculty",
text : "<p>TODO: Scene description</p>"
},
{
id : "deanOrTravel",
text : "this is the intro for dean or travel"
text : "{ifState|failedLecture|true|(<p>Well, that could have gone better.</p><p>Trouble is, things didn't get easier as you continued lecturing. Bad class feedback meant you had to meet with the Dean to discuss your 'pedagogical style'. He seemed sympathetic, and gave you a second chance.</p><p>As the years went on, however, you found yourself drifting more towards working with local groups to help remediate the growing environmental effects of the rising sea level. You were able to translate your expertise with {stateVar|areaOfExpertise|shrimp} to help with research on changing crab biomes.</p>)|<p>That lecture was the first of many in your budding career as an academic. It turns out you had a natural gift for education, and students flocked to your courses as the years progressed. You began giving talks and leading panels outside of academia, which were in high demand as various organizations and governments around the world struggled to cope with the effects of the changing climate on their people.</p>}"
},
{
id : "tempDinnerWithFam",
text : "this ithe dinner with fam intro"
text : "<p>It's six years later: 2032. Your parents decided to come visit you, and you took them out to a local restaurant: {ifState|failedLecture|true|their treat|your treat}. They hadn't changed much, although you noticed Mom had more gray hair than you remembered, and Dad had finally gotten glasses.</p><p>The conversation went well, though as usual they pushed you a bit on some of your life choices. {ifState|failedLecture|true|Sometimes you thought they didn't see the value of your activist work locally.|Mom gave you a bit of grief over your decision to teach people, rather than directly getting involved with local groups. She'd been volunteering a lot since retiring.}</p><p>All in all it was an enjoyable night!</p>"
},
{
id : "theEnd",
text : "<p>As the years progressed, you watched the world around you changing. Knowing that you'd had a hand, even in some small way, in how things turned out.</p><p>(Thanks for playing! You can hit 'refresh' on the browser window now)</p>"
}
]
var sceneText = sceneScreens.filter(function(v) { return v.id === id; })[0].text;

var lookup;
if (id.substring(0,6) == "intro:") { //if we're just using the intro as an interstitial scene, not actually running the scene...
lookup = id.substring(6,id.length);
}
else { lookup = id; }
var sceneText = sceneScreens.filter(function(v) { return v.id === lookup; })[0].text;
sceneText = Templates.render(sceneText);
Display.setSceneIntro(sceneText, id);
};

Expand Down
26 changes: 25 additions & 1 deletion StoryAssembler/data/knobs/beach.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@
{
"id": "coworkerOptimism_low",
"content": "\"I don't know, {name|protagonist},\" {name|volunteer} said. \"I mean, we've been pushing this project for what, five years? At what point do we admit we're just not making a difference?\"",
"choices" : [
{"gotoId" : "cheerUp"},
{"gotoId" : "differenceSmallOrBig"}
],
"effects" : [
"set showCoworkerOptimism true"
],
Expand All @@ -261,6 +265,26 @@
]
},

{
"id" : "cheerUp",
"choiceLabel" : "{ifState|protagonistOptimism|low|Well...uh...|Hey, cheer up!}",
"content" : "{ifState|protagonistOptimism|low|(\"I hear you. I mean, I'll admit I'm not feeling terribly optimistic about the future either. Sometimes it even keeps me up at night. But it doesn't help to be down about it. I mean we're doing something, so that counts for something? I guess?\"<br/><br/>{name|volunteer} looks extremely unconvinced.)|(\"Come on, {name|volunteer}! Stop being so doom and gloom! I mean, it's a job, right? So at the least we can be happy we're doing something for a 9 to 5. Could be worse?\"<br/><br/>{name|volunteer} looks extremely unconvinced.)}",
"conditions" : [
"coworkerOptimism eq low"
]
},
{
"id" : "differenceSmallOrBig",
"choiceLabel" : "But we are making a difference.",
"content" : "{ifState|protagonistOptimism|low|(\"I mean, it may not be a <i>big</i> difference,\" you say. \"Heck, even after the stuff I've done, it's hard sometimes to see if it matters. But the most important thing is that we're out here trying. Doing the best we can. Some days that's enough. So let's get back to work and see what we can do, huh?\"<br/><br/>{name|volunteer} nods. \"Yeah, I guess you're right. Thanks, {name|protagonist}.\")|(\"These things are all inter-connected. That's what makes climate change so challenging to study. We sometimes have trouble seeing the importance or scale of all the different aspects. You and I are doing good work out here. Trust me.\"<br/><br/>{name|volunteer} nods. \"Well, ok I suppose. I mean, that's why I signed up, right? Got tired of just sitting around doing nothing about it. Thanks, Emma.\")}",
"conditions" : [
"coworkerOptimism eq low"
],
"effects" : [
"set coworkerOptimism high"
]
},


{
"id": "coworkerOptimism_high",
Expand Down Expand Up @@ -359,7 +383,7 @@
"choiceLabel" : "Break the silence",
"content" : "After about half an hour of quietly working, you feel the need to hear another human voice. You clear your throat. {name|volunteer} looks up.",
"conditions" : [
// "effort gte 3"
//"effort gte 3"
],
"effects": [
"set expendEffort true"
Expand Down
Loading

0 comments on commit e542580

Please sign in to comment.