BUNCHA POLISH
This commit is contained in:
parent
78eed804c2
commit
0f00042824
16
index.html
16
index.html
|
@ -109,15 +109,15 @@
|
|||
</p>
|
||||
<p>
|
||||
But I've made this <i>for</i> folks with anxiety disorder, like myself.
|
||||
I hope it can help you see – with humor – how anxiety works & what it wants.
|
||||
And maybe, reduce the fear of fear itself.
|
||||
I hope it can help you see – with humor – how anxiety works.
|
||||
And, just maybe, reduce the fear of fear itself.
|
||||
</p>
|
||||
<p>
|
||||
There's also badly-drawn stick figures and a hyperactive wolf.
|
||||
Enjoy!
|
||||
</p>
|
||||
<p style="color:#999">
|
||||
other notes: alcohol abuse<span id="cn_cussing">, a @✩$!load of swearing</span>
|
||||
<p style="color:#999; font-size: 16px; line-height: 1.3em;">
|
||||
other notes: alcohol abuse, sexuality<span id="cn_cussing">, a @✩$!load of swearing</span>
|
||||
</p>
|
||||
<p>
|
||||
<a target="_blank" href="resources">mental health resources</a>
|
||||
|
@ -133,8 +133,13 @@
|
|||
<div id="about">
|
||||
<div id="about_words">
|
||||
|
||||
Blah blah blah
|
||||
[TODO TODO TODO]
|
||||
<br><br>
|
||||
Links to mental health resources,
|
||||
my games+Patreon,
|
||||
the musician+album
|
||||
|
||||
<!--
|
||||
<div class="about_padding">
|
||||
Help me keep making free games?
|
||||
</div>
|
||||
|
@ -170,6 +175,7 @@
|
|||
<a href="https://twitter.com/ncasenmare" target="_blank">
|
||||
my twitter
|
||||
</a>
|
||||
-->
|
||||
|
||||
<div id="replay"></div>
|
||||
|
||||
|
|
110
scenes/act1.md
110
scenes/act1.md
|
@ -22,6 +22,8 @@ n: _YOU_ ARE THE ANXIETY
|
|||
|
||||
# act1_replay
|
||||
|
||||
`hong({mouth:"0_neutral", eyes:"0_neutral"})`
|
||||
|
||||
h: Oh hey! We're back here again?
|
||||
|
||||
`hong({eyes:"0_neutral"})`
|
||||
|
@ -34,20 +36,26 @@ n: IN FACT, REPLAYING THIS GAME IS PUTTING THEM IN *DANGER* RIGHT NOW
|
|||
|
||||
n: QUICK, WARN THEM!
|
||||
|
||||
`bb({eyes:"fear", mouth:"normal"})`
|
||||
```
|
||||
sfx("squeak");
|
||||
bb({body:"squeeze_talk"});
|
||||
hong({body:"0_squeeze"});
|
||||
```
|
||||
|
||||
b: Human! Listen, we're in danger! The danger is...
|
||||
b: Human! Listen, we're in danger! The player...
|
||||
|
||||
[The player's gonna torture us again!](#act1_replay_torture)
|
||||
[...is gonna torture us again!](#act1_replay_torture)
|
||||
|
||||
[The player won't find an alternate ending!](#act1_replay_alternate)
|
||||
[...won't find an alternate ending!](#act1_replay_alternate)
|
||||
|
||||
[The player will get ludonarrative dissonance!](#act1_replay_dissonance)
|
||||
[...will get ludonarrative dissonance!](#act1_replay_dissonance)
|
||||
|
||||
# act1_replay_torture
|
||||
|
||||
```
|
||||
window.HACK_REPLAY = JSON.parse(localStorage.act4);
|
||||
bb({body:"normal", mouth:"normal", eyes:"fear"});
|
||||
hong({body:"0_sammich"});
|
||||
```
|
||||
|
||||
{{if window.HACK_REPLAY.act1_ending=="fight"}}
|
||||
|
@ -63,7 +71,7 @@ b: They'll make us *NOT* punch the party host!
|
|||
{{/if}}
|
||||
|
||||
{{if window.HACK_REPLAY.a2_ending=="flight"}}
|
||||
b: They'll make us punch the sympathetic-villain party host!
|
||||
b: They'll make us punch the Sympathetic Anti-Villain party host!
|
||||
{{/if}}
|
||||
|
||||
{{if window.HACK_REPLAY.a3_ending=="jump"}}
|
||||
|
@ -74,6 +82,8 @@ h: Well at least we might not jump off the roof this ti--
|
|||
b: THEY'LL MAKE US JUMP OFF THE ROOF.
|
||||
{{/if}}
|
||||
|
||||
`bb({body:"fear"});`
|
||||
|
||||
b: ALL THESE NEW TERRIBLE THINGS WILL HAPPEN TO US, AND THEN WE'LL--
|
||||
|
||||
(#act1_replay_end)
|
||||
|
@ -81,8 +91,15 @@ b: ALL THESE NEW TERRIBLE THINGS WILL HAPPEN TO US, AND THEN WE'LL--
|
|||
|
||||
#act1_replay_alternate
|
||||
|
||||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"fear"});
|
||||
hong({body:"0_sammich"});
|
||||
```
|
||||
|
||||
h: Sure, the story as a *whole* is the same, but each chapter has two possible endings, plus all the branching dialogue opti--
|
||||
|
||||
`bb({body:"fear"});`
|
||||
|
||||
b: The player will be disappointed, close this browser tab, delete our software, and then we'll--
|
||||
|
||||
(#act1_replay_end)
|
||||
|
@ -90,16 +107,31 @@ b: The player will be disappointed, close this browser tab, delete our software,
|
|||
|
||||
# act1_replay_dissonance
|
||||
|
||||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"fear"});
|
||||
hong({body:"0_sammich"});
|
||||
```
|
||||
|
||||
h: A lewd-what now?
|
||||
|
||||
`bb({eyes:"normal"});`
|
||||
|
||||
b: The story arc was about how you can *CHOOSE* to build a healthy collaboration with your fear,
|
||||
|
||||
`bb({eyes:"normal_right"});`
|
||||
|
||||
b: But replaying the game will give the same story, implying your *CHOICES* don't matter,
|
||||
|
||||
`bb({eyes:"narrow_eyebrow"});`
|
||||
|
||||
b: Thus showing a contradiction between the game's message and mechanics,
|
||||
|
||||
`bb({eyes:"fear"});`
|
||||
|
||||
b: Thus unraveling the fabric of this narrative universe,
|
||||
|
||||
`bb({body:"fear"});`
|
||||
|
||||
b: And then we'll--
|
||||
|
||||
(#act1_replay_end)
|
||||
|
@ -112,12 +144,25 @@ b: And then we'll--
|
|||
b: DIEEEEEEEEEEEEEEEEEEE
|
||||
|
||||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"normal"});
|
||||
Game.clearText();
|
||||
```
|
||||
|
||||
(...1001)
|
||||
|
||||
b: hahaha
|
||||
```
|
||||
bb({body:"laugh"});
|
||||
hong({body:"laugh"});
|
||||
Game.clearText();
|
||||
sfx("laugh");
|
||||
```
|
||||
|
||||
(...5001)
|
||||
|
||||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"normal"});
|
||||
hong({body:"0_sammich"});
|
||||
```
|
||||
|
||||
h: Okay let's get back into character.
|
||||
|
||||
|
@ -127,6 +172,12 @@ Game.clearText();
|
|||
|
||||
n4: (LET _YOUR_ ANXIETY BLAH BLAH BLAH MOST SIMILAR TO WHAT _YOUR_ FEAR BLAH BLAH YOU KNOW THE DRILL)
|
||||
|
||||
```
|
||||
sfx("squeak");
|
||||
hong({body:"0_squeeze"});
|
||||
bb({body:"squeeze"});
|
||||
```
|
||||
|
||||
(#act1_normal_choice)
|
||||
|
||||
|
||||
|
@ -148,6 +199,7 @@ n: IN FACT, THAT SANDWICH IS PUTTING THEM IN *DANGER* RIGHT NOW
|
|||
n: QUICK, WARN THEM!
|
||||
|
||||
```
|
||||
sfx("squeak");
|
||||
bb({body:"squeeze_talk"});
|
||||
hong({body:"0_squeeze"});
|
||||
```
|
||||
|
@ -200,7 +252,7 @@ b: DIEEEEEEEEEEEEEEEEEEE
|
|||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"normal"});
|
||||
hong({mouth:"0_shock", eyes:"0_shock"});
|
||||
attack("20p", "alone");
|
||||
attack("18p", "alone");
|
||||
publish("hp_show");
|
||||
```
|
||||
|
||||
|
@ -244,7 +296,7 @@ b: DIEEEEEEEEEEEEEEEEEEE
|
|||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"normal"});
|
||||
hong({mouth:"0_shock", eyes:"0_shock"});
|
||||
attack("20p", "bad");
|
||||
attack("18p", "bad");
|
||||
publish("hp_show");
|
||||
```
|
||||
|
||||
|
@ -279,7 +331,7 @@ b: DIEEEEEEEEEEEEEEEEEEE
|
|||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"normal"});
|
||||
hong({mouth:"0_shock", eyes:"0_shock"});
|
||||
attack("20p", "harm");
|
||||
attack("18p", "harm");
|
||||
publish("hp_show");
|
||||
```
|
||||
|
||||
|
@ -408,7 +460,7 @@ b: and we become WHALE POOP!
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "alone");
|
||||
attack("18p", "alone");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -463,7 +515,7 @@ b: We'll overdose on so many drugs the undertaker will wonder how our body was *
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "harm");
|
||||
attack("18p", "harm");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -521,7 +573,7 @@ b: ALL WE DO IS MAKE PEOPLE FEEL BAD, SO WE SHOULD FEEL BAD
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "bad");
|
||||
attack("18p", "bad");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -587,7 +639,7 @@ b: Let's retweet that story!
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "harm");
|
||||
attack("18p", "harm");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -655,7 +707,7 @@ h: ...
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "alone");
|
||||
attack("18p", "alone");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -687,7 +739,7 @@ b: CATS CAN'T DIGEST MILK AND WE'RE TERRIBLE PEOPLE FOR ENJOYING ANIMAL ABUSE
|
|||
|
||||
```
|
||||
bb({body:"normal", mouth:"normal", eyes:"fear"});
|
||||
attack("10p", "bad");
|
||||
attack("18p", "bad");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -764,7 +816,7 @@ b: WHALE. POOP.
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "alone");
|
||||
attack("18p", "alone");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -814,7 +866,7 @@ b: SAY NO SAY NO SAY NO SAY NO SAY NO SAY NO SAY NO SAY NO SAY N-
|
|||
```
|
||||
bb({body:"normal", eyes:"fear", mouth:"normal"});
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "harm");
|
||||
attack("18p", "harm");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -865,7 +917,7 @@ b: ...to leave them alone and let them have a nice party without a horrible disg
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "bad");
|
||||
attack("18p", "bad");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -891,7 +943,7 @@ b: Chronic loneliness increases our cortisol levels as well as risk for cardiova
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "harm");
|
||||
attack("18p", "harm");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -928,7 +980,7 @@ b: We're gonna get called out and cancelled and dragged with a rope on horseback
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "alone");
|
||||
attack("18p", "alone");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -962,7 +1014,7 @@ b: We're the reason fascism will arise from the rubble of democracy!
|
|||
```
|
||||
bb({body:"normal", eyes:"anger"});
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "bad");
|
||||
attack("18p", "bad");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -995,7 +1047,7 @@ b: That means you too.
|
|||
```
|
||||
bb({body:"normal", mouth:"normal"});
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "harm");
|
||||
attack("18p", "harm");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -1034,11 +1086,11 @@ h: It's kinda rude to keep ignoring them though, no?
|
|||
|
||||
`bb({eyes:"normal_right"});`
|
||||
|
||||
b: Well other people always ignore *us* so
|
||||
b: Well other people always ignore *us*, so
|
||||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("10p", "alone");
|
||||
attack("18p", "alone");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -1143,7 +1195,7 @@ b: The point is WE'RE GOING TO DIE ALONE
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("30p", "alone");
|
||||
attack("18p", "alone");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -1229,7 +1281,7 @@ b: The point is we're a manipulative creep.
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("30p", "bad");
|
||||
attack("18p", "bad");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -1260,7 +1312,7 @@ b: How's THAT for a party invite?!
|
|||
|
||||
```
|
||||
hong({mouth:"shock", eyes:"shock"});
|
||||
attack("30p", "harm");
|
||||
attack("18p", "harm");
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
@ -1297,7 +1349,7 @@ h:
|
|||
{{if _.hookuphole}}"we'll die alone"... {{/if}}
|
||||
{{if _.serialkiller}}"they're a serial killer"... {{/if}}
|
||||
{{if _.catmilk}}"cats can't digest milk"... {{/if}}
|
||||
{{if _.pokemon}}a crappy parody song... {{/if}}
|
||||
{{if _.pokemon}}a ^crappy^ parody song... {{/if}}
|
||||
|
||||
h: i just want to live my life.
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ s: Well, I saw someone retweet a GIF of a cat drinking milk yesterday.
|
|||
publish("act2",["dee",3]);
|
||||
```
|
||||
|
||||
s: They can't digest that crap! Who would retweet *animal abuse* like that?
|
||||
s: They can't digest that ^crap^! Who would retweet *animal abuse* like that?
|
||||
|
||||
```
|
||||
publish("act2",["party_hunter",1]);
|
||||
|
@ -508,7 +508,7 @@ b: Actually, even if you find a noble purpose in life, you can *still* mess ever
|
|||
|
||||
`bb({body:"normal", mouth:"normal", eyes:"normal"})`
|
||||
|
||||
b: Alfred Nobel wanted world peace, and for cultures to understand each other. So he decided to make travel easier.
|
||||
b: Alfred Nobel wanted world peace and for cultures to understand each other. So he decided to make travel easier.
|
||||
|
||||
`bb({eyes:"normal_r"})`
|
||||
|
||||
|
@ -981,7 +981,7 @@ b: You *need* to humbly see your own flaws in order to grow as a person!
|
|||
|
||||
`bb({body:"two_up", eyes:"suspect"})`
|
||||
|
||||
b: You can't spray air freshener over a moldy room! Covering up your flaws makes you worse in the long-run.
|
||||
b: You can't spray air freshener over a moldy room! Covering up your flaws makes you worse in the long run.
|
||||
|
||||
`bb({body:"chest", mouth:"smile", eyes:"closed"})`
|
||||
|
||||
|
@ -1467,7 +1467,7 @@ hong({body:"forward", mouth:"forward"});
|
|||
sfx("charging");
|
||||
```
|
||||
|
||||
h: What's this crap?
|
||||
h: What's this ^crap^?
|
||||
|
||||
h: You're gonna yap more stupid *words* at me to--
|
||||
|
||||
|
|
|
@ -610,7 +610,7 @@ h: *"Don't worry, be happy!"*
|
|||
|
||||
`hong({ body:"normal", mouth:"normal", eyes:"normal" });`
|
||||
|
||||
h: The sages all knew that simple Stoic truth: negative emotions are *bad!*
|
||||
h: All the wise folk of our time agree: negative emotions are *bad!*
|
||||
|
||||
`hong({ eyes:"less_angry" });`
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ hong({body:"hold", eyes:"normal", mouth:"normal"});
|
|||
bb({eyes:"normal"});
|
||||
```
|
||||
|
||||
h: So what the hell was the moral of this story?
|
||||
h: So what the ^hell^ was the moral of this story?
|
||||
|
||||
`hong({body:"one_up", eyes:"annoyed"})`
|
||||
|
||||
|
@ -1130,7 +1130,7 @@ hong({ eyes:"annoyed_l", mouth:"narrow" });
|
|||
bb({ eyes:"annoyed", mouth:"smile" });
|
||||
```
|
||||
|
||||
h: Y'know, all that "inter-personal skills" crap we see in counselor brochures.
|
||||
h: Y'know, all that "inter-personal skills" ^crap^ we see in counselor brochures.
|
||||
|
||||
(#act4_something_else)
|
||||
|
||||
|
@ -1868,16 +1868,17 @@ b: Maybe you can tame this wolf.
|
|||
|
||||
`Game.OVERRIDE_CHOICE_SPEAKER = "h"`
|
||||
|
||||
[Good dog.](#act4f-pat-bb) `Game.OVERRIDE_CHOICE_SPEAKER = "h"; publish("act4", ["hong_closer", 2]); publish("hide_tabs");`
|
||||
[Good dog.](#act4f-pat-bb) `Game.OVERRIDE_CHOICE_SPEAKER = "h"; publish("act4", ["hong_closer", 2]);`
|
||||
|
||||
`Game.OVERRIDE_CHOICE_SPEAKER = "b"`
|
||||
|
||||
[Good human.](#act4f-pat-hong) `Game.OVERRIDE_CHOICE_SPEAKER = "b"; publish("act4", ["bb_closer", 8]); publish("hide_tabs");`
|
||||
[Good human.](#act4f-pat-hong) `Game.OVERRIDE_CHOICE_SPEAKER = "b"; publish("act4", ["bb_closer", 8]);`
|
||||
|
||||
# act4f-pat-hong
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("hide_tabs");
|
||||
Game.FORCE_CANT_SKIP = true;
|
||||
music(null,{fade:0.5});
|
||||
sfx("youbothwin");
|
||||
|
@ -1920,6 +1921,7 @@ publish("act4", ["bb_closer", 13]);
|
|||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("hide_tabs");
|
||||
Game.FORCE_CANT_SKIP = true;
|
||||
music(null,{fade:0.5});
|
||||
sfx("youbothwin");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
```
|
||||
Game.FORCE_CANT_SKIP = true;
|
||||
music('credits', {NO_LOOP:true, volume:0.43});
|
||||
music('credits', {NO_LOOP:true, volume:0.4});
|
||||
window.localStorage.setItem("continueChapter", "replay"); /* to Continue */
|
||||
window.localStorage.setItem("credits", "YUP!"); /* for chapter select */
|
||||
```
|
||||
|
|
|
@ -69,7 +69,7 @@ _.PLAYED_BEFORE = !!window.localStorage.continueChapter;
|
|||
{{/if}}
|
||||
|
||||
{{if window.localStorage.credits}}
|
||||
[V. Credits](#credits) `publish("HACK_chselect_end"); stopAllSounds(); Game.OVERRIDE_CHOICE_LINE=true;`
|
||||
[V. Credits](#to-credits) `publish("HACK_chselect_end"); Game.OVERRIDE_CHOICE_LINE=true;`
|
||||
{{/if}}
|
||||
|
||||
{{if !window.localStorage.credits}}
|
||||
|
@ -78,6 +78,14 @@ _.PLAYED_BEFORE = !!window.localStorage.continueChapter;
|
|||
|
||||
[(main menu)](#intro-play-button) `publish("HACK_chselect_end"); Game.OVERRIDE_CHOICE_LINE=true;`
|
||||
|
||||
# to-credits
|
||||
|
||||
`stopAllSounds();`
|
||||
|
||||
(...101)
|
||||
|
||||
(#credits)
|
||||
|
||||
# intro-start
|
||||
|
||||
(...500)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
LOADING
|
||||
|
||||
GO!
|
||||
|
||||
ADVENTURES WITH ANXIETY
|
||||
|
||||
PLAYTIME: 30 MIN
|
||||
|
||||
by NICKY CASE & MONPLAISIR
|
||||
|
||||
harm
|
||||
|
||||
unloved
|
||||
|
||||
bad
|
||||
|
||||
YOU WIN!
|
||||
|
||||
YOU, uh, WIN...
|
||||
|
||||
RIP PHONE
|
||||
|
||||
LAKE TEARS
|
|
@ -116,10 +116,10 @@ function Act1_Beebee(){
|
|||
self.characterSpeakerID = "b";
|
||||
self.bounceHookes = 0.25; // loose
|
||||
self.bounceDamp = 0.9; // loose
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
// Vibration!
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
self.characterSquash = 1 + Math.sin(ticker*Math.TAU*7)*0.01; // seven vibes per second
|
||||
|
||||
// TOTAL HACK
|
||||
|
|
|
@ -113,10 +113,10 @@ function BG_Act1_Outro(){
|
|||
var parallaxTicker = 1;
|
||||
var thePreviousFrame = -1;
|
||||
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
// TICKER
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
|
||||
// CLOUD OFFSET
|
||||
OFFSETS[1] = -80 + ticker*3;
|
||||
|
@ -125,7 +125,7 @@ function BG_Act1_Outro(){
|
|||
var parallax = 0;
|
||||
if(GAME_TRANSITION==0){
|
||||
|
||||
parallaxTicker -= 2/60; // 1 to 0 in 1/2 second
|
||||
parallaxTicker -= 2*delta; // 1 to 0 in 1/2 second
|
||||
|
||||
if(parallaxTicker<0) parallaxTicker = 0;
|
||||
self.layers[5].alpha = parallaxTicker; // blackout alpha
|
||||
|
@ -138,7 +138,7 @@ function BG_Act1_Outro(){
|
|||
}
|
||||
|
||||
// Smoking crater & Hong frame
|
||||
frameTicker += 1/60;
|
||||
frameTicker += delta;
|
||||
var results;
|
||||
if(ANIM_TO_USE == "fight"){
|
||||
|
||||
|
|
|
@ -177,16 +177,16 @@ function BG_Party(){
|
|||
var ticker = 0;
|
||||
var ticker2 = 0;
|
||||
var ticker3 = 0;
|
||||
self.update = function(){
|
||||
self.update = function(delta){
|
||||
|
||||
// START PARALLAXING IN / OUT
|
||||
if(PARALLAXING!=null){
|
||||
|
||||
if(PARALLAXING=="out"){
|
||||
parallaxTicker += 1/60; // 0 to 1 in one second
|
||||
parallaxTicker += delta; // 0 to 1 in one second
|
||||
}
|
||||
if(PARALLAXING=="in"){
|
||||
parallaxTicker -= 1/60; // 1 to 0 in one second
|
||||
parallaxTicker -= delta; // 1 to 0 in one second
|
||||
}
|
||||
if(parallaxTicker>1) parallaxTicker = 1;
|
||||
if(parallaxTicker<0) parallaxTicker = 0;
|
||||
|
@ -237,7 +237,8 @@ function BG_Party(){
|
|||
|
||||
// Anxiety BG
|
||||
if(ALPHAS[5]>0){
|
||||
self.anxiety.update(ALPHAS[5]);
|
||||
self.anxiety.updateAlpha(ALPHAS[5]);
|
||||
self.anxiety.update(delta);
|
||||
if(ALPHAS[5]==1){ // if fully visible...
|
||||
// hide everything under
|
||||
ALPHAS[0] = 0;
|
||||
|
@ -258,21 +259,21 @@ function BG_Party(){
|
|||
// SUPER HACKY - ANIMATE PARTY-HONG
|
||||
if(self.party_hong.currentFrame>=5 && self.party_hong.currentFrame<11){
|
||||
if(ticker<1/20){
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
}else{
|
||||
ticker = 0;
|
||||
self.party_hong.nextFrame();
|
||||
}
|
||||
}else if(self.party_hong.currentFrame>=26 && self.party_hong.currentFrame<32){
|
||||
if(ticker<1/15){
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
}else{
|
||||
ticker = 0;
|
||||
self.party_hong.nextFrame();
|
||||
}
|
||||
}else if(self.party_hong.currentFrame>=36 && self.party_hong.currentFrame<=39){
|
||||
if(ticker<1/15){
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
}else{
|
||||
ticker = 0;
|
||||
if(self.party_hong.currentFrame==39){
|
||||
|
@ -288,7 +289,7 @@ function BG_Party(){
|
|||
// SUPER HACKY - ANIMATE PARTY-HUNTER
|
||||
if(self.party_hunter.currentFrame>=19 && self.party_hunter.currentFrame<=20){
|
||||
if(ticker2<1/3){
|
||||
ticker2 += 1/60;
|
||||
ticker2 += delta;
|
||||
}else{
|
||||
ticker2 = 0;
|
||||
if(self.party_hunter.currentFrame==20){
|
||||
|
@ -304,7 +305,7 @@ function BG_Party(){
|
|||
// SUPER HACKER - ANIMATE THE END
|
||||
if(self.act2_end.currentFrame>=2 && self.act2_end.currentFrame<10){
|
||||
if(ticker3<1/15){
|
||||
ticker3 += 1/60;
|
||||
ticker3 += delta;
|
||||
}else{
|
||||
ticker3 = 0;
|
||||
self.act2_end.nextFrame();
|
||||
|
@ -315,7 +316,7 @@ function BG_Party(){
|
|||
|
||||
};
|
||||
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
ctx.save();
|
||||
|
||||
|
@ -324,7 +325,7 @@ function BG_Party(){
|
|||
layer.x = PARALLAXES[i] * parallax + OFFSETS[i];
|
||||
if(ALPHAS[i]>0){
|
||||
ctx.globalAlpha = ALPHAS[i];
|
||||
layer.draw(ctx);
|
||||
layer.draw(ctx, delta);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -168,10 +168,10 @@ function Act2_Beebee(){
|
|||
self.characterSpeakerID = "b";
|
||||
self.bounceHookes = 0.25; // loose
|
||||
self.bounceDamp = 0.9; // loose
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
// Vibration!
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
self.characterSquash = 1 + Math.sin(ticker*Math.TAU*7)*0.01; // seven vibes per second
|
||||
|
||||
// TOTAL HACK
|
||||
|
|
|
@ -179,16 +179,16 @@ function BG_Rooftop(){
|
|||
var PARALLAXING = null;
|
||||
var MAGIC_NUMBER = 191;
|
||||
var ticker = 0;
|
||||
self.update = function(){
|
||||
self.update = function(delta){
|
||||
|
||||
// START PARALLAXING IN / OUT
|
||||
if(PARALLAXING!=null){
|
||||
|
||||
if(PARALLAXING=="out"){
|
||||
parallaxTicker += 1/60; // 0 to 1 in one second
|
||||
parallaxTicker += delta; // 0 to 1 in one second
|
||||
}
|
||||
if(PARALLAXING=="in"){
|
||||
parallaxTicker -= 1/60; // 1 to 0 in one second
|
||||
parallaxTicker -= delta; // 1 to 0 in one second
|
||||
}
|
||||
if(parallaxTicker>1) parallaxTicker = 1;
|
||||
if(parallaxTicker<0) parallaxTicker = 0;
|
||||
|
@ -230,11 +230,11 @@ function BG_Rooftop(){
|
|||
|
||||
// BYE CLOUDS
|
||||
if(ALPHAS[9]!=1){ // unless anxiety BG
|
||||
OFFSETS[2] -= 3/60;
|
||||
OFFSETS[2] -= 3*delta; // 3 pixels per second
|
||||
}
|
||||
|
||||
// SUPER HACKY - ANIMATE THE DIZZIES
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
var fps = 4;
|
||||
var frame = Math.round(ticker*fps) % 4; // fps times a second
|
||||
self.dizzyhunter.gotoFrame(frame);
|
||||
|
@ -244,7 +244,7 @@ function BG_Rooftop(){
|
|||
// 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;
|
||||
self.roofhunter._hack_timer += delta;
|
||||
if(self.roofhunter._hack_timer>1/24){ // 24 times a second
|
||||
if(self.roofhunter.currentFrame==23){
|
||||
self.roofhunter.gotoFrame(24);
|
||||
|
@ -258,7 +258,7 @@ function BG_Rooftop(){
|
|||
// 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;
|
||||
self.transition._hack_timer += delta;
|
||||
if(self.transition._hack_timer>1/15){ // 15fps
|
||||
self.transition._hack_timer = 0;
|
||||
if(self.transition.currentFrame<7){
|
||||
|
@ -276,7 +276,7 @@ function BG_Rooftop(){
|
|||
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;
|
||||
h._hack_timer += delta;
|
||||
if(h._hack_timer>1/15){ // 15fps
|
||||
h._hack_timer = 0;
|
||||
h.nextFrame();
|
||||
|
@ -285,13 +285,14 @@ function BG_Rooftop(){
|
|||
|
||||
// Anxiety BG
|
||||
if(ALPHAS[9]>0){
|
||||
self.anxiety.update(ALPHAS[9]);
|
||||
self.anxiety.updateAlpha(ALPHAS[9]);
|
||||
self.anxiety.update(delta);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var vibrateTicker = 0;
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
ctx.save();
|
||||
|
||||
|
@ -302,19 +303,19 @@ function BG_Rooftop(){
|
|||
layer.x = PARALLAXES[i] * parallax + OFFSETS[i];
|
||||
if(ALPHAS[i]>0){
|
||||
ctx.globalAlpha = ALPHAS[i];
|
||||
layer.draw(ctx);
|
||||
layer.draw(ctx, delta);
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
if(self.hospitalSprite.currentFrame==2){ // ambulance
|
||||
vibrateTicker += 1/60;
|
||||
vibrateTicker += delta;
|
||||
self.hospitalSprite.y = Math.sin(vibrateTicker*10*Math.TAU)*5;
|
||||
}else{
|
||||
self.hospitalSprite.y = 0;
|
||||
}
|
||||
self.hospitalSprite.draw(ctx);
|
||||
self.hospitalSprite.draw(ctx, delta);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -84,10 +84,10 @@ function Act3_Beebee(){
|
|||
self.bounceHookes = 0.25; // loose
|
||||
self.bounceDamp = 0.9; // loose
|
||||
self.isVibrating = true;
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
// Vibration!
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
if(self.isVibrating){
|
||||
self.characterSquash = 1 + Math.sin(ticker*Math.TAU*7)*0.01; // seven vibes per second
|
||||
}else{
|
||||
|
|
|
@ -362,7 +362,7 @@ function BG_Act4(){
|
|||
}
|
||||
return frames;
|
||||
};
|
||||
self.executeAnimation = function(anim){
|
||||
self.executeAnimation = function(anim, delta){
|
||||
|
||||
// Frame...
|
||||
var sprite = self[anim.target];
|
||||
|
@ -374,7 +374,7 @@ function BG_Act4(){
|
|||
var frameToGoTo = frame.when;
|
||||
|
||||
// Next?
|
||||
anim.ticker += 1/60;
|
||||
anim.ticker += delta;
|
||||
if(anim.ticker >= frame.wait){
|
||||
anim.ticker = 0;
|
||||
frameToGoTo = frame.then;
|
||||
|
@ -388,7 +388,7 @@ function BG_Act4(){
|
|||
};
|
||||
|
||||
// SMASH THAT
|
||||
self.createAnimation("break_hp", _animSequence( 1,4, 1/12, true) );
|
||||
self.createAnimation("break_hp", _animSequence( 1,4, (1/12-0.01), true) );
|
||||
|
||||
// ALSHIRE
|
||||
self.createAnimation("alshire", _animSequence( 4,5, 1/10, true) );
|
||||
|
@ -410,10 +410,10 @@ function BG_Act4(){
|
|||
var ticker = 0;
|
||||
var MAGIC_NUMBER = (210 + 8);
|
||||
|
||||
self.update = function(){
|
||||
self.update = function(delta){
|
||||
|
||||
// TICKER
|
||||
ticker += 1/60;
|
||||
ticker += delta;
|
||||
|
||||
// CLOUD OFFSET
|
||||
OFFSETS[1] = 80 - ticker*3;
|
||||
|
@ -422,10 +422,10 @@ function BG_Act4(){
|
|||
if(PARALLAXING!=null){
|
||||
|
||||
if(PARALLAXING=="out"){
|
||||
parallaxTicker += 1/60; // 0 to 1 in one second
|
||||
parallaxTicker += delta; // 0 to 1 in one second
|
||||
}
|
||||
if(PARALLAXING=="in"){
|
||||
parallaxTicker -= 1/60; // 1 to 0 in one second
|
||||
parallaxTicker -= delta; // 1 to 0 in one second
|
||||
}
|
||||
if(parallaxTicker>1) parallaxTicker = 1;
|
||||
if(parallaxTicker<0) parallaxTicker = 0;
|
||||
|
@ -456,7 +456,8 @@ function BG_Act4(){
|
|||
|
||||
// Anxiety BG
|
||||
if(ALPHAS[ANXIETY_INDEX]>0){
|
||||
self.anxiety.update(ALPHAS[ANXIETY_INDEX]);
|
||||
self.anxiety.updateAlpha(ALPHAS[ANXIETY_INDEX]);
|
||||
self.anxiety.update(delta);
|
||||
}
|
||||
|
||||
// BREAK_HP'S ALPHA
|
||||
|
@ -465,15 +466,17 @@ function BG_Act4(){
|
|||
}
|
||||
|
||||
// ALL ANIMS
|
||||
self.animations.forEach(self.executeAnimation);
|
||||
self.animations.forEach(function(anim){
|
||||
self.executeAnimation(anim, delta);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
if(self.sexySprite.visible){
|
||||
|
||||
self.sexySprite.draw(ctx);
|
||||
self.sexySprite.draw(ctx, delta);
|
||||
|
||||
}else{
|
||||
|
||||
|
@ -530,7 +533,7 @@ function BG_Act4(){
|
|||
if(ALPHAS[i]>0){
|
||||
if( !(i<ANXIETY_INDEX && DONT_DRAW_BENEATH) ){
|
||||
ctx.globalAlpha = ALPHAS[i];
|
||||
layer.draw(ctx);
|
||||
layer.draw(ctx, delta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ function BG_Credits(){
|
|||
|
||||
var STAGE = 0;
|
||||
var T_OFFSET = 1.9667; // stage 0
|
||||
/*var T_OFFSET = 30;
|
||||
/*var T_OFFSET = 18;
|
||||
window.CURRENT_MUSIC.stop();
|
||||
window.CURRENT_MUSIC.seek(T_OFFSET);
|
||||
window.CURRENT_MUSIC.play();*/
|
||||
|
@ -122,7 +122,7 @@ function BG_Credits(){
|
|||
STAGE_1_SCROLL_LENGTH -= 25; // HACK.
|
||||
|
||||
// STAGE 2
|
||||
var S2_SCROLL_START = 34.1667 + 0.75;
|
||||
var S2_SCROLL_START = 34.1667;// + 0.75;
|
||||
var S2_SCROLL_END = 49.6667;
|
||||
var S2_SCROLL_DUR = S2_SCROLL_END-S2_SCROLL_START;
|
||||
var S2_SCROLL_LEN = 3600 + 600;
|
||||
|
@ -130,6 +130,9 @@ function BG_Credits(){
|
|||
// STAGE 4
|
||||
var YELPED = false;
|
||||
|
||||
// STAGE 6
|
||||
var HAS_PUBLISHED_THE_END = false;
|
||||
|
||||
self.draw = function(ctx){
|
||||
|
||||
// Keep on tickin' -- todo: Game passes in time, coz paused...
|
||||
|
@ -139,7 +142,12 @@ function BG_Credits(){
|
|||
self.t += delta; //1/60;
|
||||
|
||||
// What STAGE?
|
||||
if(self.t >= 71.0333){
|
||||
if(self.t >= 71.0333 + 1.5){
|
||||
if(!HAS_PUBLISHED_THE_END){
|
||||
HAS_PUBLISHED_THE_END = true;
|
||||
publish("THE_END");
|
||||
}
|
||||
}else if(self.t >= 71.0333){
|
||||
STAGE = 5; // THE END
|
||||
}else if(self.t >= 63.9667){
|
||||
STAGE = 4; // END WALK
|
||||
|
@ -238,9 +246,8 @@ function BG_Credits(){
|
|||
self.velY *= 0.75;
|
||||
self.accY = (self.gotoY - self.starring.y)*0.03;
|
||||
|
||||
// Draw GRAMM???
|
||||
if(self.t > 33.6333){
|
||||
//if(self.t > 33.7333){
|
||||
if(self.t > 33.8333){
|
||||
|
||||
// Draw ANYWAY,
|
||||
self.screens.x = 0;
|
||||
|
@ -263,6 +270,12 @@ function BG_Credits(){
|
|||
|
||||
}
|
||||
|
||||
// HACK - to load BB?
|
||||
if(self.t > 31.8){
|
||||
self.bb_dance.y = 300;
|
||||
self.bb_dance.draw(ctx);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// STAGE 2 - THANKS & DANCE
|
||||
|
@ -282,10 +295,10 @@ function BG_Credits(){
|
|||
}
|
||||
|
||||
// BB
|
||||
if(self.t < 34.1667 + 0.5){
|
||||
if(self.t < 34.1667){
|
||||
|
||||
// BB transitions in
|
||||
var t = (self.t-33.9667)/(34.1667 + 0.5-33.9667);
|
||||
var t = (self.t-33.9667)/(34.1667-33.9667);
|
||||
var frame = Math.floor(t*6);
|
||||
self.bb_dance.gotoFrame(frame);
|
||||
|
||||
|
@ -325,6 +338,7 @@ function BG_Credits(){
|
|||
}
|
||||
|
||||
}
|
||||
self.bb_dance.y = 0;
|
||||
self.bb_dance.draw(ctx);
|
||||
|
||||
}
|
||||
|
|
|
@ -36,19 +36,13 @@ Loader.addSounds([
|
|||
// Hi
|
||||
About.showing = true;
|
||||
Game.pause();
|
||||
|
||||
// Cut in
|
||||
aboutDOM.removeAttribute("about");
|
||||
aboutDOM.style.display = "none";
|
||||
aboutDOM.style.display = "block";
|
||||
setTimeout(function(){
|
||||
aboutDOM.style.top = "0px"; // slide in
|
||||
},10);
|
||||
aboutDOM.style.top = "0px"; // to TOP.
|
||||
|
||||
// Sound
|
||||
Howler.mute(false);
|
||||
sfx("rustle");
|
||||
music('campus', {volume:0.5, fade:1});
|
||||
music('campus', {volume:0.5, fade:1}); // aw yeah
|
||||
|
||||
});
|
||||
|
||||
|
@ -57,7 +51,8 @@ Loader.addSounds([
|
|||
|
||||
// UI/SCREAM SOUNDS
|
||||
stopAllSounds();
|
||||
sfx("yelp");
|
||||
//sfx("yelp");
|
||||
sfx("pop");
|
||||
|
||||
// Cut out
|
||||
aboutDOM.style.top = "";
|
||||
|
|
|
@ -69,11 +69,11 @@ function BG_Anxiety(whiteMode){
|
|||
if(box.y>BG_HEIGHT) return true;
|
||||
return false;
|
||||
};
|
||||
self.updateBox = function(box){
|
||||
self.updateBox = function(box, delta){
|
||||
|
||||
// Move it
|
||||
box.x += box.velX;
|
||||
box.y += box.velY;
|
||||
box.x += box.velX * delta/(1/60);
|
||||
box.y += box.velY * delta/(1/60);
|
||||
|
||||
// If it's out of sight, reset it
|
||||
if(self.isBoxOutOfSight(box)){
|
||||
|
@ -91,11 +91,13 @@ function BG_Anxiety(whiteMode){
|
|||
self.boxes.push(box);
|
||||
}
|
||||
|
||||
var allBoxAlpha = 0;
|
||||
self.update = function(alpha){
|
||||
var allBoxAlpha = 1;
|
||||
self.updateAlpha = function(alpha){
|
||||
allBoxAlpha = alpha;
|
||||
};
|
||||
self.update = function(delta){
|
||||
self.boxes.forEach(function(box){
|
||||
self.updateBox(box);
|
||||
self.updateBox(box, delta);
|
||||
});
|
||||
};
|
||||
self.draw = function(ctx){
|
||||
|
|
|
@ -131,7 +131,7 @@ function Character(spriteConfig, animLoops){
|
|||
self.characterSquash = 1;
|
||||
self.ALLOW_PARALLAX = false;
|
||||
self.x = -1337;
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, delta){
|
||||
|
||||
var fname;
|
||||
var l = self.layers;
|
||||
|
@ -164,7 +164,7 @@ function Character(spriteConfig, animLoops){
|
|||
}
|
||||
|
||||
// Anim Loop rules!
|
||||
self.runAnimLoopRules();
|
||||
self.runAnimLoopRules(delta);
|
||||
|
||||
// SUPER DUPER HACK
|
||||
if(THERE_IS_A_CONE){
|
||||
|
@ -239,7 +239,7 @@ function Character(spriteConfig, animLoops){
|
|||
caption.draw(ctx);
|
||||
}
|
||||
|
||||
attackedTimer += 1/60;
|
||||
attackedTimer += delta;
|
||||
if(attackedTimer>1.75){
|
||||
if(attackedIconShown){
|
||||
icon.y -= 1;
|
||||
|
@ -263,7 +263,7 @@ function Character(spriteConfig, animLoops){
|
|||
rule.active = false;
|
||||
rule.countdown = -1;
|
||||
});
|
||||
self.runAnimLoopRules = function(){
|
||||
self.runAnimLoopRules = function(delta){
|
||||
for(var i=0; i<self.animLoops.length; i++){
|
||||
|
||||
// Find target
|
||||
|
@ -282,7 +282,7 @@ function Character(spriteConfig, animLoops){
|
|||
|
||||
// Countdown... and ACTIVATE!
|
||||
if(rule.active){
|
||||
rule.countdown -= 1/60;
|
||||
rule.countdown -= delta;
|
||||
if(rule.countdown<=0){
|
||||
target.gotoFrameByName(rule.target+"_"+rule.thenGoToFrame);
|
||||
rule.active = false;
|
||||
|
|
|
@ -77,17 +77,25 @@ Game.parseSceneMarkdown = function(md){
|
|||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Game.start = function(){
|
||||
Game.FORCE_CANT_SKIP = false; // for the replay
|
||||
window._ = {}; // global var, reset
|
||||
};
|
||||
|
||||
var LAST_TIME = (new Date()).getTime();
|
||||
Game.update = function(){
|
||||
|
||||
// TIME
|
||||
var NOW = (new Date()).getTime();
|
||||
var DELTA = (NOW - LAST_TIME)/1000;
|
||||
DELTA = Math.min(DELTA, 1/20); // no slower than 20fps
|
||||
LAST_TIME = NOW;
|
||||
|
||||
if(!Game.paused){
|
||||
|
||||
// Timeout callbacks...
|
||||
for(var i=0; i<Game.timeoutCallbacks.length; i++){
|
||||
var tc = Game.timeoutCallbacks[i];
|
||||
tc.timeLeft -= 1000/60;
|
||||
tc.timeLeft -= 1000*DELTA;
|
||||
if(tc.timeLeft<=0){
|
||||
tc.callback();
|
||||
Game.timeoutCallbacks.splice(i,1); // delete that one
|
||||
|
@ -97,7 +105,7 @@ Game.update = function(){
|
|||
|
||||
// The interface
|
||||
Game.updateText();
|
||||
Game.updateCanvas();
|
||||
Game.updateCanvas(DELTA);
|
||||
|
||||
// Ayyy
|
||||
publish("update");
|
||||
|
@ -119,6 +127,8 @@ Game.pause = function(){
|
|||
Howler.mute(true);
|
||||
|
||||
$("#paused").setAttribute("modal", (Options.showing||About.showing||ContentNotes.showing) ? "yes" : "no" );
|
||||
|
||||
publish("GAME_PAUSED");
|
||||
|
||||
};
|
||||
window.addEventListener("blur", Game.pause);
|
||||
|
@ -128,6 +138,9 @@ Game.onUnpause = function(){
|
|||
Game.pausedDOM.style.display = "none";
|
||||
Howler.mute(false);
|
||||
}
|
||||
|
||||
publish("GAME_UNPAUSED");
|
||||
|
||||
};
|
||||
Game.pausedDOM.onclick = function(e){
|
||||
if(Options.showing){
|
||||
|
@ -661,6 +674,14 @@ Game.executeText = function(line){
|
|||
resolve(); // DONE WITH IT.
|
||||
}, interval+nextLineDelay);
|
||||
|
||||
// VISIBLE: FALSE FOR ANY ELEMENTS PAST 10
|
||||
var VISIBLE_LIMIT = 10;
|
||||
var w = Game.wordsDOM.children;
|
||||
if(w.length>VISIBLE_LIMIT){
|
||||
w[ w.length - VISIBLE_LIMIT - 1 ].style.visibility = "hidden";
|
||||
w[ w.length - VISIBLE_LIMIT - 2 ].style.visibility = "hidden";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -998,20 +1019,20 @@ Game.resetScene = function(){
|
|||
Game.resetScene();
|
||||
|
||||
// Update & draw all the kids!
|
||||
Game.updateCanvas = function(){
|
||||
Game.updateCanvas = function(DELTA){
|
||||
|
||||
// For retina
|
||||
var ctx = Game.context;
|
||||
ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);
|
||||
ctx.save();
|
||||
ctx.scale(2,2);
|
||||
|
||||
|
||||
// Update/Draw all kids
|
||||
Game.scene.children.forEach(function(child){
|
||||
if(child.update) child.update();
|
||||
if(child.update) child.update(DELTA);
|
||||
});
|
||||
Game.scene.children.forEach(function(child){
|
||||
child.draw(ctx);
|
||||
child.draw(ctx, DELTA);
|
||||
});
|
||||
|
||||
// Restore
|
||||
|
|
|
@ -156,14 +156,22 @@ function HitPoints(){
|
|||
var offset = (1-self[side+"White"])*295;//self[side+"WhiteWidth"];
|
||||
offset *= isRight ? -1 : 1;
|
||||
ctx.globalCompositeOperation = "source-atop";
|
||||
ctx.drawImage(self.image, (sx-offset),sy,sw,sh, sx/2,0,sw/2,sh/2);
|
||||
if(isRight){
|
||||
ctx.drawImage(self.image, sx-offset,sy,sw-offset,sh, sx/2,0,(sw-offset)/2,sh/2);
|
||||
}else{
|
||||
ctx.drawImage(self.image, 0,sy,sw-offset,sh, offset/2,0,(sw-offset)/2,sh/2);
|
||||
}
|
||||
|
||||
// Red
|
||||
var sx=isRight ? 360 : 0, sy=200*2, sw=360, sh=200;
|
||||
var offset = (1-self[side+"Red"])*295;//self[side+"WhiteWidth"];
|
||||
offset *= isRight ? -1 : 1;
|
||||
ctx.globalCompositeOperation = "source-atop";
|
||||
ctx.drawImage(self.image, (sx-offset),sy,sw,sh, sx/2,0,sw/2,sh/2);
|
||||
if(isRight){
|
||||
ctx.drawImage(self.image, sx-offset,sy,sw-offset,sh, sx/2,0,(sw-offset)/2,sh/2);
|
||||
}else{
|
||||
ctx.drawImage(self.image, 0,sy,sw-offset,sh, offset/2,0,(sw-offset)/2,sh/2);
|
||||
}
|
||||
|
||||
// Restore
|
||||
ctx.restore();
|
||||
|
|
|
@ -48,6 +48,12 @@ window.voice = function(name, options){
|
|||
}
|
||||
|
||||
window.CURRENT_MUSIC = null;
|
||||
/*subscribe("GAME_PAUSED",function(){
|
||||
if(window.CURRENT_MUSIC && window.CURRENT_MUSIC.playing()) window.CURRENT_MUSIC.pause();
|
||||
});
|
||||
subscribe("GAME_UNPAUSED",function(){
|
||||
if(window.CURRENT_MUSIC && !window.CURRENT_MUSIC.playing()) window.CURRENT_MUSIC.play();
|
||||
});*/
|
||||
window.music = function(song, options, onend){
|
||||
|
||||
options = options || {};
|
||||
|
|
|
@ -30,8 +30,8 @@ function BG_Intermission(STAGE){
|
|||
});
|
||||
self.bbSprite.gotoFrame( STAGE==1 ? 0 : 1 );
|
||||
|
||||
self.update = function(){
|
||||
self.bgSprite.rotation += Math.TAU/2500;
|
||||
self.update = function(delta){
|
||||
self.bgSprite.rotation += (delta/(1/60)) * Math.TAU/2500;
|
||||
};
|
||||
|
||||
self.draw = function(ctx){
|
||||
|
|
|
@ -16,6 +16,8 @@ Loader.addSounds([
|
|||
{ id:"bag_kick", src:"sounds/sfx/bag_kick.mp3" },
|
||||
{ id:"sandwich", src:"sounds/sfx/sandwich.mp3" },
|
||||
|
||||
{ id:"laugh", src:"sounds/sfx/laugh.mp3" },
|
||||
|
||||
]);
|
||||
|
||||
function BG_Intro(){
|
||||
|
@ -108,17 +110,17 @@ function BG_Intro(){
|
|||
var SHOWN_LOGO = false;
|
||||
var tickerSinceShown = 0;
|
||||
var thePreviousFrame;
|
||||
self.draw = function(ctx){
|
||||
self.draw = function(ctx, DELTA){
|
||||
|
||||
// TICKER
|
||||
ticker += 1/60;
|
||||
ticker += DELTA;
|
||||
|
||||
// CLOUD OFFSET
|
||||
OFFSETS[1] = -80 + ticker*3;
|
||||
|
||||
// Animate Hong: Which frame?
|
||||
var parallax = 0;
|
||||
frameTicker += 1/60;
|
||||
frameTicker += DELTA;
|
||||
if(GAME_TRANSITION==0 || GAME_TRANSITION==1 || GAME_TRANSITION==2){
|
||||
if(frameTicker>590/30){
|
||||
if(GAME_TRANSITION==0){
|
||||
|
@ -131,7 +133,7 @@ function BG_Intro(){
|
|||
}
|
||||
if(GAME_TRANSITION==3){ // START PARALLAXING
|
||||
|
||||
parallaxTicker += 1/60; // 0 to 1 in one second
|
||||
parallaxTicker += DELTA; // 0 to 1 in one second
|
||||
if(parallaxTicker>1) parallaxTicker = 1;
|
||||
self.layers[5].alpha = parallaxTicker; // blackout alpha
|
||||
|
||||
|
@ -164,14 +166,14 @@ function BG_Intro(){
|
|||
}
|
||||
if(!SHOWN_LOGO && ticker>=530/30){
|
||||
SHOWN_LOGO = true;
|
||||
sfx("intro_scream", {volume:0.8});
|
||||
sfx("intro_scream", {volume:0.7});
|
||||
}
|
||||
if(GAME_TRANSITION==0 && SHOWN_LOGO){
|
||||
self.logoSprite.draw(ctx);
|
||||
self.infoSprite.draw(ctx);
|
||||
}
|
||||
if(SHOWN_LOGO){
|
||||
tickerSinceShown += 1/60;
|
||||
tickerSinceShown += DELTA;
|
||||
if(tickerSinceShown>1.5){
|
||||
self.infoSprite.alpha = Math.min(1, tickerSinceShown-1.5);
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 241 KiB |
Binary file not shown.
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 227 KiB |
|
@ -968,6 +968,9 @@ DIALOGUEZ
|
|||
-o-transition-timing-function: cubic-bezier(0.350, 0.005, 0.370, 1.390);
|
||||
transition-timing-function: cubic-bezier(0.350, 0.005, 0.370, 1.390); /* custom */
|
||||
}
|
||||
#game_choices > div > * {
|
||||
pointer-events: none; /* so italics and stuff doesn't trigger sound */
|
||||
}
|
||||
#game_choices > div[speaker=none]{
|
||||
background: #000;
|
||||
color: #fff;
|
||||
|
|
Loading…
Reference in New Issue