heck yeah act 2 sprites and anims
1
TODO
|
@ -1,6 +1,7 @@
|
|||
TODO
|
||||
|
||||
INTRO
|
||||
- preloader bug, before css shows, mask is not there
|
||||
- continue / new game
|
||||
- chapter select
|
||||
- (content note)
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
`SceneSetup.act2();`
|
||||
|
||||
a: hack
|
||||
|
||||
(#act2-preamble-end)
|
||||
|
||||
{{if _.badnews && !_.factcheck}}
|
||||
(#act2-preamble-news1)
|
||||
{{/if}}
|
||||
|
@ -135,7 +139,7 @@ publish("act2-out-1");
|
|||
music(null, {fade:1});
|
||||
```
|
||||
|
||||
(...2500)
|
||||
(...3000)
|
||||
|
||||
```
|
||||
music('battle', {volume:0.5});
|
||||
|
@ -416,7 +420,7 @@ _.a2_attack_3 = "alone";
|
|||
|
||||
b: The BIG DISGUSTING TRASH PERVERT shall be sentenced to 72 hours in one of those medieval public-humiliation devices
|
||||
|
||||
b: unless they're actually *into* that sort of thing
|
||||
b: unless they're secretly *into* that sort of thing
|
||||
|
||||
b: in which case that further proves them being a BIG DISGUSTING TRASH PERVERT
|
||||
|
||||
|
@ -603,7 +607,7 @@ b: It was a well-designed study – randomized controlled trial, experimenter wa
|
|||
|
||||
b: Results: if you already had low self-esteem, being asked to repeat affirmations makes you feel *worse* than if you'd said nothing at all!
|
||||
|
||||
b: Wood et al, 2009. Look it up on Google Scholar, human,
|
||||
b: Wood et al, 2009, Psychol Sci. Look it up on Google Scholar, human,
|
||||
|
||||
b: THEN STOP SPREADING UNSCIENTIFIC FAKE NEWS
|
||||
|
||||
|
|
|
@ -0,0 +1,250 @@
|
|||
# act2
|
||||
|
||||
`SceneSetup.act2();`
|
||||
|
||||
a: hack
|
||||
|
||||
(#act2-preamble-end)
|
||||
|
||||
|
||||
# act2-preamble-end
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("act2-out-1");
|
||||
music(null, {fade:1});
|
||||
```
|
||||
|
||||
(...3000)
|
||||
|
||||
```
|
||||
music('battle', {volume:0.5});
|
||||
publish("hp_show");
|
||||
```
|
||||
|
||||
n: ROUND TWO: *FIGHT!*
|
||||
|
||||
```
|
||||
bb({
|
||||
body: "cry_6",
|
||||
mouth: "right",
|
||||
eyes: "cry_r_3"
|
||||
});
|
||||
hong({
|
||||
body:"defeated"
|
||||
});
|
||||
```
|
||||
|
||||
b: I just... all I want is for you to be patient with me.
|
||||
|
||||
```
|
||||
bb({
|
||||
eyes: "cry_r_4"
|
||||
});
|
||||
hong({
|
||||
body:"listen"
|
||||
});
|
||||
```
|
||||
|
||||
r: Hey.
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("act2-in-2");
|
||||
publish("hp_hide");
|
||||
music('party1', {volume:0.4, fade:2});
|
||||
```
|
||||
|
||||
(...1300)
|
||||
|
||||
r: Looks like you're caught in a fight with yourself, kid.
|
||||
|
||||
```
|
||||
publish("act2", ["party_hunter",12]);
|
||||
publish("act2", ["party_hong",24]);
|
||||
```
|
||||
|
||||
r: Bottoms up, motherfucker.
|
||||
|
||||
```
|
||||
hong({
|
||||
body:"hold",
|
||||
eyes:"blank"
|
||||
});
|
||||
bb({
|
||||
body:"normal",
|
||||
mouth:"small",
|
||||
eyes:"wat"
|
||||
});
|
||||
Game.clearText();
|
||||
publish("act2-out-3");
|
||||
publish("hp_show");
|
||||
```
|
||||
|
||||
(...3500)
|
||||
|
||||
b: I'm so sorry, human.
|
||||
|
||||
b: I'm going to have to use my SPECIAL ATTACK
|
||||
|
||||
```
|
||||
music('battle', {volume:0.5});
|
||||
bb({body:"special_a"});
|
||||
```
|
||||
|
||||
[🗡](#act2h_attack) `_.SPECIAL_ATTACK="harm"; Game.OVERRIDE_CHOICE_LINE=true`
|
||||
|
||||
[💔](#act2h_attack) `_.SPECIAL_ATTACK="alone"; Game.OVERRIDE_CHOICE_LINE=true`
|
||||
|
||||
[👿](#act2h_attack) `_.SPECIAL_ATTACK="bad"; Game.OVERRIDE_CHOICE_LINE=true`
|
||||
|
||||
# act2h_attack
|
||||
|
||||
```
|
||||
bb({body:"special_b_1"});
|
||||
```
|
||||
|
||||
h: What's this crap?
|
||||
|
||||
h: You're gonna yap more stupid words at me again to try t--
|
||||
|
||||
```
|
||||
bb({body:"special_c"});
|
||||
sfx("hadouken");
|
||||
```
|
||||
|
||||
(...901)
|
||||
|
||||
(#act2i)
|
||||
|
||||
# act2i
|
||||
|
||||
```
|
||||
publish("show_special_attack");
|
||||
Game.FORCE_CANT_SKIP = true;
|
||||
music(null);
|
||||
stopAllSounds();
|
||||
```
|
||||
|
||||
(...5000)
|
||||
|
||||
```
|
||||
hong({
|
||||
body:"final",
|
||||
mouth:"final"
|
||||
});
|
||||
bb({
|
||||
body:"normal",
|
||||
mouth:"normal",
|
||||
eyes:"sad_2"
|
||||
});
|
||||
attack("100p", _.SPECIAL_ATTACK);
|
||||
Game.FORCE_CANT_SKIP = false;
|
||||
setTimeout(function(){
|
||||
publish("remove_special_attack");
|
||||
},30);
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
||||
h: WHAT THE HELL WAS THAT
|
||||
|
||||
b: PUNCH THEM PUNCH THEM PUNCH THEM PUNCH THEM PUNCH THEM PUNCH THEM PUNCH THEM PUNCH THE--
|
||||
|
||||
`_.a2_ending = "fight";`
|
||||
|
||||
(#act2k)
|
||||
|
||||
# act2k
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("act2-in-4");
|
||||
publish("hp_hide");
|
||||
music('party1', {volume:0.6, fade:1.5});
|
||||
```
|
||||
|
||||
(...2200)
|
||||
|
||||
r: You alright, kid?
|
||||
|
||||
```
|
||||
publish("act2", ["party_hunter",19]);
|
||||
publish("act2", ["party_hong",36]);
|
||||
```
|
||||
|
||||
r: I like that. Come to my party next weekend, cutie.
|
||||
|
||||
(#act2k_end)
|
||||
|
||||
|
||||
|
||||
# act2k_end
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("act2-out-5");
|
||||
music("hum", {fade:2, volume:0.6});
|
||||
```
|
||||
|
||||
(...2500)
|
||||
|
||||
```
|
||||
sfx("whoosh");
|
||||
publish("act2", ["act2_end",2]);
|
||||
```
|
||||
|
||||
(...800)
|
||||
|
||||
b: Human! Are you okay?!
|
||||
|
||||
b: Gosh, that was *close.* We really could've--
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("act2-outro", ["end3"]);
|
||||
music(null);
|
||||
sfx("squeak");
|
||||
```
|
||||
|
||||
(...1500)
|
||||
|
||||
```
|
||||
publish("act2-outro", ["end4"]);
|
||||
sfx("hit");
|
||||
```
|
||||
|
||||
(...1000)
|
||||
|
||||
h: I'm going to the party next weekend.
|
||||
|
||||
h: The next time we fight, I'm not just going to *defeat* you...
|
||||
|
||||
h: I'm going to fucking *kill* you.
|
||||
|
||||
```
|
||||
Game.clearText();
|
||||
publish("act2-outro", ["end5"]);
|
||||
sfx("grass_step1");
|
||||
````
|
||||
|
||||
(...901)
|
||||
|
||||
```
|
||||
sfx("grass_step2", {volume:0.8});
|
||||
publish("act2-outro", ["end6"]);
|
||||
```
|
||||
|
||||
(...901)
|
||||
|
||||
`sfx("grass_step1", {volume:0.5});`
|
||||
|
||||
(...901)
|
||||
|
||||
`sfx("grass_step2", {volume:0.25});`
|
||||
|
||||
(...3000)
|
||||
|
||||
`_.INTERMISSION_STAGE = 2;`
|
||||
|
||||
(#intermission)
|
|
@ -1,8 +1,16 @@
|
|||
Loader.addImages([
|
||||
|
||||
{ id:"party_bg", src:"sprites/act2/party_bg.png" },
|
||||
{ id:"party_action", src:"sprites/act2/party_action.png" },
|
||||
{ id:"hong_bb_outro", src:"sprites/act2/hong_bb_outro.png" },
|
||||
|
||||
{ id:"dee", src:"sprites/act2/dee.png" },
|
||||
{ id:"dum", src:"sprites/act2/dum.png" },
|
||||
{ id:"party_hunter", src:"sprites/act2/party_hunter.png" },
|
||||
{ id:"party_hong", src:"sprites/act2/party_hong.png" },
|
||||
|
||||
{ id:"act2_end", src:"sprites/act2/act2_end.png" },
|
||||
|
||||
{ id:"SPECIAL_ATTACK", src:"sprites/act2/special.png" },
|
||||
|
||||
]);
|
||||
|
||||
Loader.addSounds([
|
||||
|
@ -15,43 +23,54 @@ function BG_Party(){
|
|||
|
||||
var self = this;
|
||||
|
||||
// Sprites!
|
||||
self.bgSprite = new Sprite({
|
||||
// BACKGROUND SPRITES
|
||||
var BGSpriteConfig = {
|
||||
image: Library.images.party_bg,
|
||||
grid:{ width:1, height:1 },
|
||||
frame:{ width:720, height:1200 },
|
||||
});
|
||||
self.partyActionSprite = new Sprite({
|
||||
image: Library.images.party_action,
|
||||
grid:{ width:4, height:3 },
|
||||
frame:{ width:720, height:600 },
|
||||
y: 189,
|
||||
frameNames:[
|
||||
"pre",
|
||||
"twist1",
|
||||
"twist2",
|
||||
"twist3",
|
||||
"twist4",
|
||||
"end",
|
||||
"end_run",
|
||||
"end_slap1",
|
||||
"end_slap2",
|
||||
"end_slap3"
|
||||
]
|
||||
});
|
||||
self.outroSprite = new Sprite({
|
||||
image: Library.images.hong_bb_outro,
|
||||
grid:{ width:5, height:1 },
|
||||
frame:{ width:1000, height:1200 },
|
||||
};
|
||||
self.bg = new Sprite(BGSpriteConfig);
|
||||
self.bg_peeps = new Sprite(BGSpriteConfig);
|
||||
self.bg_peeps.gotoFrame(1);
|
||||
self.couch = new Sprite(BGSpriteConfig);
|
||||
self.couch.gotoFrame(3);
|
||||
self.alshire = new Sprite(BGSpriteConfig);
|
||||
self.alshire.gotoFrame(4);
|
||||
|
||||
// DEE & DUM
|
||||
self.dee = new Sprite({
|
||||
image: Library.images.dee,
|
||||
grid:{ width:4, height:2 },
|
||||
frame:{ width:400, height:400 },
|
||||
});
|
||||
self.dum = new Sprite({
|
||||
image: Library.images.dum,
|
||||
grid:{ width:4, height:2 },
|
||||
frame:{ width:400, height:400 },
|
||||
});
|
||||
self.dee.y = self.dum.y = 275;
|
||||
|
||||
// HUNTER & HONG SPRITES
|
||||
self.party_hunter = new Sprite({
|
||||
image: Library.images.party_hunter,
|
||||
grid:{ width:4, height:6 },
|
||||
frame:{ width:720, height:500 },
|
||||
});
|
||||
self.party_hunter.y = 217;
|
||||
self.party_hong = new Sprite({
|
||||
image: Library.images.party_hong,
|
||||
grid:{ width:6, height:7 },
|
||||
frame:{ width:720, height:500 },
|
||||
});
|
||||
self.party_hong.y = 258.5;
|
||||
self.party_hong.gotoFrame(0);
|
||||
|
||||
// HONG & BB FINALE
|
||||
self.act2_end = new Sprite({
|
||||
image: Library.images.act2_end,
|
||||
grid:{ width:6, height:3 },
|
||||
frame:{ width:720, height:400 },
|
||||
y: 260,
|
||||
frameNames:[
|
||||
"end1",
|
||||
"end2",
|
||||
"end3",
|
||||
"end4",
|
||||
"end5",
|
||||
"end6"
|
||||
]
|
||||
y: 260
|
||||
});
|
||||
|
||||
// Anxiety BG
|
||||
|
@ -63,33 +82,92 @@ function BG_Party(){
|
|||
|
||||
// LAYERS
|
||||
self.layers = [
|
||||
self.bgSprite,
|
||||
|
||||
self.bg,
|
||||
self.bg_peeps,
|
||||
self.dee,
|
||||
self.dum,
|
||||
self.party_hunter,
|
||||
|
||||
self.anxiety,
|
||||
self.partyActionSprite,
|
||||
self.outroSprite,
|
||||
self.party_hong,
|
||||
|
||||
self.hong,
|
||||
self.beebee,
|
||||
self.act2_end,
|
||||
|
||||
self.couch,
|
||||
self.alshire
|
||||
|
||||
];
|
||||
var PARALLAXES = [
|
||||
0.5, // party bg
|
||||
|
||||
0.1, // party bg
|
||||
0.5, // party bg peeps
|
||||
0.9, // dee
|
||||
0.9, // dum
|
||||
1.0, // hunter (at first...)
|
||||
|
||||
0.0, // anxiety bg
|
||||
1.0, // PARTY ACTION SPRITE
|
||||
0.0, // OUTRO hong & bb
|
||||
|
||||
1.0, // party hong
|
||||
|
||||
0.0, // battle hong
|
||||
0.0, // battle beebee
|
||||
1.0, // battle beebee
|
||||
0.0, // act2 end
|
||||
|
||||
2.1, // couch
|
||||
2.2, // al shire
|
||||
|
||||
];
|
||||
var OFFSETS = [
|
||||
|
||||
0, // party bg
|
||||
0, // party bg peeps
|
||||
0, // dee
|
||||
0, // dum
|
||||
0, // hunter (at first...)
|
||||
|
||||
0, // anxiety bg
|
||||
|
||||
20, // party hong
|
||||
|
||||
0, // battle hong
|
||||
240, // battle beebee
|
||||
0, // act2 end
|
||||
|
||||
0, // couch
|
||||
0, // al shire
|
||||
|
||||
];
|
||||
var ALPHAS = [
|
||||
|
||||
1.0, // party bg
|
||||
1.0, // party bg peeps
|
||||
1.0, // dee
|
||||
1.0, // dum
|
||||
1.0, // hunter (at first...)
|
||||
|
||||
0.0, // anxiety bg
|
||||
1.0, // PARTY ACTION SPRITE
|
||||
0.0, // OUTRO hong & bb
|
||||
|
||||
1.0, // party hong
|
||||
|
||||
0.0, // battle hong
|
||||
0.0, // battle beebee
|
||||
0.0, // act2 end
|
||||
|
||||
1.0, // couch
|
||||
1.0, // al shire
|
||||
|
||||
];
|
||||
|
||||
var parallax = 0;
|
||||
var parallaxTicker = 0;
|
||||
var PARALLAXING = null;
|
||||
var MAGIC_NUMBER = 230;
|
||||
var ticker = 0;
|
||||
var ticker2 = 0;
|
||||
var ticker3 = 0;
|
||||
self.update = function(){
|
||||
|
||||
// START PARALLAXING IN / OUT
|
||||
|
@ -107,10 +185,10 @@ function BG_Party(){
|
|||
// 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*210;
|
||||
parallax = -t*MAGIC_NUMBER; // MAGIC NUMBER
|
||||
|
||||
// Anxiety Alpha
|
||||
ALPHAS[1] = t;
|
||||
ALPHAS[5] = t;
|
||||
|
||||
// DONE
|
||||
if(t==1 || t==0){
|
||||
|
@ -118,15 +196,26 @@ function BG_Party(){
|
|||
|
||||
// Stage 1 or 3 transition end
|
||||
if(STAGE==1 || STAGE==3){
|
||||
ALPHAS[2] = 0; // Party Action
|
||||
ALPHAS[4] = 1; // Hong
|
||||
ALPHAS[5] = 1; // Beebee
|
||||
ALPHAS[6] = 0; // HIDE Party Hong
|
||||
ALPHAS[7] = 1; // SHOW Battle Hong
|
||||
}
|
||||
|
||||
// Stage 2 end
|
||||
if(STAGE==2){
|
||||
ALPHAS[8] = 0; // HIDE Battle Beebee
|
||||
}
|
||||
|
||||
// Stage 4 end
|
||||
if(STAGE==4){
|
||||
ticker = 0;
|
||||
self.party_hong.gotoFrame(26);
|
||||
}
|
||||
|
||||
// Stage 5 transition end
|
||||
if(STAGE==5){
|
||||
ALPHAS[2] = 0; // Party Action
|
||||
ALPHAS[3] = 1; // OUTRO Action
|
||||
ALPHAS[6] = 0; // HIDE Party Hong
|
||||
ALPHAS[9] = 1; // SHOW End
|
||||
self.act2_end.gotoFrame(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -134,15 +223,83 @@ function BG_Party(){
|
|||
}
|
||||
|
||||
// Anxiety BG
|
||||
if(ALPHAS[1]>0){
|
||||
self.anxiety.update(ALPHAS[1]);
|
||||
if(ALPHAS[1]==1){ // if fully visible...
|
||||
ALPHAS[0] = 0; // hide everything under
|
||||
if(ALPHAS[5]>0){
|
||||
self.anxiety.update(ALPHAS[5]);
|
||||
if(ALPHAS[5]==1){ // if fully visible...
|
||||
// hide everything under
|
||||
ALPHAS[0] = 0;
|
||||
ALPHAS[1] = 0;
|
||||
ALPHAS[2] = 0;
|
||||
ALPHAS[3] = 0;
|
||||
ALPHAS[4] = 0;
|
||||
}else{
|
||||
ALPHAS[0] = 1; // show everything under
|
||||
// show everything under
|
||||
ALPHAS[0] = 1;
|
||||
ALPHAS[1] = 1;
|
||||
ALPHAS[2] = 1;
|
||||
ALPHAS[3] = 1;
|
||||
ALPHAS[4] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// SUPER HACKY - ANIMATE PARTY-HONG
|
||||
if(self.party_hong.currentFrame>=5 && self.party_hong.currentFrame<11){
|
||||
if(ticker<1/20){
|
||||
ticker += 1/60;
|
||||
}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;
|
||||
}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;
|
||||
}else{
|
||||
ticker = 0;
|
||||
if(self.party_hong.currentFrame==39){
|
||||
self.party_hong.gotoFrame(36);
|
||||
}else{
|
||||
self.party_hong.nextFrame();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ticker = 0;
|
||||
}
|
||||
|
||||
// SUPER HACKY - ANIMATE PARTY-HUNTER
|
||||
if(self.party_hunter.currentFrame>=19 && self.party_hunter.currentFrame<=20){
|
||||
if(ticker2<1/3){
|
||||
ticker2 += 1/60;
|
||||
}else{
|
||||
ticker2 = 0;
|
||||
if(self.party_hunter.currentFrame==20){
|
||||
self.party_hunter.gotoFrame(19);
|
||||
}else{
|
||||
self.party_hunter.nextFrame();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ticker2 = 0;
|
||||
}
|
||||
|
||||
// SUPER HACKER - ANIMATE THE END
|
||||
if(self.act2_end.currentFrame>=2 && self.act2_end.currentFrame<10){
|
||||
if(ticker3<1/15){
|
||||
ticker3 += 1/60;
|
||||
}else{
|
||||
ticker3 = 0;
|
||||
self.act2_end.nextFrame();
|
||||
}
|
||||
}else{
|
||||
ticker3 = 0;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
self.draw = function(ctx){
|
||||
|
@ -151,7 +308,7 @@ function BG_Party(){
|
|||
|
||||
for(var i=0; i<self.layers.length; i++){
|
||||
var layer = self.layers[i];
|
||||
layer.x = PARALLAXES[i] * parallax;// - OFFSETS[i];
|
||||
layer.x = PARALLAXES[i] * parallax + OFFSETS[i];
|
||||
if(ALPHAS[i]>0){
|
||||
ctx.globalAlpha = ALPHAS[i];
|
||||
layer.draw(ctx);
|
||||
|
@ -165,17 +322,37 @@ function BG_Party(){
|
|||
var STAGE = 0;
|
||||
var _subscriptions = [];
|
||||
_subscriptions.push(
|
||||
subscribe("act2", function(thing, frame){
|
||||
self[thing].gotoFrame(frame);
|
||||
}),
|
||||
subscribe("act2-out-1", function(){
|
||||
|
||||
// ANIMATE PARTY HONG
|
||||
ticker = 0;
|
||||
self.party_hong.gotoFrame(5);
|
||||
|
||||
STAGE = 1;
|
||||
PARALLAXING = "out";
|
||||
sfx("whoosh"); // WHOOSH
|
||||
ALPHAS[8] = 1; // SHOW Battle Beebee
|
||||
}),
|
||||
subscribe("act2-in-2", function(){
|
||||
|
||||
// SHOW ACTION, HIDE CHARS
|
||||
ALPHAS[2] = 1; // Party Action
|
||||
ALPHAS[4] = 0; // Hong
|
||||
ALPHAS[5] = 0; // Beebee
|
||||
MAGIC_NUMBER = 210;
|
||||
OFFSETS[8] = 220; // BB
|
||||
|
||||
// Dee & Dum! And Al-Shire is gone. And BG peeps change
|
||||
self.dee.gotoFrame(4);
|
||||
self.dum.gotoFrame(4);
|
||||
self.bg_peeps.gotoFrame(2);
|
||||
self.alshire.visible = false;
|
||||
|
||||
// Party Hong
|
||||
self.party_hunter.gotoFrame(2); // talk
|
||||
self.party_hong.gotoFrame(12); // look left
|
||||
|
||||
ALPHAS[6] = 1; // SHOW Party Hong
|
||||
ALPHAS[7] = 0; // HIDE Battle Hong
|
||||
|
||||
// WHOOSH
|
||||
STAGE = 2;
|
||||
|
@ -184,16 +361,29 @@ function BG_Party(){
|
|||
|
||||
}),
|
||||
subscribe("act2-out-3", function(){
|
||||
|
||||
MAGIC_NUMBER = 150;
|
||||
PARALLAXES[10] = 3.2; // COUCH
|
||||
OFFSETS[8] = 170; // BB
|
||||
|
||||
STAGE = 3;
|
||||
PARALLAXING = "out";
|
||||
sfx("whoosh"); // WHOOSH
|
||||
ALPHAS[8] = 1; // SHOW Battle Beebee
|
||||
}),
|
||||
subscribe("act2-in-4", function(){
|
||||
|
||||
// SHOW ACTION, HIDE CHARS
|
||||
ALPHAS[2] = 1; // Party Action
|
||||
ALPHAS[4] = 0; // Hong
|
||||
ALPHAS[5] = 0; // Beebee
|
||||
// Dee & Dum
|
||||
self.dee.gotoFrame(5);
|
||||
self.dum.gotoFrame(5);
|
||||
|
||||
// Party Hunter & Hong
|
||||
self.party_hunter.gotoFrame(13); // disappointed
|
||||
self.party_hong.gotoFrame(25); // shocked
|
||||
|
||||
ALPHAS[6] = 1; // SHOW Party Hong
|
||||
ALPHAS[7] = 0; // HIDE Battle Hong
|
||||
ALPHAS[8] = 0; // HIDE Battle Beebee
|
||||
|
||||
// WHOOSH
|
||||
STAGE = 4;
|
||||
|
@ -202,15 +392,18 @@ function BG_Party(){
|
|||
|
||||
}),
|
||||
subscribe("act2-out-5", function(){
|
||||
|
||||
// RUN FAST, PARALLAX
|
||||
PARALLAXES[0] *= 3;
|
||||
PARALLAXES[1] *= 3;
|
||||
PARALLAXES[2] *= 3;
|
||||
PARALLAXES[3] *= 3;
|
||||
PARALLAXES[4] *= 3;
|
||||
PARALLAXES[10] *= 3;
|
||||
|
||||
STAGE = 5;
|
||||
PARALLAXING = "out";
|
||||
}),
|
||||
subscribe("act2-party-action", function(frameName){
|
||||
self.partyActionSprite.gotoFrameByName(frameName);
|
||||
}),
|
||||
subscribe("act2-outro", function(frameName){
|
||||
self.outroSprite.gotoFrameByName(frameName);
|
||||
}),
|
||||
subscribe("show_special_attack", function(){
|
||||
var dom = $("#special_attack");
|
||||
dom.setAttribute("attack", _.SPECIAL_ATTACK);
|
||||
|
|
|
@ -10,33 +10,105 @@ function Act2_Beebee(){
|
|||
var spriteConfig = {
|
||||
image: Library.images.act2_bb,
|
||||
grid:{
|
||||
width: 4,
|
||||
height: 3
|
||||
width: 10,
|
||||
height: 8
|
||||
},
|
||||
frame:{
|
||||
width: 720,
|
||||
height: 400
|
||||
height: 500
|
||||
},
|
||||
anchor:{
|
||||
x: 306,
|
||||
y: 188
|
||||
x: 292.5,
|
||||
y: 249.4
|
||||
},
|
||||
frameNames:[
|
||||
"body_neutral*",
|
||||
"body_sad*",
|
||||
"body_happy*",
|
||||
"body_yell*",
|
||||
"body_cry*",
|
||||
"body_shock*",
|
||||
|
||||
"body_normal",
|
||||
"body_two_up",
|
||||
"body_chest",
|
||||
"body_point",
|
||||
"body_one_up",
|
||||
"body_scream_a_1*",
|
||||
"body_scream_a_2*",
|
||||
"mouth_shocked",
|
||||
"mouth_small",
|
||||
"mouth_small_talk",
|
||||
|
||||
"mouth_normal",
|
||||
"mouth_normal_talk",
|
||||
"mouth_smile",
|
||||
"mouth_smile_talk",
|
||||
"eyes_normal",
|
||||
"eyes_normal_r",
|
||||
"eyes_suspect",
|
||||
"eyes_suspect_r",
|
||||
"eyes_sad",
|
||||
"eyes_sad_r",
|
||||
|
||||
"eyes_shock",
|
||||
"eyes_happy",
|
||||
"eyes_happy_r",
|
||||
"eyes_closed",
|
||||
"eyes_judge",
|
||||
"body_judge_1",
|
||||
"body_judge_2",
|
||||
"body_scream_b_1*",
|
||||
"body_scream_b_2*",
|
||||
"body_scream_c_1*",
|
||||
|
||||
"body_scream_c_2*",
|
||||
"body_cry_1*",
|
||||
"body_cry_2*",
|
||||
"body_cry_3*",
|
||||
"body_cry_4",
|
||||
"mouth_cry_talk",
|
||||
"mouth_cry",
|
||||
"eyes_cry",
|
||||
"eyes_cry_2",
|
||||
"body_cry_5*",
|
||||
|
||||
"body_cry_6",
|
||||
"mouth_right",
|
||||
"mouth_right_talk",
|
||||
"eyes_cry_r_1",
|
||||
"eyes_cry_r_2",
|
||||
"eyes_cry_r_3",
|
||||
"eyes_cry_r_4",
|
||||
"mouth_blank", // BLANK
|
||||
"eyes_blank", // BLANK
|
||||
"eyes_asdf",
|
||||
|
||||
"eyes_angry",
|
||||
"eyes_sad_2",
|
||||
"eyes_wat",
|
||||
"body_attacked*",
|
||||
"body_pained*",
|
||||
"body_special_1*",
|
||||
"body_special_2*",
|
||||
"eyes_blank",
|
||||
"mouth_blank",
|
||||
"body_frazzled",
|
||||
"mouth_frazzled_talk",
|
||||
"mouth_frazzled",
|
||||
"eyes_frazzled",
|
||||
"body_panicked",
|
||||
"mouth_panicked",
|
||||
|
||||
"mouth_panicked_talk",
|
||||
"eyes_panicked",
|
||||
"body_special_a*",
|
||||
"body_special_b_1*",
|
||||
"body_special_b_2*",
|
||||
"body_special_b_3*",
|
||||
"body_special_c*",
|
||||
"body_final_1*",
|
||||
"body_final_2*",
|
||||
"body_final_3*",
|
||||
|
||||
"body_final_4*",
|
||||
"body_yell_1*",
|
||||
"body_yell_2*",
|
||||
"body_yell_angry_1*",
|
||||
"body_yell_angry_2*"
|
||||
|
||||
],
|
||||
x: 306,
|
||||
y: 258+188
|
||||
x: 292.5 - 10,
|
||||
y: 470 + 2 // hack
|
||||
};
|
||||
|
||||
// ANIM LOOPS
|
||||
|
@ -44,12 +116,13 @@ function Act2_Beebee(){
|
|||
|
||||
// Inherit from Character!
|
||||
Character.apply(self, [spriteConfig, animLoops]);
|
||||
self.ALLOW_PARALLAX = true;
|
||||
|
||||
// Go To Frames!
|
||||
self.gotoFrames({
|
||||
body: "neutral",
|
||||
mouth: "blank",
|
||||
eyes: "blank",
|
||||
body: "normal",
|
||||
mouth: "normal",
|
||||
eyes: "normal",
|
||||
});
|
||||
var _subscriptions = [];
|
||||
_subscriptions.push( subscribe("bb", self.gotoFrames) );
|
||||
|
@ -66,6 +139,13 @@ function Act2_Beebee(){
|
|||
// Vibration!
|
||||
ticker += 1/60;
|
||||
self.characterSquash = 1 + Math.sin(ticker*Math.TAU*7)*0.01; // seven vibes per second
|
||||
|
||||
// TOTAL HACK
|
||||
if(self.layers.body.currentFrameName=="body_special_c*"){
|
||||
self.characterSquash = 1; // TOTAL HACK
|
||||
self.bounce = 1;
|
||||
self.bounceVel = 0;
|
||||
}
|
||||
|
||||
// Old Draw
|
||||
_oldDraw.apply(self, arguments);
|
||||
|
|
|
@ -10,32 +10,63 @@ function Act2_Hong(){
|
|||
var spriteConfig = {
|
||||
image: Library.images.act2_hong,
|
||||
grid:{
|
||||
width: 4,
|
||||
height: 3
|
||||
width: 6,
|
||||
height: 6
|
||||
},
|
||||
frame:{
|
||||
width: 720,
|
||||
width: 400,
|
||||
height: 400
|
||||
},
|
||||
anchor:{
|
||||
x: 66,
|
||||
y: 188
|
||||
x: 78,
|
||||
y: 200
|
||||
},
|
||||
frameNames:[
|
||||
|
||||
"body_ignore*",
|
||||
"body_ignore_sweat*",
|
||||
"body_attacked*",
|
||||
"body_yell*",
|
||||
"body_cry*",
|
||||
"body_hold_alcohol*",
|
||||
"body_drinking*",
|
||||
"body_drunk*",
|
||||
"body_attacked_2*",
|
||||
"body_attacked_3*",
|
||||
"body_facepalm*",
|
||||
|
||||
"body_facepalm_2*",
|
||||
"body_facepalm_3*",
|
||||
"body_smile",
|
||||
"mouth_smile",
|
||||
"mouth_smile_talk",
|
||||
"body_yell",
|
||||
|
||||
"mouth_yell",
|
||||
"mouth_yell_talk",
|
||||
"body_cross",
|
||||
"mouth_cross",
|
||||
"mouth_cross_talk",
|
||||
"body_defeated*",
|
||||
"mouth_blank",
|
||||
"eyes_blank",
|
||||
|
||||
"body_listen*",
|
||||
"body_look*",
|
||||
"mouth_blank", // BLANK!
|
||||
"eyes_blank", // BLANK!
|
||||
"eyes_asdf",
|
||||
"eyes_omfg",
|
||||
|
||||
"body_hold*",
|
||||
"body_drink*",
|
||||
"body_forward",
|
||||
"mouth_forward",
|
||||
"mouth_forward_talk",
|
||||
"body_back",
|
||||
|
||||
"mouth_back",
|
||||
"mouth_back_talk",
|
||||
"body_final",
|
||||
"mouth_final",
|
||||
"mouth_final_talk",
|
||||
|
||||
],
|
||||
x: 66,
|
||||
y: 258+188
|
||||
x: 65 + 10,
|
||||
y: 470 + 2
|
||||
};
|
||||
|
||||
// ANIM LOOPS
|
||||
|
@ -49,7 +80,7 @@ function Act2_Hong(){
|
|||
body: "ignore",
|
||||
mouth: "blank",
|
||||
eyes: "blank",
|
||||
});
|
||||
}, 0); // zero bounce
|
||||
var _subscriptions = [];
|
||||
_subscriptions.push( subscribe("hong", self.gotoFrames) );
|
||||
_subscriptions.push( subscribe("attack_hong", self.showAttackedIcon) );
|
||||
|
|
|
@ -103,14 +103,21 @@ function Character(spriteConfig, animLoops){
|
|||
// Draw
|
||||
self.characterSpeakerID = "derp";
|
||||
self.characterSquash = 1;
|
||||
self.ALLOW_PARALLAX = false;
|
||||
self.x = -1337;
|
||||
self.draw = function(ctx){
|
||||
|
||||
var fname;
|
||||
var l = self.layers;
|
||||
var c = self.characterFrames;
|
||||
|
||||
// Attacked? SHAKE WHOLE CONTEXT
|
||||
// ALLOW PARALLAX???
|
||||
ctx.save();
|
||||
if(self.ALLOW_PARALLAX){
|
||||
ctx.translate(self.x, 0);
|
||||
}
|
||||
|
||||
// Attacked? SHAKE WHOLE CONTEXT
|
||||
if(IVE_BEEN_ATTACKED){
|
||||
var shakeDuration = 0.6;
|
||||
if(attackedTimer<shakeDuration){
|
||||
|
|
|
@ -4,7 +4,7 @@ Loader.addScenes([
|
|||
"scenes/intro.md",
|
||||
"scenes/act1.md",
|
||||
"scenes/intermission.md",
|
||||
"scenes/act2.md",
|
||||
"scenes/act2_test.md",
|
||||
"scenes/act3.md",
|
||||
"scenes/act4.md",
|
||||
"scenes/credits.md"
|
||||
|
@ -35,11 +35,11 @@ subscribe("START_GAME", function(){
|
|||
$("#about").style.display = "block";
|
||||
|
||||
// Act 2
|
||||
//_ = {"CHAPTER":1,"attack_harm_ch1":3,"attack_alone_ch1":2,"attack_bad_ch1":1,"whitebread":true,"partyinvite":"ignore","subtweet":true,"serialkiller":true,"act1g":"dont","act1_ending":"flight","INTERMISSION_STAGE":1};
|
||||
//Game.goto("act2");
|
||||
_ = {"CHAPTER":1,"attack_harm_ch1":3,"attack_alone_ch1":2,"attack_bad_ch1":1,"whitebread":true,"partyinvite":"ignore","subtweet":true,"serialkiller":true,"act1g":"dont","act1_ending":"flight","INTERMISSION_STAGE":1};
|
||||
Game.goto("act2");
|
||||
//Game.goto("act4");
|
||||
|
||||
Game.goto("intro");
|
||||
//Game.goto("intro");
|
||||
|
||||
});
|
||||
|
||||
|
|
Before Width: | Height: | Size: 756 KiB After Width: | Height: | Size: 741 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 393 KiB After Width: | Height: | Size: 394 KiB |
Before Width: | Height: | Size: 329 KiB After Width: | Height: | Size: 329 KiB |