diff --git a/TODO b/TODO index 007abc5..5db714c 100644 --- a/TODO +++ b/TODO @@ -30,13 +30,18 @@ ACT II ACT III - BB special attack anim - sfx for endings +- bb: "surface tension" - hunter, hand on heart "hurts people like us" - hunter, angry lookaway "otherwise, you're gonna let it win" - hong, angry AFTER "not gonna let it win" +- o_o for hunter instead +- shaking ambulance +- ALL NEW SFX ======================= ACT IV +- (say auto-saved) - hong char + anims - bb char + anims - more al/shire diff --git a/index.html b/index.html index a6e7776..3a1be82 100644 --- a/index.html +++ b/index.html @@ -260,7 +260,7 @@ - + diff --git a/scenes/act3.md b/scenes/act3.md index 32d13f8..60d9fcb 100644 --- a/scenes/act3.md +++ b/scenes/act3.md @@ -7,8 +7,6 @@ Game.WORDS_HEIGHT_BOTTOM = 205; r: Cheers! -(#act3_skip) - ``` publish("act3",["roofhunter",1]); publish("act3",["roofhong",1]); @@ -196,8 +194,6 @@ publish("act3",["dd",2]); h2: No. You're wrong. -# act3_skip - ``` publish("act3",["roofhunter",13]); publish("act3",["roofhong",15]); @@ -227,6 +223,7 @@ r: Fuck yeah! I believe in you, babe! Kill it! <3 Game.clearText(); publish("act3-out"); Game.WORDS_HEIGHT_BOTTOM = -1; /* reset */ +_.act3_bb_body = 1; ``` (...1500) @@ -243,11 +240,18 @@ b: NO NO NO NO NO NO NO NO NO NO NO NO NO NO n: CHOOSE WISELY. PROTECT YOUR HUMAN +`bb({ eyes:"oh_crap", mouth:"normal_talk", MOUTH_LOCK:true });` + b: AAAAAAAAAAAAAAAAAA +`bb({ mouth:"normal" });` + n: GOOD LUCK -`Game.clearText();` +``` +Game.clearText(); +bb({ eyes:"start" }); +``` [Human, you could actually DIE here!](#act3a_harm) `Game.OVERRIDE_CHOICE_LINE=true` @@ -257,18 +261,24 @@ n: GOOD LUCK # act3a_harm +`bb({ MOUTH_LOCK:true, mouth:"normal_talk" });` + b: H-- (#act3a_after) # act3a_alone +`bb({ MOUTH_LOCK:true, mouth:"normal_talk" });` + b: T-- (#act3a_after) # act3a_bad +`bb({ MOUTH_LOCK:true, mouth:"normal_talk" });` + b: T-- (#act3a_after) @@ -279,19 +289,24 @@ b: T-- hong({body:"drink"}); bb({body:"attacked"}); attackBB("32p"); +_.act3_bb_body++; ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"scared"}); +hong({ body:"normal" }); +bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" }); ``` h: You know, I might've believed you... if you hadn't tried that a zillion times before. h: You're the wolf who cried wolf. +``` +bb({ eyes:"sad" }); +``` + `Game.OVERRIDE_CHOICE_SPEAKER = "fear_harm"` [](#act3_fork) `_.SPECIAL_ATTACK="harm"; Game.OVERRIDE_CHOICE_LINE=true` @@ -311,40 +326,51 @@ h: You're the wolf who cried wolf. hong({body:"drink"}); bb({body:"attacked"}); attackBB("32p"); +_.act3_bb_body++; ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"scared"}); +hong({ body:"normal" }); +bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" }); ``` h: You already tried that too. b: human, please... +`hong({ eyes:"look_right" });` + h: Oh I'm *sorry* Big Pharma doesn't approve of my self-medication. h: Look asshole, we *all* have a way of shutting you the fuck up. +`hong({ body:"look_up", eyes:"look_up" });` + h: Some people throw themselves into work. +`hong({ body:"look_down", eyes:"look_down" });` + h: Some people throw themselves into sex, drugs, and refreshing their Facebook feed. +`hong({ body:"normal", eyes:"look_right" });` + h: Some people throw themselves into other people. +`hong({ eyes:"angry" });` + h: I'm going to throw myself into that swimming pool. [You're drunk and it's SIX FLOORS DOWN](#act3_bad_1_harm) -[Dang it, this is the thanks I get?!](#act3_bad_1_insult) +[Dang it, this is the thanks I get?!](#act3_bad_1_insult) `bb({eyes:"angry"});` -[Okay, I admit it. I messed up.](#act3_good_1) `bb({body:"sad"})` +[Okay, I admit it. I messed up.](#act3_good_1) `bb({mouth:"sorry", eyes:"sorry_down"});` # act3_bad_1_harm -b: Even if you somehow land *in* the water, you'll still smash into the bottom of the pool and break your bones! +b: Even if you land in the water, the surface tension will crack your ribs and give you a concussion *at the least!* h: Eh. @@ -352,23 +378,28 @@ h: Eh. hong({body:"drink"}); bb({body:"attacked"}); attackBB("32p"); +_.act3_bb_body++; ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"scared"}); +hong({ body:"normal", mouth:"angry", eyes:"angry" }); +bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" }); ``` -h: I think I saw a Russian guy do this on YouTube once. +h: I saw a Russian guy do this on YouTube once. (#act3_bad_2) # act3_bad_1_insult +`hong({ eyes:"look_right" });` + h: I- Excuse me, the *thanks?* +`bb({ eyes:"angry" });` + b: This is exactly why I *exist!* Because humans can't be trusted to protect themselves! b: I've been trying to protect your stupid butt all my life and now you're just going t-- @@ -377,34 +408,50 @@ b: I've been trying to protect your stupid butt all my life and now you're just hong({body:"drink"}); bb({body:"attacked"}); attackBB("32p"); +_.act3_bb_body++; ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"scared"}); +hong({ body:"normal", mouth:"angry", eyes:"angry" }); +bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" }); ``` (#act3_bad_2) # act3_good_1 +`hong({ body:"laugh_1" })`` + h: heh. +`hong({ body:"laugh_2" })`` + h: hahahaha +`hong({ body:"laugh_3" })`` + h: HAHAHAHAHAHA +``` +bb({ eyes:"sorry"}); +hong({ body:"yell_1", mouth:"yell", eyes:"blank" }); +``` + h: Oh WOW is that the biggest *fucking* understatement of the century! +`hong({ body:"yell_2" });` + h: Yeah, you rotting pile of blood-coated shit! You messed the fuck up! +`hong({ body:"normal", mouth:"angry", eyes:"angry" });` + h: Any other remarks, Captain Obvious? -[But revenge on me isn't the answer!](#act3_good_1_fail_revenge) `bb({body:"scared"})` +[But revenge on me isn't the answer!](#act3_good_1_fail_revenge) `bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" });` -[But this time I'm *actually* right!](#act3_good_1_fail_harm) `bb({body:"scared"})` +[But this time I'm *actually* right!](#act3_good_1_fail_harm) `bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" });` [I've hurt you.](#act3_good_2a) @@ -417,13 +464,14 @@ b: You need to have a healthier relationship with your emotions, rather than dro hong({body:"drink"}); bb({body:"attacked"}); attackBB("32p"); +_.act3_bb_body++; ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"scared"}); +hong({ body:"normal", mouth:"angry", eyes:"angry" }); +bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" }); ``` (#act3_bad_2) @@ -438,13 +486,14 @@ b: So please, put the bottle down and let's-- hong({body:"drink"}); bb({body:"attacked"}); attackBB("32p"); +_.act3_bb_body++; ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"scared"}); +hong({ body:"normal", mouth:"angry", eyes:"angry" }); +bb({ body:"normal_"+_.act3_bb_body, mouth:"normal", eyes:"normal" }); ``` (#act3_bad_2) @@ -454,27 +503,40 @@ bb({body:"scared"}); # act3_bad_2 +`bb({ eyes:"sad" });` + b: please... don't... h: Your energy bar's looking awfully low there, wolf. h: If I were you, I'd choose your next words very carefully. -[Fine. I'm done protecting you.](#act3_bad_2_jump) +`bb({ eyes:"normal" });` + +[Fine. I'm done protecting you.](#act3_bad_2_jump) `bb({ mouth:"ignore", eyes:"ignore" });` [I was right all along.](#act3_bad_2_right) -[I'm sorry.](#act3_good_2b) `bb({body:"sad"})` +[I'm sorry.](#act3_good_2b) `bb({mouth:"sorry", eyes:"sorry_down"});` # act3_bad_2_jump b: So, go ahead and jump. See what I care. +`hong({ eyes:"look_right", mouth:"normal", MOUTH_LOCK:true });` + h: ... +``` +hong({ eyes:"less_angry", mouth:"normal" }); +bb({ eyes:"ignore_oh_crap" }); +``` + h: Okay then. Bottoms up. +`bb({ mouth:"normal", eyes:"oh_crap" });` + b: WAIT NO THAT WAS REVERSE PSYCHOLOGY YOU WERE SUPPOSED TO DO THE *OPPOSITE* OF WHAT I SA-- (#act3_bad_3) @@ -483,20 +545,28 @@ b: WAIT NO THAT WAS REVERSE PSYCHOLOGY YOU WERE SUPPOSED TO DO THE *OPPOSITE* OF # act3_bad_2_right +`bb({ eyes:"angry" });` + b: You *are* putting yourself in danger. Your so-called friends *are* using you. And *you* are using your so-called friends. +`bb({ eyes:"sad" });` + b: So please, human... why don't you believe me?! -h: Because you don't believe in *me*. +h: Because you never believed in *me*. (#act3_bad_3) # act3_bad_2_terrible -b: Other guard-wolves have humans who actually take time to patiently train them, to learn to work together, +`bb({ eyes:"angry" });` -b: Rather than hate the guard-wolves for trying to protect them! So why couldn't you jus-- +b: Other guard-wolves have humans who actually take time to patiently train them, to *learn* to work together, + +b: Rather than hate the guard-wolves for trying to protect them! So why can't you jus-- + +`bb({ eyes:"normal" });` h: Wrong fucking answer. @@ -510,28 +580,37 @@ h: Wrong fucking answer. music(null); hong({body:"drink"}); bb({body:"attacked"}); +publish("bb_STOP_VIBRATING"); attackBB("100p"); ``` (...2000) ``` -hong({body:"angry"}); -bb({body:"dead"}); +hong({ body:"normal", mouth:"normal", eyes:"normal" }); +bb({ body:"dead" }); ``` (...999) h: *"The only thing to fear is fear itself."* +`hong({ body:"look_up", mouth:"happy", eyes:"blank" });` + h: *"Don't worry, be happy!"* +`hong({ body:"normal", mouth:"normal", eyes:"normal" });` + h: All the wise folk of our time agree: negative emotions are *bad!* +`hong({ eyes:"less_angry" });` + h: Duh! That's why they're called *negative!* b: human... please... +`hong({ eyes:"normal" });` + h: A while back, I said: “I just want to be free from all this pain.” h: I got my wish. I no longer feel pain, or fear, or anxiety... @@ -546,12 +625,23 @@ h: I don't feel anything at all. # act3_good_2a +`bb({mouth:"sorry", eyes:"sorry_down"});` + b: I was so obsessed with making sure nothing else hurt you, that I didn't realize *I* was creating the hurt. +``` +bb({ eyes:"sorry"}); +hong({ body:"yell_2", mouth:"yell", eyes:"blank" }); +``` + h: NO. SHIT. +`hong({ body:"yell_1" });` + h: GODDAMN. It really took you this long to finally figure it out?! +`hong({ body:"cry", mouth:"cry", eyes:"blank" });` + h: You could've saved us so much trouble, you big fluffy dumbass. Why didn't you realize this sooner?... `_.apologized_for_hurt = true;` @@ -562,8 +652,12 @@ h: You could've saved us so much trouble, you big fluffy dumbass. Why didn't you # act3_good_2b +`hong({ body:"normal", mouth:"angry", eyes:"look_right" });` + h: ...you're *sorry.* +`hong({ eyes:"angry", MOUTH_LOCK:true });` + h: ... h: Sorry for *what*? @@ -573,6 +667,8 @@ h: Sorry for *what*? # act3_good_2q +`bb({mouth:"sorry", eyes:"sorry"});` + {{if _.apologized_for_hurt}} (#act3_good_2q_already_apologized) {{/if}} @@ -584,6 +680,8 @@ h: Sorry for *what*? # act3_good_2q_already_apologized +`hong({ body:"normal", mouth:"angry", eyes:"less_angry" });` + [I'm sorry I wasn't a good protector.](#act3_good_3_protector) [I'm sorry I didn't respect you.](#act3_good_3_respect) @@ -593,7 +691,9 @@ h: Sorry for *what*? # act3_good_2q_not_already_apologized -[I'm sorry I have a terrible human!](#act3_bad_2_terrible) `bb({body:"scared"})` +`hong({ body:"normal", mouth:"angry", eyes:"angry" }, 0);` + +[I'm sorry I have a terrible human!](#act3_bad_2_terrible) `bb({mouth:"normal", eyes:"normal"})` [I'm sorry I didn't respect you.](#act3_good_3_respect) @@ -603,12 +703,20 @@ h: Sorry for *what*? # act3_good_3_protector +`bb({eyes:"sorry_down"});` + b: It's my duty to warn you against *real* danger, but I kept barking at cars and the mailman. +`bb({eyes:"sorry_up"});` + b: Barking at shadows. Barking so much. +`bb({eyes:"sorry"});` + b: It only makes sense that you'd want to muzzle me. +`bb({eyes:"sorry_down"});` + b: I'm sorry. (#act3_good_4) @@ -617,9 +725,15 @@ b: I'm sorry. # act3_good_3_respect +`bb({eyes:"sorry_down"});` + b: I was supposed to be *your* loyal guard-dog, but I acted as if you were supposed to obey *me*. -b: There's a difference between protector and prison warden, and I crossed the line. +`bb({eyes:"sorry_up"});` + +b: There's a difference between a protector and a prison warden, and I crossed the line. + +`bb({eyes:"sorry_down"});` b: I'm sorry. @@ -629,10 +743,16 @@ b: I'm sorry. # act3_good_3_hurt +`bb({eyes:"sorry_down"});` + b: I was so obsessed with trying to protect you from being hurt, I never stopped to realize *I* was hurting you. +`bb({eyes:"sorry_up"});` + b: I was a bad dog. +`bb({eyes:"sorry_down"});` + b: I'm sorry. (#act3_good_4) @@ -641,13 +761,14 @@ b: I'm sorry. # act3_good_4 ``` -music(null,{fade:5}); +music(null,{fade:3}); +hong({ eyes:"less_angry", MOUTH_LOCK:true },0); ``` h: ... ``` -hong({body:"stop"}); +hong({ body:"stop", mouth:"stop", eyes:"blank" }); ``` h: Yeah, well, this was a dumb idea anyway. @@ -656,6 +777,11 @@ h: I only did this to fuck you up, and, well, I fucked you up. h: Let's just call this round a tie, okay? +``` +bb({ mouth:"sorry", eyes:"sorry" }); +bb({ MOUTH_LOCK:true }); +``` + b: ... b: Okay. @@ -702,11 +828,23 @@ Game.FORCE_CANT_SKIP = true; ``` publish("start-walkaway-anim"); +Game.WORDS_HEIGHT_BOTTOM = 205; ``` -(...2001) +(...3501) -`publish('hong-next')` +``` +publish('hong-next'); +publish("act3",["roofhunter",7]); +``` + +(...667) + +``` +publish("act3",["dd",4]); +publish("act3",["roofhunter",26]); +publish('hong-next'); +``` (...667) @@ -714,20 +852,20 @@ publish("start-walkaway-anim"); (...667) -`publish('hong-next')` - -(...667) - -`publish('hong-next')` +``` +publish('hong-next'); +publish("act3",["roofhunter",27]); +``` `Game.FORCE_CANT_SKIP = false;` -r: Oh *come on*. After all that, you're just walking away? +r: Oh *come on*. After all that, you're just *giving up* the fight? r: What's the matter, kid? Are you *scared?* ``` publish('hong-next'); +publish("act3",["roofhunter",26]); ``` h2: Yes. @@ -761,7 +899,11 @@ Game.FORCE_CANT_SKIP = true; (...1333) -`publish('hong-next')` +``` +publish('hong-next'); +publish("act3",["dd",5]); +publish("act3",["roofhunter",31]); +``` (...667) @@ -781,15 +923,21 @@ Game.FORCE_CANT_SKIP = true; publish('hong-next'); Game.FORCE_CANT_SKIP = false; sfx("lock_door"); +publish("act3",["roofhunter",32]); ``` (...2001) +``` +publish("act3",["roofhunter",33]); +``` + r: Did they just lock the door? ``` Game.clearAll(); _.INJURED = false; +Game.WORDS_HEIGHT_BOTTOM = -1; ``` (...2000) @@ -801,7 +949,10 @@ _.INJURED = false; # act3_jump -`publish("start-jump-anim");` +``` +publish("start-jump-anim"); +Game.FORCE_TEXT_Y = 300; +``` (...2001) @@ -809,15 +960,49 @@ _.INJURED = false; (...833) -`publish('hong-next')` +``` +publish('hong-next'); +publish("act3",["dd",4]); +publish("act3",["roofhunter",28]); +``` +(...125) -(...501) +`publish("act3",["roofhunter",29]);` -`publish('hong-next')` +(...125) -(...501) +`publish("act3",["roofhunter",28]);` -`publish('hong-next')` +(...125) + +`publish("act3",["roofhunter",29]);` + +(...125) + +``` +publish('hong-next'); +publish("act3",["roofhunter",28]); +``` + +(...125) + +`publish("act3",["roofhunter",29]);` + +(...125) + +`publish("act3",["roofhunter",28]);` + +(...125) + +`publish("act3",["roofhunter",29]);` + +(...125) + +``` +publish('hong-next'); +publish("act3",["dd",5]); +publish("act3",["roofhunter",34]); +``` (...1167) @@ -829,12 +1014,12 @@ _.INJURED = false; b: no... -`publish('hong-next')` - (...501) `Game.clearText();` +`publish('hong-next')` + (...1333) `publish('hong-next')` @@ -857,11 +1042,11 @@ b: no no no (...501) -`publish('hong-next')` - -(...167) - -`publish('hong-next')` +``` +publish('hong-next'); +publish("act3",["dd",4]); +publish("act3",["roofhunter",30]); +``` (...167) @@ -871,7 +1056,16 @@ b: no no no ``` publish('hong-next'); -publish("hunter-roof", ["front_shock"]); +publish("act3",["dd",2]); +publish("act3",["roofhunter",15]); +``` + +(...167) + +``` +publish('hong-next'); +publish("act3",["dd",3]); +publish("act3",["roofhunter",16]); ``` (...833) @@ -884,13 +1078,19 @@ publish("hunter-roof", ["front_shock"]); (...167) -`publish('hong-next')` +``` +publish('hong-next'); +Game.FORCE_TEXT_Y = 325; +Game.OVERRIDE_FONT_SIZE = 50; +``` b: NO! (...400) ``` +Game.WORDS_HEIGHT_BOTTOM = -1; +Game.FORCE_TEXT_Y = -1; Game.clearText(); publish("act4-injury-show"); ``` diff --git a/scenes/intro.md b/scenes/intro.md index e4edb9f..169217e 100644 --- a/scenes/intro.md +++ b/scenes/intro.md @@ -4,7 +4,7 @@ # intro-play-button -`Game.HACK_MAKE_THE_LINE_BIG=true;` +`Game.OVERRIDE_FONT_SIZE=30;` [
PLAY!
](#intro-start) `publish("intro-to-game-1"); Game.OVERRIDE_CHOICE_LINE=true;` diff --git a/scripts/act3/Act3_BG.js b/scripts/act3/Act3_BG.js index ddd5eb8..0ea9136 100644 --- a/scripts/act3/Act3_BG.js +++ b/scripts/act3/Act3_BG.js @@ -194,19 +194,32 @@ function BG_Rooftop(){ PARALLAXING = null; // Stage 1 transition end - /*if(STAGE==1){ - ALPHAS[1] = 0; // HIDE Hunter - ALPHAS[3] = 0; // HIDE Old Hong - ALPHAS[4] = 1; // SHOW new hong - ALPHAS[5] = 1; // SHOW Beebee - }*/ + if(STAGE==1){ + ALPHAS.forEach(function(val, index){ + if(index<9) ALPHAS[index]=0; + }); + } + if(STAGE==2){ + ALPHAS[11] = 0; // HIDE battle Hong + ALPHAS[12] = 0; // HIDE battle Beebee + + // Transition BB in + if(_.a3_ending=="walkaway"){ + setTimeout(function(){ + self.roofhong.nextFrame(); + },800); + } + + } } } // BYE CLOUDS - OFFSETS[2] -= 3/60; + if(ALPHAS[9]!=1){ // unless anxiety BG + OFFSETS[2] -= 3/60; + } // SUPER HACKY - ANIMATE THE DIZZIES ticker += 1/60; @@ -230,7 +243,7 @@ function BG_Rooftop(){ } } - // ANIMATE HONG + // ANIMATE TRANSITION if(self.transition.currentFrame>0){ self.transition._hack_timer = (self.transition._hack_timer===undefined) ? 0 : self.transition._hack_timer; self.transition._hack_timer += 1/60; @@ -238,7 +251,8 @@ function BG_Rooftop(){ self.transition._hack_timer = 0; if(self.transition.currentFrame<7){ self.transition.nextFrame(); - }else{ + }else if(!self.transition._HACK_DONE_FOREVER){ + self.transition._HACK_DONE_FOREVER = true; publish("act3-alpha", ["transition", 0]); publish("act3-alpha", ["hong", 1]); publish("act3-alpha", ["beebee", 1]); @@ -246,6 +260,17 @@ function BG_Rooftop(){ } } + // ANIMATE HONG + var h = self.roofhong; + if(h.currentFrame>=36 && h.currentFrame<43){ + h._hack_timer = (h._hack_timer===undefined) ? 0 : h._hack_timer; + h._hack_timer += 1/60; + if(h._hack_timer>1/15){ // 15fps + h._hack_timer = 0; + h.nextFrame(); + } + } + // Anxiety BG if(ALPHAS[9]>0){ self.anxiety.update(ALPHAS[9]); @@ -308,13 +333,19 @@ function BG_Rooftop(){ }), subscribe("act3-in", function(){ - // SHOW ACTION, HIDE CHARS - /* - ALPHAS[1] = 1; // SHOW Hunter - ALPHAS[3] = 1; // SHOW Roof Hong - ALPHAS[4] = 0; // HIDE battle Hong - ALPHAS[5] = 0; // HIDE battle Beebee - */ + // WEIRD PARALLAXIN' TIME + self.hong.ALLOW_PARALLAX = true; + self.beebee.ALLOW_PARALLAX = true; + PARALLAXES[11] = 1.0; // battle hong + PARALLAXES[12] = 1.27; // battle bb + OFFSETS[11] = MAGIC_NUMBER*PARALLAXES[11]; // battle hong + OFFSETS[12] = MAGIC_NUMBER*PARALLAXES[12]; // battle bb + + // SHOW EVERYTHING BELOW ANXIETY BG + ALPHAS.forEach(function(val, index){ + if(index<9) ALPHAS[index]=1; + }); + ALPHAS[6] = ALPHAS[7] = 0; // Except dizzy // WHOOSH STAGE = 2; @@ -323,24 +354,20 @@ function BG_Rooftop(){ }), - // HUNTER FRAME - subscribe("hunter-roof", function(frameName){ - self.hunterSprite.gotoFrameByName(frameName); - }), - - // JUMP OFF + // JUMP OFF / WALK AWAY subscribe("start-jump-anim", function(){ - self.hongSprite.gotoFrame(4); - self.hunterSprite.gotoFrameByName("front_badass"); + self.dd.gotoFrame(2); + self.roofhunter.gotoFrame(15); + self.roofhong.gotoFrame(16); + }), + subscribe("start-walkaway-anim", function(){ + self.dd.gotoFrame(2); + self.roofhunter.gotoFrame(5); + self.roofhong.gotoFrame(35); }), subscribe("hong-next", function(){ - self.hongSprite.nextFrame(); - }), - - // WALK AWAY - subscribe("start-walkaway-anim", function(){ - self.hongSprite.gotoFrame(23); - self.hunterSprite.gotoFrameByName("side_neutral"); + //self.hongSprite.nextFrame(); + self.roofhong.nextFrame(); }), // INJURY diff --git a/scripts/act3/Act3_Beebee.js b/scripts/act3/Act3_Beebee.js index 23836ac..0c450fa 100644 --- a/scripts/act3/Act3_Beebee.js +++ b/scripts/act3/Act3_Beebee.js @@ -10,8 +10,8 @@ function Act3_Beebee(){ var spriteConfig = { image: Library.images.act3_bb, grid:{ - width: 4, - height: 2 + width: 8, + height: 3 }, frame:{ width: 720, @@ -19,15 +19,37 @@ function Act3_Beebee(){ }, anchor:{ x: 270, - y: 222 + y: 223 }, frameNames:[ - "body_scared*", - "body_sad*", + + "body_normal_1", + "body_normal_2", + "body_normal_3", + "body_normal_4", + "mouth_sorry", + "mouth_sorry_talk", + "eyes_sorry_down", + "eyes_sorry", + + "eyes_sorry_up", + "mouth_normal", + "mouth_normal_talk", + "eyes_oh_crap", + "eyes_start", + "eyes_normal", + "eyes_angry", + "eyes_sad", + + "mouth_ignore", + "mouth_ignore_talk", + "eyes_ignore", + "eyes_ignore_oh_crap", "body_attacked*", "body_dead*", - "eyes_blank", - "mouth_blank", + //"eyes_blank", // BLANK + //"mouth_blank", // BLANK + ], x: 270, y: 258+222-60 @@ -41,13 +63,19 @@ function Act3_Beebee(){ // Go To Frames! self.gotoFrames({ - body: "scared", - mouth: "blank", - eyes: "blank", + body: "normal_1", + mouth: "normal", + eyes: "start", }); var _subscriptions = []; _subscriptions.push( subscribe("bb", self.gotoFrames) ); _subscriptions.push( subscribe("attack_bb", self.showAttackedIcon) ); + _subscriptions.push( subscribe("DONE_SPEAKING", self.whenDoneSpeaking) ); + _subscriptions.push( + subscribe("bb_STOP_VIBRATING", function(){ + self.isVibrating = false; + }) + ); // Draw! Same as earlier except a lot of vibration var ticker = 0; @@ -55,11 +83,16 @@ function Act3_Beebee(){ self.characterSpeakerID = "b"; self.bounceHookes = 0.25; // loose self.bounceDamp = 0.9; // loose + self.isVibrating = true; self.draw = function(ctx){ // Vibration! ticker += 1/60; - self.characterSquash = 1 + Math.sin(ticker*Math.TAU*7)*0.01; // seven vibes per second + if(self.isVibrating){ + self.characterSquash = 1 + Math.sin(ticker*Math.TAU*7)*0.01; // seven vibes per second + }else{ + self.characterSquash = 1; + } // Old Draw _oldDraw.apply(self, arguments); diff --git a/scripts/act3/Act3_Hong.js b/scripts/act3/Act3_Hong.js index 99d4bf7..fe55595 100644 --- a/scripts/act3/Act3_Hong.js +++ b/scripts/act3/Act3_Hong.js @@ -10,8 +10,8 @@ function Act3_Hong(){ var spriteConfig = { image: Library.images.act3_hong, grid:{ - width: 4, - height: 1 + width: 8, + height: 4 }, frame:{ width: 720, @@ -19,15 +19,44 @@ function Act3_Hong(){ }, anchor:{ x: 59, - y: 180 + y: 181 }, frameNames:[ - "body_angry*", + + "body_normal", + "body_cry", + "mouth_cry", + "mouth_cry_talk", + "body_look_up", + "body_look_down", + "mouth_happy", + "eyes_normal", + + "eyes_look_right", + "eyes_angry", + "eyes_less_angry", + "eyes_look_up", + "eyes_look_down", + "mouth_angry", + "mouth_angry_talk", + "mouth_normal", + + "mouth_normal_talk", "body_drink*", - "body_stop*", - "body_foobar*", - "mouth_blank", - "eyes_blank", + "body_stop", + "mouth_stop", + "mouth_stop_talk", + "body_laugh_1*", + "body_laugh_2*", + "body_laugh_3*", + + "body_yell_1", + "body_yell_2", + "mouth_yell", + "mouth_yell_talk", + "mouth_blank", // BLANK + "eyes_blank", // BLANK + ], x: 59, y: 258+180 @@ -41,12 +70,13 @@ function Act3_Hong(){ // Go To Frames! self.gotoFrames({ - body: "angry", - mouth: "blank", - eyes: "blank", - }); + body: "normal", + mouth: "angry", + eyes: "angry", + },0); var _subscriptions = []; _subscriptions.push( subscribe("hong", self.gotoFrames) ); + _subscriptions.push( subscribe("DONE_SPEAKING", self.whenDoneSpeaking) ); //_subscriptions.push( subscribe("attack_hong", self.showAttackedIcon) ); // Draw diff --git a/scripts/game/Character.js b/scripts/game/Character.js index 92fdc68..73e0ca8 100644 --- a/scripts/game/Character.js +++ b/scripts/game/Character.js @@ -59,6 +59,10 @@ function Character(spriteConfig, animLoops){ self.bounceHookes = 0.2; self.bounceDamp = 0.8; self.characterFrames = {}; + self.MOUTH_LOCK = false; + self.whenDoneSpeaking = function(){ + self.MOUTH_LOCK = false; + }; self.gotoFrames = function(args, bounce){ // Bounce? @@ -98,6 +102,11 @@ function Character(spriteConfig, animLoops){ l.mouth.gotoFrameByName( "mouth_"+c.mouth ); l.eyes.gotoFrameByName( "eyes_"+c.eyes ); + // MOUTH LOCK? + if(args.MOUTH_LOCK){ + self.MOUTH_LOCK = l.mouth.currentFrameName; + } + }; // Draw @@ -144,17 +153,21 @@ function Character(spriteConfig, animLoops){ if(l.body.currentFrameName.indexOf("*")<0){ // Mouth - if(Game.WHO_IS_SPEAKING==self.characterSpeakerID){ - // If I'm talking, switch to a talking mouth! - var mouthTalkFrame = "mouth_"+c.mouth+"_talk"; - if( l.mouth.doesFrameNameExist(mouthTalkFrame) ){ - l.mouth.gotoFrameByName(mouthTalkFrame); - } + if(self.MOUTH_LOCK){ + l.mouth.gotoFrameByName(self.MOUTH_LOCK); }else{ - // If I'm not talking & my mouth is in the talk position, switch it back! - var isMyMouthTalking = (l.mouth.currentFrameName.indexOf("_talk")>=0); - if(isMyMouthTalking){ - l.mouth.gotoFrameByName( "mouth_"+c.mouth ); + if(Game.WHO_IS_SPEAKING==self.characterSpeakerID){ + // If I'm talking, switch to a talking mouth! + var mouthTalkFrame = "mouth_"+c.mouth+"_talk"; + if( l.mouth.doesFrameNameExist(mouthTalkFrame) ){ + l.mouth.gotoFrameByName(mouthTalkFrame); + } + }else{ + // If I'm not talking & my mouth is in the talk position, switch it back! + var isMyMouthTalking = (l.mouth.currentFrameName.indexOf("_talk")>=0); + if(isMyMouthTalking){ + l.mouth.gotoFrameByName( "mouth_"+c.mouth ); + } } } l.mouth.draw(ctx); diff --git a/scripts/game/Game.js b/scripts/game/Game.js index 9fa2715..1b1a909 100644 --- a/scripts/game/Game.js +++ b/scripts/game/Game.js @@ -339,6 +339,9 @@ Game.executeText = function(line){ Game.wordsDOM.appendChild(div); Game.WHO_IS_SPEAKING = speaker; // WHO'S SPEAKING?! Game.CURRENT_SPEAKING_SPEED = Game.OVERRIDE_TEXT_SPEED; + if(Game.OVERRIDE_FONT_SIZE){ + div.style.fontSize = Game.OVERRIDE_FONT_SIZE+"px"; + } switch(speaker){ case "b": div.className = "beebee-bubble"; @@ -595,6 +598,7 @@ Game.executeText = function(line){ // Return overrides to default Game.OVERRIDE_TEXT_SPEED = 1; + Game.OVERRIDE_FONT_SIZE = false; Game.FORCE_TEXT_DURATION = -1; Game.FORCE_NO_VOICE = false; @@ -610,6 +614,7 @@ Game.executeText = function(line){ // No one's speaking anymore. Game.setTimeout(function(){ Game.WHO_IS_SPEAKING = null; + publish("DONE_SPEAKING"); }, interval); // Show the clicky UI @@ -641,7 +646,7 @@ Loader.addSounds([ // Execute choice! Add it to choice DOM. Game.OVERRIDE_CHOICE_LINE = false; Game.OVERRIDE_CHOICE_SPEAKER = null; -Game.HACK_MAKE_THE_LINE_BIG = false; +Game.OVERRIDE_FONT_SIZE = false; Game.executeChoice = function(line){ var choiceText = line.match(/\[([^\]]*)\]/)[1].trim(); @@ -705,8 +710,8 @@ Game.executeChoice = function(line){ },10); // Or... FORCE - if(Game.HACK_MAKE_THE_LINE_BIG){ - div.style.fontSize = "30px"; + if(Game.OVERRIDE_FONT_SIZE){ + div.style.fontSize = Game.OVERRIDE_FONT_SIZE+"px"; }else{ // If it's too big, shrink font size @@ -731,7 +736,7 @@ Game.executeChoice = function(line){ },1); } - Game.HACK_MAKE_THE_LINE_BIG = false; + Game.OVERRIDE_FONT_SIZE = false; // Wait a bit before adding new line return new RSVP.Promise(function(resolve){ diff --git a/sprites/act3/fight_bb.png b/sprites/act3/fight_bb.png index fc3cb94..52fd03f 100644 Binary files a/sprites/act3/fight_bb.png and b/sprites/act3/fight_bb.png differ diff --git a/sprites/act3/hong.png b/sprites/act3/hong.png index 66474e1..1265694 100644 Binary files a/sprites/act3/hong.png and b/sprites/act3/hong.png differ