ng release

This commit is contained in:
Brandon 2020-11-02 01:46:37 -05:00
parent 0590fc59b6
commit 07acc53888
5 changed files with 58 additions and 8 deletions

View file

@ -3,3 +3,4 @@
This is the repository for Friday Night Funkin, a game originally made for Ludum Dare 47 "Stuck In a Loop".
Play the Ludum Dare prototype here: https://ninja-muffin24.itch.io/friday-night-funkin
Play the Newgrounds one here: https://www.newgrounds.com/portal/view/770371

View file

@ -30,6 +30,8 @@ class Boyfriend extends Character
animation.addByPrefix('firstDeath', "BF dies", 24, false);
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true);
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false);
animation.addByPrefix('scared', 'BF idle shaking', 24);
playAnim('idle');
antialiasing = true;
@ -47,6 +49,7 @@ class Boyfriend extends Character
addOffset('firstDeath', 37, 11);
addOffset('deathLoop', 37, 5);
addOffset('deathConfirm', 37, 69);
addOffset('scared', -4);
}
override function update(elapsed:Float)

View file

@ -24,7 +24,6 @@ class Character extends FlxSprite
switch (curCharacter)
{
case 'bf':
case 'gf':
// GIRLFRIEND CODE
tex = FlxAtlasFrames.fromSparrow(AssetPaths.GF_assets__png, AssetPaths.GF_assets__xml);
@ -38,6 +37,8 @@ class Character extends FlxSprite
animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
animation.addByPrefix('scared', 'GF FEAR', 24);
addOffset('cheer');
addOffset('sad', -2, -2);
addOffset('danceLeft', 0, -9);
@ -48,6 +49,8 @@ class Character extends FlxSprite
addOffset("singLEFT", 0, -19);
addOffset("singDOWN", 0, -20);
addOffset('scared');
playAnim('danceRight');
case 'dad':
@ -112,6 +115,8 @@ class Character extends FlxSprite
{
switch (curCharacter)
{
case 'bf':
case 'gf':
danced = !danced;

View file

@ -20,7 +20,13 @@ class FreeplayState extends MusicBeatState
if (!FlxG.sound.music.playing)
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
if (StoryMenuState.weekUnlocked[1])
var isDebug:Bool = false;
#if debug
isDebug = true;
#end
if (StoryMenuState.weekUnlocked[1] || isDebug)
{
songs.push('Spookeez');
songs.push('South');

View file

@ -78,6 +78,7 @@ class PlayState extends MusicBeatState
var dialogue:Array<String> = ['blah blah blah', 'coolswag'];
var halloweenBG:FlxSprite;
var isHalloween:Bool = false;
var talking:Bool = true;
var songScore:Int = 0;
@ -136,6 +137,8 @@ class PlayState extends MusicBeatState
halloweenBG.animation.play('idle');
halloweenBG.antialiasing = true;
add(halloweenBG);
isHalloween = true;
}
else
{
@ -600,7 +603,8 @@ class PlayState extends MusicBeatState
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
// FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight);
healthHeads.setGraphicSize(Std.int(FlxMath.lerp(100, healthHeads.width, 0.98)));
healthHeads.setGraphicSize(Std.int(FlxMath.lerp(150, healthHeads.width, 0.50)));
healthHeads.updateHitbox();
healthHeads.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (healthHeads.width / 2);
if (health > 2)
@ -613,8 +617,11 @@ class PlayState extends MusicBeatState
/* if (FlxG.keys.justPressed.NINE)
FlxG.switchState(new Charting()); */
// if (FlxG.keys.justPressed.EIGHT)
// FlxG.switchState(new AnimationDebug(SONG.player2));
#if debug
if (FlxG.keys.justPressed.EIGHT)
FlxG.switchState(new AnimationDebug(SONG.player1));
#end
if (startingSong)
{
@ -678,7 +685,8 @@ class PlayState extends MusicBeatState
if (camZooming)
{
FlxG.camera.zoom = FlxMath.lerp(1.05, FlxG.camera.zoom, 0.96);
FlxG.camera.zoom = FlxMath.lerp(1.05, FlxG.camera.zoom, 0.95);
camHUD.zoom = FlxMath.lerp(1, camHUD.zoom, 0.95);
}
FlxG.watch.addQuick("beatShit", totalBeats);
@ -760,6 +768,9 @@ class PlayState extends MusicBeatState
if (!daNote.mustPress && daNote.wasGoodHit)
{
if (SONG.song != 'Tutorial')
camZooming = true;
switch (Math.abs(daNote.noteData))
{
case 2:
@ -1247,6 +1258,18 @@ class PlayState extends MusicBeatState
}
}
function lightningStrikeShit():Void
{
FlxG.sound.play('assets/sounds/thunder_' + FlxG.random.int(1, 2) + TitleState.soundExt);
halloweenBG.animation.play('lightning');
lightningStrikeBeat = curBeat;
lightningOffset = FlxG.random.int(8, 24);
boyfriend.playAnim('scared', true);
gf.playAnim('scared', true);
}
override function stepHit()
{
if (SONG.needsVoices)
@ -1268,6 +1291,9 @@ class PlayState extends MusicBeatState
super.stepHit();
}
var lightningStrikeBeat:Int = 0;
var lightningOffset:Int = 8;
override function beatHit()
{
super.beatHit();
@ -1294,9 +1320,13 @@ class PlayState extends MusicBeatState
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
if (camZooming && FlxG.camera.zoom < 1.35 && totalBeats % 4 == 0)
FlxG.camera.zoom += 0.025;
{
FlxG.camera.zoom += 0.015;
camHUD.zoom += 0.03;
}
healthHeads.setGraphicSize(Std.int(healthHeads.width + 20));
healthHeads.setGraphicSize(Std.int(healthHeads.width + 30));
healthHeads.updateHitbox();
if (totalBeats % gfSpeed == 0)
{
@ -1315,5 +1345,10 @@ class PlayState extends MusicBeatState
dad.playAnim('cheer', true);
}
}
if (isHalloween && FlxG.random.bool(10) && curBeat > lightningStrikeBeat + lightningOffset)
{
lightningStrikeShit();
}
}
}