1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-27 01:03:35 +00:00

Merge branch 'master' into deferred_loading

This commit is contained in:
George FunBook 2021-02-15 15:30:29 -06:00
commit 5b84e136fc
8 changed files with 229 additions and 114 deletions

View file

@ -4,11 +4,21 @@ All notable changes will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased]
## [0.2.7.1] - 2021-02-14
### Added
- Easter eggs
- readme's in desktop versions of the game
### Changed
- New icons, old one was placeholder since October woops!
- Made the transitions between the story mode levels more seamless.
- Offset of the Newgrounds logo on boot screen.
- Made the changelog txt so it can be opened easier by normal people who don't have a markdown reader (most normal people);
### Fixed
- Fixed crashes on Week 6 story mode dialogue if spam too fast ([Thanks to Lotusotho for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/357))
- Should show intro credits on desktop versions of the game more consistently
- Layering on Week 4 songs with GF and the LIMO LOL HOW TF I MISS THIS
- Chart's and chart editor now support changeBPM, GOD BLESS MTH FOR THIS ONE I BEEN STRUGGLIN WIT THAT SINCE OCTOBER LMAO ([GOD BLESS MTH](https://github.com/ninjamuffin99/Funkin/pull/382))
- Fixed sustain note trails ALSO THANKS TO MTH U A REAL ONE ([MTH VERY POWERFUL](https://github.com/ninjamuffin99/Funkin/pull/415))
- Antialiasing on the skyscraper lights
## [0.2.7] - 2021-02-02

View file

@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->
<app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.7" company="ninjamuffin99" />
<app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.7.1" company="ninjamuffin99" />
<!--Switch Export with Unique ApplicationID and Icon-->
<set name="APP_ID" value="0x0100f6c013bbc000" />
@ -91,9 +91,10 @@
<assets path="assets/week6" library="week6" exclude="*.mp3" unless="web"/>
<assets path='example_mods' rename='mods' embed='false'/>
<assets path='art/readme.txt' rename='do NOT readme.txt' />
<!-- <template path='mods' /> -->
<assets path="CHANGELOG.md"/>
<assets path="CHANGELOG.md" rename='changelog.txt'/>
<!-- NOTE FOR FUTURE SELF SINCE FONTS ARE ALWAYS FUCKY
TO FIX ONE OF THEM, I CONVERTED IT TO OTF. DUNNO IF YOU NEED TO
@ -158,7 +159,10 @@
<!-- _________________________________ Custom _______________________________ -->
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
<icon path="art/icon.png" />
<icon path="art/icon16.png" size='16'/>
<icon path="art/icon32.png" size='32'/>
<icon path="art/icon64.png" size='64'/>
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->

View file

@ -177,13 +177,13 @@ class DialogueBox extends FlxSpriteGroup
dialogueStarted = true;
}
if (FlxG.keys.justPressed.ANY)
if (FlxG.keys.justPressed.ANY && dialogueStarted == true)
{
remove(dialogue);
FlxG.sound.play(Paths.sound('clickText'), 0.8);
if (dialogueList[1] == null)
if (dialogueList[1] == null && dialogueList[0] != null)
{
if (!isEnding)
{
@ -215,7 +215,7 @@ class DialogueBox extends FlxSpriteGroup
startDialogue();
}
}
super.update(elapsed);
}
@ -224,7 +224,6 @@ class DialogueBox extends FlxSpriteGroup
function startDialogue():Void
{
cleanDialog();
// var theDialog:Alphabet = new Alphabet(0, 70, dialogueList[0], false, true);
// dialogue = theDialog;
// add(theDialog);

88
source/GitarooPause.hx Normal file
View file

@ -0,0 +1,88 @@
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
class GitarooPause extends MusicBeatState
{
var replayButton:FlxSprite;
var cancelButton:FlxSprite;
var replaySelect:Bool = false;
public function new():Void
{
super();
}
override function create()
{
if (FlxG.sound.music != null)
FlxG.sound.music.stop();
var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('pauseAlt/pauseBG'));
add(bg);
var bf:FlxSprite = new FlxSprite(0, 30);
bf.frames = Paths.getSparrowAtlas('pauseAlt/bfLol');
bf.animation.addByPrefix('lol', "funnyThing", 13);
bf.animation.play('lol');
add(bf);
bf.screenCenter(X);
replayButton = new FlxSprite(FlxG.width * 0.28, FlxG.height * 0.7);
replayButton.frames = Paths.getSparrowAtlas('pauseAlt/pauseUI');
replayButton.animation.addByPrefix('selected', 'bluereplay', 0, false);
replayButton.animation.appendByPrefix('selected', 'yellowreplay');
replayButton.animation.play('selected');
add(replayButton);
cancelButton = new FlxSprite(FlxG.width * 0.58, replayButton.y);
cancelButton.frames = Paths.getSparrowAtlas('pauseAlt/pauseUI');
cancelButton.animation.addByPrefix('selected', 'bluecancel', 0, false);
cancelButton.animation.appendByPrefix('selected', 'cancelyellow');
cancelButton.animation.play('selected');
add(cancelButton);
changeThing();
super.create();
}
override function update(elapsed:Float)
{
if (controls.LEFT_P || controls.RIGHT_P)
changeThing();
if (controls.ACCEPT)
{
if (replaySelect)
{
FlxG.switchState(new PlayState());
}
else
{
FlxG.switchState(new MainMenuState());
}
}
super.update(elapsed);
}
function changeThing():Void
{
replaySelect = !replaySelect;
if (replaySelect)
{
cancelButton.animation.curAnim.curFrame = 0;
replayButton.animation.curAnim.curFrame = 1;
}
else
{
cancelButton.animation.curAnim.curFrame = 1;
replayButton.animation.curAnim.curFrame = 0;
}
}
}

View file

@ -14,6 +14,8 @@ import io.newgrounds.objects.events.Result.GetVersionResult;
import lime.app.Application;
import openfl.display.Stage;
using StringTools;
/**
* MADE BY GEOKURELI THE LEGENED GOD HERO MVP
*/
@ -28,6 +30,7 @@ class NGio
public static var ngScoresLoaded(default, null):FlxSignal = new FlxSignal();
public static var GAME_VER:String = "";
public static var GAME_VER_NUMS:String = '';
public static var gotOnlineVer:Bool = false;
public static function noLogin(api:String)
@ -43,7 +46,8 @@ class NGio
{
var call = NG.core.calls.app.getCurrentVersion(GAME_VER).addDataHandler(function(response:Response<GetCurrentVersionResult>)
{
GAME_VER = response.result.data.current_version;
GAME_VER = response.result.data.currentVersion;
GAME_VER_NUMS = GAME_VER.split(" ")[0].trim();
trace('CURRENT NG VERSION: ' + GAME_VER);
gotOnlineVer = true;
});

View file

@ -53,33 +53,7 @@ class Note extends FlxSprite
switch (daStage)
{
case 'school':
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
animation.add('greenScroll', [6]);
animation.add('redScroll', [7]);
animation.add('blueScroll', [5]);
animation.add('purpleScroll', [4]);
if (isSustainNote)
{
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
animation.add('purpleholdend', [4]);
animation.add('greenholdend', [6]);
animation.add('redholdend', [7]);
animation.add('blueholdend', [5]);
animation.add('purplehold', [0]);
animation.add('greenhold', [2]);
animation.add('redhold', [3]);
animation.add('bluehold', [1]);
}
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
updateHitbox();
case 'schoolEvil': // COPY PASTED CUZ I AM LAZY
case 'school' | 'schoolEvil':
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
animation.add('greenScroll', [6]);
@ -176,18 +150,18 @@ class Note extends FlxSprite
{
switch (prevNote.noteData)
{
case 0:
prevNote.animation.play('purplehold');
case 1:
prevNote.animation.play('bluehold');
case 2:
prevNote.animation.play('greenhold');
case 3:
prevNote.animation.play('redhold');
case 1:
prevNote.animation.play('bluehold');
case 0:
prevNote.animation.play('purplehold');
}
prevNote.offset.y = -19;
prevNote.scale.y *= (2.25 * FlxMath.roundDecimal(PlayState.SONG.speed, 1));
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.updateHitbox();
// prevNote.setGraphicSize();
}
}

View file

@ -529,10 +529,6 @@ class PlayState extends MusicBeatState
gf = new Character(400, 130, gfVersion);
gf.scrollFactor.set(0.95, 0.95);
// Shitty layering but whatev it works LOL
if (curStage == 'limo')
add(limo);
dad = new Character(100, 100, SONG.player2);
var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y);
@ -614,6 +610,11 @@ class PlayState extends MusicBeatState
}
add(gf);
// Shitty layering but whatev it works LOL
if (curStage == 'limo')
add(limo);
add(dad);
add(boyfriend);
@ -1096,6 +1097,16 @@ class PlayState extends MusicBeatState
switch (Math.abs(i))
{
case 0:
babyArrow.x += Note.swagWidth * 0;
babyArrow.animation.add('static', [0]);
babyArrow.animation.add('pressed', [4, 8], 12, false);
babyArrow.animation.add('confirm', [12, 16], 24, false);
case 1:
babyArrow.x += Note.swagWidth * 1;
babyArrow.animation.add('static', [1]);
babyArrow.animation.add('pressed', [5, 9], 12, false);
babyArrow.animation.add('confirm', [13, 17], 24, false);
case 2:
babyArrow.x += Note.swagWidth * 2;
babyArrow.animation.add('static', [2]);
@ -1106,16 +1117,6 @@ class PlayState extends MusicBeatState
babyArrow.animation.add('static', [3]);
babyArrow.animation.add('pressed', [7, 11], 12, false);
babyArrow.animation.add('confirm', [15, 19], 24, false);
case 1:
babyArrow.x += Note.swagWidth * 1;
babyArrow.animation.add('static', [1]);
babyArrow.animation.add('pressed', [5, 9], 12, false);
babyArrow.animation.add('confirm', [13, 17], 24, false);
case 0:
babyArrow.x += Note.swagWidth * 0;
babyArrow.animation.add('static', [0]);
babyArrow.animation.add('pressed', [4, 8], 12, false);
babyArrow.animation.add('confirm', [12, 16], 24, false);
}
default:
@ -1130,6 +1131,16 @@ class PlayState extends MusicBeatState
switch (Math.abs(i))
{
case 0:
babyArrow.x += Note.swagWidth * 0;
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
case 1:
babyArrow.x += Note.swagWidth * 1;
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
case 2:
babyArrow.x += Note.swagWidth * 2;
babyArrow.animation.addByPrefix('static', 'arrowUP');
@ -1140,16 +1151,6 @@ class PlayState extends MusicBeatState
babyArrow.animation.addByPrefix('static', 'arrowRIGHT');
babyArrow.animation.addByPrefix('pressed', 'right press', 24, false);
babyArrow.animation.addByPrefix('confirm', 'right confirm', 24, false);
case 1:
babyArrow.x += Note.swagWidth * 1;
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
case 0:
babyArrow.x += Note.swagWidth * 0;
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
}
}
@ -1469,7 +1470,14 @@ class PlayState extends MusicBeatState
vocals.stop();
FlxG.sound.music.stop();
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
// 1 / 1000 chance for Gitaroo Man easter egg
if (FlxG.random.bool(0.1))
{
// gitaroo man easter egg
FlxG.switchState(new GitarooPause());
}
else
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
}
@ -1501,6 +1509,20 @@ class PlayState extends MusicBeatState
daNote.active = true;
}
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
// i am so fucking sorry for this if condition
if (daNote.isSustainNote
&& daNote.y + daNote.offset.y <= strumLine.y + Note.swagWidth / 2
&& (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))))
{
var swagRect = new FlxRect(0, strumLine.y + Note.swagWidth / 2 - daNote.y, daNote.width * 2, daNote.height * 2);
swagRect.y /= daNote.scale.y;
swagRect.height -= swagRect.y;
daNote.clipRect = swagRect;
}
if (!daNote.mustPress && daNote.wasGoodHit)
{
if (SONG.song != 'Tutorial')
@ -1516,14 +1538,14 @@ class PlayState extends MusicBeatState
switch (Math.abs(daNote.noteData))
{
case 0:
dad.playAnim('singLEFT' + altAnim, true);
case 1:
dad.playAnim('singDOWN' + altAnim, true);
case 2:
dad.playAnim('singUP' + altAnim, true);
case 3:
dad.playAnim('singRIGHT' + altAnim, true);
case 1:
dad.playAnim('singDOWN' + altAnim, true);
case 0:
dad.playAnim('singLEFT' + altAnim, true);
}
dad.holdTimer = 0;
@ -1536,25 +1558,32 @@ class PlayState extends MusicBeatState
daNote.destroy();
}
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(PlayState.SONG.speed, 2)));
// WIP interpolation shit? Need to fix the pause issue
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
if (daNote.y < -daNote.height)
{
if (daNote.tooLate || !daNote.wasGoodHit)
if (daNote.isSustainNote && daNote.wasGoodHit)
{
health -= 0.0475;
vocals.volume = 0;
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
}
else
{
if (daNote.tooLate || !daNote.wasGoodHit)
{
health -= 0.0475;
vocals.volume = 0;
}
daNote.active = false;
daNote.visible = false;
daNote.active = false;
daNote.visible = false;
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
}
}
});
}
@ -1934,18 +1963,18 @@ class PlayState extends MusicBeatState
switch (daNote.noteData)
{
// NOTES YOU ARE HOLDING
case 0:
if (left)
goodNoteHit(daNote);
case 1:
if (down)
goodNoteHit(daNote);
case 2:
if (up)
goodNoteHit(daNote);
case 3:
if (right)
goodNoteHit(daNote);
case 1:
if (down)
goodNoteHit(daNote);
case 0:
if (left)
goodNoteHit(daNote);
}
}
});
@ -1963,6 +1992,16 @@ class PlayState extends MusicBeatState
{
switch (spr.ID)
{
case 0:
if (leftP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (leftR)
spr.animation.play('static');
case 1:
if (downP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (downR)
spr.animation.play('static');
case 2:
if (upP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
@ -1973,16 +2012,6 @@ class PlayState extends MusicBeatState
spr.animation.play('pressed');
if (rightR)
spr.animation.play('static');
case 1:
if (downP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (downR)
spr.animation.play('static');
case 0:
if (leftP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (leftR)
spr.animation.play('static');
}
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
@ -2023,14 +2052,14 @@ class PlayState extends MusicBeatState
switch (direction)
{
case 0:
boyfriend.playAnim('singLEFTmiss', true);
case 1:
boyfriend.playAnim('singDOWNmiss', true);
case 2:
boyfriend.playAnim('singUPmiss', true);
case 3:
boyfriend.playAnim('singRIGHTmiss', true);
case 1:
boyfriend.playAnim('singDOWNmiss', true);
case 0:
boyfriend.playAnim('singLEFTmiss', true);
}
}
}
@ -2046,12 +2075,12 @@ class PlayState extends MusicBeatState
if (leftP)
noteMiss(0);
if (downP)
noteMiss(1);
if (upP)
noteMiss(2);
if (rightP)
noteMiss(3);
if (downP)
noteMiss(1);
}
function noteCheck(keyP:Bool, note:Note):Void
@ -2081,14 +2110,14 @@ class PlayState extends MusicBeatState
switch (note.noteData)
{
case 0:
boyfriend.playAnim('singLEFT', true);
case 1:
boyfriend.playAnim('singDOWN', true);
case 2:
boyfriend.playAnim('singUP', true);
case 3:
boyfriend.playAnim('singRIGHT', true);
case 1:
boyfriend.playAnim('singDOWN', true);
case 0:
boyfriend.playAnim('singLEFT', true);
}
playerStrums.forEach(function(spr:FlxSprite)
@ -2102,9 +2131,12 @@ class PlayState extends MusicBeatState
note.wasGoodHit = true;
vocals.volume = 1;
note.kill();
notes.remove(note, true);
note.destroy();
if (!note.isSustainNote)
{
note.kill();
notes.remove(note, true);
note.destroy();
}
}
}

View file

@ -84,7 +84,10 @@ class TitleState extends MusicBeatState
#elseif CHARTING
FlxG.switchState(new ChartingState());
#else
startIntro();
new FlxTimer().start(1, function(tmr:FlxTimer)
{
startIntro();
});
#end
}
@ -219,7 +222,8 @@ class TitleState extends MusicBeatState
override function update(elapsed:Float)
{
Conductor.songPosition = FlxG.sound.music.time;
if (FlxG.sound.music != null)
Conductor.songPosition = FlxG.sound.music.time;
// FlxG.watch.addQuick('amp', FlxG.sound.music.amplitude);
if (FlxG.keys.justPressed.F)
@ -266,7 +270,7 @@ class TitleState extends MusicBeatState
var version:String = "v" + Application.current.meta.get('version');
if (version.trim() != NGio.GAME_VER.trim() && !OutdatedSubState.leftState)
if (version.trim() != NGio.GAME_VER_NUMS && !OutdatedSubState.leftState)
{
trace('OLD VERSION!');
FlxG.switchState(new OutdatedSubState());