diff --git a/TODO b/TODO index 9985c2a..007abc5 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,8 @@ INTRO ACT I - more beebee art: animated point, less aggro, more sweet & defensive - re-animate cry so that lake tears falls in right place -- continuous shot, no glitch-stop (low prior) + +======================= ACT II - code: LOCKABLE MOUTHS @@ -27,16 +28,13 @@ ACT II - sound: judge gravel ACT III -- callback for act ii ending -- better roof bg -- better minor chars -- more hunter intro anim -- more hong intro anims -- hong char + anims -- bb char + anims -- hospital scenes +- BB special attack anim - sfx for endings -! more sympathetic Hunter +- 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" + +======================= ACT IV - hong char + anims diff --git a/scenes/act3.md b/scenes/act3.md index bfdede3..32d13f8 100644 --- a/scenes/act3.md +++ b/scenes/act3.md @@ -1,76 +1,206 @@ # act3 -`SceneSetup.act3();` +``` +SceneSetup.act3(); +Game.WORDS_HEIGHT_BOTTOM = 205; +``` r: Cheers! +(#act3_skip) + +``` +publish("act3",["roofhunter",1]); +publish("act3",["roofhong",1]); +``` + +(...1001) + +``` +publish("act3-alpha", ["dizzyhunter",1]); +publish("act3-alpha", ["dizzyhong",1]); +publish("act3",["roofhunter",3]); +publish("act3",["roofhong",3]); +``` + h2: *Ah* that hits the spot. +``` +publish("act3",["roofhunter",2]); +publish("act3",["roofhong",2]); +``` + r: You know, kid... +``` +publish("act3",["roofhunter",3]); +publish("act3",["roofhong",6]); +``` + h2: Specifically, the spots hit are my left and right amygdala. +``` +publish("act3",["roofhunter",8]); +publish("act3",["roofhong",5]); +``` + r: You remind me of myself when I was younger. Back when I was tormented by the animal in my head. +``` +publish("act3",["roofhunter",2]); +publish("act3",["roofhong",2]); +``` + r: Hey, quick question: truth or da-- +``` +publish("act3",["roofhunter",3]); +publish("act3",["roofhong",7]); +publish("act3-alpha", ["dizzyhong",0]); +``` + h2: DARE! +``` +publish("act3-alpha", ["dizzyhong",1]); +publish("act3",["roofhunter",10]); +publish("act3",["roofhong",2]); +``` + r: Haha! Good. +``` +publish("act3",["roofhunter",21]); +publish("act3",["roofhong",4]); +``` + r: Ok. You see that baby-blue swimming pool down there? ``` -publish('hong-next'); -publish("hunter-roof", ["front_badass"]); +publish("act3-alpha", ["dizzyhong",0]); +publish("act3",["roofhunter",11]); +publish("act3",["roofhong",9]); ``` +h2: Yeah? Six floors down? -h2: Yeah? Ten floors down? +``` +publish("act3",["roofhunter",10]); +publish("act3",["roofhong",8]); +``` r: Jump in. -`publish('hong-next')` +``` +publish("act3",["roofhunter",11]); +publish("act3",["roofhong",10]); +``` h2: ... +``` +publish("act3",["roofhong",11]); +``` + h2: Wait, what? +``` +publish("act3",["roofhong",10]); +publish("act3",["roofhunter",2]); +``` + r: The animal's started whining, hasn't it? +``` +publish("act3",["roofhunter",23]); +``` + r: *Oh nooooo it's dangerous, don't do iiiiit.* -r: But that's exactly why we must do thrilling, death-defying stunts! Party hard! Carpe diem! Snort coke off a hooker's ass, #YOLO! +``` +publish("act3",["roofhunter",22]); +``` + +r: But that's exactly why we need death-defying thrills! Party hard! Carpe diem! Snort coke off a hooker's ass, #YOLO! + +``` +publish("act3",["roofhunter",10]); +``` r: Let's show that animal we don't give two *dicks* about its bitching! Jump in. +``` +publish("act3",["roofhunter",11]); +publish("act3",["roofhong",13]); +``` + h2: Uh, but sometimes, um... fear has a point... ``` +publish("act3",["roofhunter",5]); +publish("act3",["roofhong",12]); music(null, {fade:2}); -publish("hunter-roof", ["front_pissed"]); ``` r: ... +``` +publish("act3-alpha", ["dizzyhunter",0]); +publish("act3",["roofhunter",6]); +publish("act3",["dd",1]); +``` + r: I'm sorry, did you fall for that McMindfulness fad that claims feeling bad is *good?* +``` +publish("act3",["roofhunter",17]); +``` + r: Pleasure is the opposite of pain. There-fucking-fore, you can use pleasure to fight pain! +``` +publish("act3",["roofhunter",18]); +``` + r: How do those Silicon Valley pseudo-Buddhists not see this shit?! +``` +publish("act3",["roofhunter",6]); +``` + r: Kid, I know that *you* know that animal *hurts* people like us. It *tortures* people like us. +``` +publish("act3",["roofhunter",19]); +``` + r: It's not our friend. It's a rabid beast, which either needs to be *tranquilized*, +``` +publish("act3",["roofhunter",20]); +``` + r: Or have a *bullet put in its fucking skull*. +``` +publish("act3",["roofhunter",27]); +``` + r: Otherwise, you're going to let it win. +``` +publish("act3",["roofhunter",31]); +publish("act3",["roofhong",14]); +publish("act3",["dd",2]); +``` + h2: No. You're wrong. +# act3_skip + ``` -publish('hong-next'); +publish("act3",["roofhunter",13]); +publish("act3",["roofhong",15]); music('battle_dark', {volume:1.0}, function(){ music('battle_dark_loop'); }); @@ -78,7 +208,12 @@ music('battle_dark', {volume:1.0}, function(){ h2: I'm not going to let it win. -`publish("hunter-roof", ["front_badass"]);` +``` +publish("act3",["roofhunter",25]); +publish("act3-alpha", ["roofhong",0]); +publish("act3-alpha", ["transition",1]); +publish("act3",["dd",6]); +``` r: Fuck yeah! I believe in you, babe! Kill it! <3 @@ -91,6 +226,7 @@ r: Fuck yeah! I believe in you, babe! Kill it! <3 ``` Game.clearText(); publish("act3-out"); +Game.WORDS_HEIGHT_BOTTOM = -1; /* reset */ ``` (...1500) @@ -200,7 +336,7 @@ h: Some people throw themselves into other people. h: I'm going to throw myself into that swimming pool. -[You're drunk and it's TEN FLOORS DOWN](#act3_bad_1_harm) +[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) diff --git a/scripts/act3/Act3_BG.js b/scripts/act3/Act3_BG.js index 45dec92..ddd5eb8 100644 --- a/scripts/act3/Act3_BG.js +++ b/scripts/act3/Act3_BG.js @@ -5,6 +5,7 @@ Loader.addImages([ { id:"rooftop_dd", src:"sprites/act3/dd.png" }, { id:"dizzy", src:"sprites/act3/dizzy.png" }, { id:"hospital", src:"sprites/act3/hospital.png" }, + { id:"transition", src:"sprites/act3/transition.png" }, ]); Loader.addSounds([ @@ -48,6 +49,12 @@ function BG_Rooftop(){ frame:{ width:240, height:120 }, y: 300 }); + self.transition = new Sprite({ + image: Library.images.transition, + grid:{ width:8, height:1 }, + frame:{ width:720, height:400 }, + y: 258 + }); var DizzySpriteConfig = { image: Library.images.dizzy, grid:{ width:4, height:2 }, @@ -91,6 +98,7 @@ function BG_Rooftop(){ self.roofhong, self.anxiety, + self.transition, self.hong, self.beebee, @@ -109,6 +117,7 @@ function BG_Rooftop(){ 1.0, // roofhong 0.0, // anxiety + 1.0, // transition 0.0, // hong 0.0, // beebee @@ -117,7 +126,7 @@ function BG_Rooftop(){ 0, // bg 0, // skyline - 0, // clouds + 80, // clouds 0, // roof 0, // roofhunter @@ -127,6 +136,7 @@ function BG_Rooftop(){ 0, // roofhong 0, // anxiety + 191, // transition 0, // hong 0, // beebee @@ -140,11 +150,12 @@ function BG_Rooftop(){ 1, // roofhunter 1, // dd - 1, // dizzyhunter - 1, // dizzyhong + 0, // dizzyhunter + 0, // dizzyhong 1, // roofhong 0, // anxiety + 0, // transition 0, // hong 0, // beebee @@ -154,6 +165,7 @@ function BG_Rooftop(){ var parallax = 0; var parallaxTicker = 0; var PARALLAXING = null; + var MAGIC_NUMBER = 191; var ticker = 0; self.update = function(){ @@ -172,10 +184,10 @@ function BG_Rooftop(){ // 0 to -180 in one second, smoothed var t = Math.cos(parallaxTicker*Math.TAU/2); // 1 to -1 t = (1-t)/2; // 0 to 1 - parallax = -t*190; + parallax = -t*MAGIC_NUMBER; // Anxiety Alpha - //ALPHAS[2] = t; + ALPHAS[9] = t; // DONE if(t==1 || t==0){ @@ -193,6 +205,9 @@ function BG_Rooftop(){ } + // BYE CLOUDS + OFFSETS[2] -= 3/60; + // SUPER HACKY - ANIMATE THE DIZZIES ticker += 1/60; var fps = 4; @@ -201,15 +216,40 @@ function BG_Rooftop(){ var frame = Math.round(ticker*fps) % 4 + 4; // fps times a second self.dizzyhong.gotoFrame(frame); - // Anxiety BG - /*if(ALPHAS[2]>0){ - self.anxiety.update(ALPHAS[2]); - if(ALPHAS[2]==1){ // if fully visible... - ALPHAS[0] = 0; // hide everything under - }else{ - ALPHAS[0] = 1; // show everything under + // ANIMATE HUNTER + if(self.roofhunter.currentFrame==23 || self.roofhunter.currentFrame==24){ + self.roofhunter._hack_timer = (self.roofhunter._hack_timer===undefined) ? 0 : self.roofhunter._hack_timer; + self.roofhunter._hack_timer += 1/60; + if(self.roofhunter._hack_timer>1/24){ // 24 times a second + if(self.roofhunter.currentFrame==23){ + self.roofhunter.gotoFrame(24); + }else{ + self.roofhunter.gotoFrame(23); + } + self.roofhunter._hack_timer = 0; } - }*/ + } + + // ANIMATE HONG + 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; + if(self.transition._hack_timer>1/15){ // 15fps + self.transition._hack_timer = 0; + if(self.transition.currentFrame<7){ + self.transition.nextFrame(); + }else{ + publish("act3-alpha", ["transition", 0]); + publish("act3-alpha", ["hong", 1]); + publish("act3-alpha", ["beebee", 1]); + } + } + } + + // Anxiety BG + if(ALPHAS[9]>0){ + self.anxiety.update(ALPHAS[9]); + } }; @@ -241,10 +281,30 @@ function BG_Rooftop(){ var STAGE = 0; var _subscriptions = []; _subscriptions.push( + + subscribe("act3", function(thing, frame){ + if(typeof frame=="string"){ + if(frame=="next"){ + self[thing].nextFrame(); + }else{ + self[thing].gotoFrameByName(frame); + } + }else{ + self[thing].gotoFrame(frame); + } + }), + subscribe("act3-alpha", function(thing, alpha){ + var index = self.layers.indexOf(self[thing]); + ALPHAS[index] = alpha; + }), + subscribe("act3-out", function(){ STAGE = 1; PARALLAXING = "out"; sfx("whoosh"); // WHOOSH + setTimeout(function(){ + self.transition.gotoFrame(1); + },400); }), subscribe("act3-in", function(){ diff --git a/scripts/game/Game.js b/scripts/game/Game.js index f805b78..9fa2715 100644 --- a/scripts/game/Game.js +++ b/scripts/game/Game.js @@ -277,11 +277,13 @@ Game.immediatePromise = function(){ // Move the text DOM to latest Game.FORCE_TEXT_Y = -1; +Game.WORDS_HEIGHT_BOTTOM = 250; Game.updateText = function(instant){ + if(Game.WORDS_HEIGHT_BOTTOM<0) Game.WORDS_HEIGHT_BOTTOM=250; // back to default if(Game.FORCE_TEXT_Y<0){ var wordsHeight = 80 + Game.wordsDOM.getBoundingClientRect().height; var currentY = parseFloat(Game.wordsDOM.style.top) || 80; - var gotoY = (wordsHeight<250) ? 0 : wordsHeight-250; + var gotoY = (wordsHeight