From 157769b41a3f29f2e3eb618bc539355e7f4bd992 Mon Sep 17 00:00:00 2001 From: Cameron Taylor <cameron.taylor.ninja@gmail.com> Date: Sun, 18 Apr 2021 13:23:09 -0400 Subject: [PATCH 01/13] that pussy be yankin --- Project.xml | 2 +- source/MainMenuState.hx | 2 ++ source/PlayState.hx | 24 +++++++++++++++--------- source/TitleState.hx | 7 +++++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Project.xml b/Project.xml index 24396968b..cb9b6859b 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ <project> <!-- _________________________ Application Settings _________________________ --> - <app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" package="com.ninjamuffin99.funkin" main="Main" version="0.2.7.1" company="ninjamuffin99" /> + <app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" package="com.ninjamuffin99.funkin" main="Main" version="0.2.8" company="ninjamuffin99" /> <!--Switch Export with Unique ApplicationID and Icon--> <set name="APP_ID" value="0x0100f6c013bbc000" /> diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 6e8fb60ef..69972167b 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -128,6 +128,8 @@ class MainMenuState extends MusicBeatState versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); + versionShit.text += '(Newgrounds exclusive preview)'; + // NG.core.calls.event.logEvent('swag').send(); super.create(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 05ec046ac..79eb75c2f 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -563,7 +563,7 @@ class PlayState extends MusicBeatState tankGround = new BGSprite('tankRolling', 300, 300, 0.5, 0.5, ['BG tank w lighting'], true); add(tankGround); - tankGround.active = false; + // tankGround.active = false; tankmanRun = new FlxTypedGroup<TankmenBG>(); add(tankmanRun); @@ -653,6 +653,11 @@ class PlayState extends MusicBeatState { if (FlxG.random.bool(16)) { + var tempTankman:TankmenBG = new TankmenBG(20, 500, true); + tempTankman.strumTime = 10; + tempTankman.resetShit(20, 600, true); + tankmanRun.add(tempTankman); + var tankman:TankmenBG = tankmanRun.recycle(TankmenBG); // new TankmenBG(500, 200 + FlxG.random.int(50, 100), TankmenBG.animationNotes[i][1] < 2); tankman.strumTime = TankmenBG.animationNotes[i][0]; @@ -934,8 +939,12 @@ class PlayState extends MusicBeatState switch (curSong.toLowerCase()) { // REMOVE THIS LATER - case 'stress': - stressIntro(); + // case 'ugh': + // ughIntro(); + // case 'stress': + // stressIntro(); + // case 'guns': + // gunsIntro(); default: startCountdown(); @@ -967,8 +976,7 @@ class PlayState extends MusicBeatState camFollow.x += 100; camFollow.y += 100; - /* - FlxG.sound.playMusic(Paths.music('DISTORTO'), 0); + /* FlxG.sound.playMusic(Paths.music('DISTORTO'), 0); FlxG.sound.music.fadeIn(5, 0, 0.5); dad.visible = false; @@ -1049,8 +1057,7 @@ class PlayState extends MusicBeatState cameraMovement(); }; - /* - camFollow.setPosition(camPos.x, camPos.y); + /* camFollow.setPosition(camPos.x, camPos.y); camHUD.visible = false; @@ -1124,8 +1131,7 @@ class PlayState extends MusicBeatState cameraMovement(); }; - /* - camHUD.visible = false; + /* camHUD.visible = false; // for story mode shit camFollow.setPosition(camPos.x, camPos.y); diff --git a/source/TitleState.hx b/source/TitleState.hx index 2b67aaead..2b547483b 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -438,12 +438,15 @@ class TitleState extends MusicBeatState if (version.trim() != onlineVersion) { trace('OLD VERSION!'); - FlxG.switchState(new OutdatedSubState()); + // FlxG.switchState(new OutdatedSubState()); } else { - FlxG.switchState(new MainMenuState()); + // FlxG.switchState(new MainMenuState()); } + + // REDO FOR ITCH/FINAL SHIT + FlxG.switchState(new MainMenuState()); }); } #else From c60bd8b12f11eea9995afa61bbefe7b7ea765022 Mon Sep 17 00:00:00 2001 From: Cameron Taylor <cameron.taylor.ninja@gmail.com> Date: Sun, 18 Apr 2021 16:54:21 -0400 Subject: [PATCH 02/13] optimiiiizeeee --- source/PlayState.hx | 147 ++++++++++++++++++++++---------------------- source/TankmenBG.hx | 5 ++ 2 files changed, 79 insertions(+), 73 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 79eb75c2f..ee584215f 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -649,15 +649,15 @@ class PlayState extends MusicBeatState gf.x -= 50; gf.y -= 200; + var tempTankman:TankmenBG = new TankmenBG(20, 500, true); + tempTankman.strumTime = 10; + tempTankman.resetShit(20, 600, true); + tankmanRun.add(tempTankman); + for (i in 0...TankmenBG.animationNotes.length) { if (FlxG.random.bool(16)) { - var tempTankman:TankmenBG = new TankmenBG(20, 500, true); - tempTankman.strumTime = 10; - tempTankman.resetShit(20, 600, true); - tankmanRun.add(tempTankman); - var tankman:TankmenBG = tankmanRun.recycle(TankmenBG); // new TankmenBG(500, 200 + FlxG.random.int(50, 100), TankmenBG.animationNotes[i][1] < 2); tankman.strumTime = TankmenBG.animationNotes[i][0]; @@ -957,86 +957,87 @@ class PlayState extends MusicBeatState function ughIntro() { inCutscene = true; + /* + var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK); + blackShit.scrollFactor.set(); + add(blackShit); - var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK); - blackShit.scrollFactor.set(); - add(blackShit); + var vid:FlxVideo = new FlxVideo('music/ughCutscene.mp4'); + vid.finishCallback = function() + { + remove(blackShit); + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); + startCountdown(); + cameraMovement(); + }; - var vid:FlxVideo = new FlxVideo('music/ughCutscene.mp4'); - vid.finishCallback = function() - { - remove(blackShit); - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); - startCountdown(); - cameraMovement(); - }; + FlxG.camera.zoom = defaultCamZoom * 1.2; - FlxG.camera.zoom = defaultCamZoom * 1.2; + camFollow.x += 100; + camFollow.y += 100; + */ - camFollow.x += 100; + FlxG.sound.playMusic(Paths.music('DISTORTO'), 0); + FlxG.sound.music.fadeIn(5, 0, 0.5); + + dad.visible = false; + var tankCutscene:TankCutscene = new TankCutscene(-20, 320); + tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong1'); + tankCutscene.animation.addByPrefix('wellWell', 'TANK TALK 1 P1', 24, false); + tankCutscene.animation.addByPrefix('killYou', 'TANK TALK 1 P2', 24, false); + tankCutscene.animation.play('wellWell'); + tankCutscene.antialiasing = true; + gfCutsceneLayer.add(tankCutscene); + + camHUD.visible = false; + + FlxG.camera.zoom *= 1.2; camFollow.y += 100; - /* FlxG.sound.playMusic(Paths.music('DISTORTO'), 0); - FlxG.sound.music.fadeIn(5, 0, 0.5); + tankCutscene.startSyncAudio = FlxG.sound.load(Paths.sound('wellWellWell')); - dad.visible = false; - var tankCutscene:TankCutscene = new TankCutscene(-20, 320); - tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong1'); - tankCutscene.animation.addByPrefix('wellWell', 'TANK TALK 1 P1', 24, false); - tankCutscene.animation.addByPrefix('killYou', 'TANK TALK 1 P2', 24, false); - tankCutscene.animation.play('wellWell'); - tankCutscene.antialiasing = true; - gfCutsceneLayer.add(tankCutscene); - - camHUD.visible = false; - - FlxG.camera.zoom *= 1.2; + new FlxTimer().start(3, function(tmr:FlxTimer) + { + camFollow.x += 800; camFollow.y += 100; + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.27, {ease: FlxEase.quadInOut}); - tankCutscene.startSyncAudio = FlxG.sound.load(Paths.sound('wellWellWell')); - - new FlxTimer().start(3, function(tmr:FlxTimer) + new FlxTimer().start(1.5, function(bep:FlxTimer) { - camFollow.x += 800; - camFollow.y += 100; - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.27, {ease: FlxEase.quadInOut}); - - new FlxTimer().start(1.5, function(bep:FlxTimer) + boyfriend.playAnim('singUP'); + // play sound + FlxG.sound.play(Paths.sound('bfBeep'), function() { - boyfriend.playAnim('singUP'); - // play sound - FlxG.sound.play(Paths.sound('bfBeep'), function() - { - boyfriend.playAnim('idle'); - }); + boyfriend.playAnim('idle'); }); + }); - new FlxTimer().start(3, function(swaggy:FlxTimer) + new FlxTimer().start(3, function(swaggy:FlxTimer) + { + camFollow.x -= 800; + camFollow.y -= 100; + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.5, {ease: FlxEase.quadInOut}); + tankCutscene.animation.play('killYou'); + FlxG.sound.play(Paths.sound('killYou')); + new FlxTimer().start(6.1, function(swagasdga:FlxTimer) { - camFollow.x -= 800; - camFollow.y -= 100; - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.5, {ease: FlxEase.quadInOut}); - tankCutscene.animation.play('killYou'); - FlxG.sound.play(Paths.sound('killYou')); - new FlxTimer().start(6.1, function(swagasdga:FlxTimer) + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); + + FlxG.sound.music.fadeOut((Conductor.crochet / 1000) * 5, 0); + + new FlxTimer().start((Conductor.crochet / 1000) * 5, function(money:FlxTimer) { - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); - - FlxG.sound.music.fadeOut((Conductor.crochet / 1000) * 5, 0); - - new FlxTimer().start((Conductor.crochet / 1000) * 5, function(money:FlxTimer) - { - dad.visible = true; - gfCutsceneLayer.remove(tankCutscene); - }); - - cameraMovement(); - - startCountdown(); - camHUD.visible = true; + dad.visible = true; + gfCutsceneLayer.remove(tankCutscene); }); + + cameraMovement(); + + startCountdown(); + camHUD.visible = true; }); - });*/ + }); + }); } function gunsIntro() @@ -1935,7 +1936,7 @@ class PlayState extends MusicBeatState vocals.pause(); FlxG.sound.music.play(); - Conductor.songPosition = FlxG.sound.music.time; + Conductor.songPosition = FlxG.sound.music.time + Conductor.offset; if (vocalsFinished) return; @@ -1972,8 +1973,8 @@ class PlayState extends MusicBeatState } else { - // Conductor.songPosition = FlxG.sound.music.time; - Conductor.songPosition += FlxG.elapsed * 1000; + Conductor.songPosition = FlxG.sound.music.time + Conductor.offset; // 20 is THE MILLISECONDS?? + // Conductor.songPosition += FlxG.elapsed * 1000; if (!paused) { @@ -2977,8 +2978,8 @@ class PlayState extends MusicBeatState override function stepHit() { super.stepHit(); - if (Math.abs(FlxG.sound.music.time - Conductor.songPosition) > 20 - || (SONG.needsVoices && Math.abs(vocals.time - Conductor.songPosition) > 20)) + if (Math.abs(FlxG.sound.music.time - (Conductor.songPosition - Conductor.offset)) > 20 + || (SONG.needsVoices && Math.abs(vocals.time - (Conductor.songPosition - Conductor.offset)) > 20)) { resyncVocals(); } diff --git a/source/TankmenBG.hx b/source/TankmenBG.hx index 37c56f061..b08c1473d 100644 --- a/source/TankmenBG.hx +++ b/source/TankmenBG.hx @@ -49,6 +49,11 @@ class TankmenBG extends FlxSprite { super.update(elapsed); + if (x >= FlxG.width * 1.2 || x <= FlxG.width * -0.5) + visible = false; + else + visible = true; + if (animation.curAnim.name == 'run') { var endDirection:Float = (FlxG.width * 0.74) + endingOffset; From 56cbb276fa1f94d3641dfe7affe6e56b3ada784a Mon Sep 17 00:00:00 2001 From: Cameron Taylor <cameron.taylor.ninja@gmail.com> Date: Sun, 18 Apr 2021 17:28:10 -0400 Subject: [PATCH 03/13] touchups and shit --- Project.xml | 5 +++-- source/PlayState.hx | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Project.xml b/Project.xml index cb9b6859b..a7231221b 100644 --- a/Project.xml +++ b/Project.xml @@ -125,10 +125,11 @@ <!--haxelib name="newgrounds" unless="switch"/> --> <haxelib name="faxe" if='switch'/> <haxelib name="polymod"/> + <haxelib name="newgrounds"/> <haxelib name="hxcpp-debug-server" if="desktop debug"/> - <haxelib name="flixel-animate" /> - <haxelib name="spinehaxe" /> + <!-- <haxelib name="flixel-animate" /> --> + <!-- <haxelib name="spinehaxe" /> --> <!-- https://github.com/ninjamuffin99/Flixel-Animate-Atlas-Player --> diff --git a/source/PlayState.hx b/source/PlayState.hx index ee584215f..7d68d4a7f 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3,8 +3,6 @@ package; import Section.SwagSection; import Song.SwagSong; import WiggleEffect.WiggleEffectType; -import animateAtlasPlayer.assets.AssetManager; -import animateAtlasPlayer.core.Animation; import flixel.FlxBasic; import flixel.FlxCamera; import flixel.FlxG; @@ -539,15 +537,19 @@ class PlayState extends MusicBeatState tankSky.velocity.x = FlxG.random.float(5, 15); add(tankSky); - var tankMountains:BGSprite = new BGSprite('tankMountains', -200, 90, 0.2, 0.2); - tankMountains.setGraphicSize(Std.int(tankMountains.width * 1.1)); + var tankMountains:BGSprite = new BGSprite('tankMountains', -300, -20, 0.2, 0.2); + tankMountains.setGraphicSize(Std.int(tankMountains.width * 1.2)); tankMountains.updateHitbox(); add(tankMountains); - var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 200, 0.25, 0.25); + var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 0, 0.30, 0.30); + tankBuildings.setGraphicSize(Std.int(tankBuildings.width * 1.1)); + tankBuildings.updateHitbox(); add(tankBuildings); var tankRuins:BGSprite = new BGSprite('tankRuins', -200, 0, 0.35, 0.35); + tankRuins.setGraphicSize(Std.int(tankRuins.width * 1.1)); + tankRuins.updateHitbox(); add(tankRuins); var smokeLeft:BGSprite = new BGSprite('smokeLeft', -200, -100, 0.4, 0.4, ['SmokeBlurLeft'], true); @@ -587,13 +589,13 @@ class PlayState extends MusicBeatState var fgTank2:BGSprite = new BGSprite('tank2', 450, 940, 1.5, 1.5, ['foreground']); foregroundSprites.add(fgTank2); - var fgTank4:BGSprite = new BGSprite('tank4', 1200, 1080, 1.5, 1.5, ['fg']); + var fgTank4:BGSprite = new BGSprite('tank4', 1300, 900, 1.5, 1.5, ['fg']); foregroundSprites.add(fgTank4); - var fgTank5:BGSprite = new BGSprite('tank5', 1800, 900, 1.5, 1.5, ['fg']); + var fgTank5:BGSprite = new BGSprite('tank5', 1620, 700, 1.5, 1.5, ['fg']); foregroundSprites.add(fgTank5); - var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1400, 3.5, 2.5, ['fg']); + var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1200, 3.5, 2.5, ['fg']); foregroundSprites.add(fgTank3); default: From fe4c61124e11f3f342ab13397c7fea544480ad41 Mon Sep 17 00:00:00 2001 From: Cameron Taylor <cameron.taylor.ninja@gmail.com> Date: Mon, 19 Apr 2021 02:46:02 -0400 Subject: [PATCH 04/13] they hate to see a girlboss winning --- source/MainMenuState.hx | 7 ++- source/PlayState.hx | 134 ++++++++++++++++++++-------------------- 2 files changed, 72 insertions(+), 69 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 69972167b..492b0d4ba 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -157,11 +157,14 @@ class MainMenuState extends MusicBeatState { #if linux // Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]); - Sys.command('/usr/bin/xdg-open', ["https://www.kickstarter.com/projects/funkin/", "&"]); + Sys.command('/usr/bin/xdg-open', [ + "https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game/", + "&" + ]); #else // FlxG.openURL('https://ninja-muffin24.itch.io/funkin'); - FlxG.openURL('https://www.kickstarter.com/projects/funkin/'); + FlxG.openURL('https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game/'); #end } #end diff --git a/source/PlayState.hx b/source/PlayState.hx index 7d68d4a7f..3291808ae 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -959,87 +959,87 @@ class PlayState extends MusicBeatState function ughIntro() { inCutscene = true; - /* - var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK); - blackShit.scrollFactor.set(); - add(blackShit); - var vid:FlxVideo = new FlxVideo('music/ughCutscene.mp4'); - vid.finishCallback = function() - { - remove(blackShit); - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); - startCountdown(); - cameraMovement(); - }; + var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK); + blackShit.scrollFactor.set(); + add(blackShit); - FlxG.camera.zoom = defaultCamZoom * 1.2; + var vid:FlxVideo = new FlxVideo('music/ughCutscene.mp4'); + vid.finishCallback = function() + { + remove(blackShit); + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); + startCountdown(); + cameraMovement(); + }; - camFollow.x += 100; - camFollow.y += 100; - */ + FlxG.camera.zoom = defaultCamZoom * 1.2; - FlxG.sound.playMusic(Paths.music('DISTORTO'), 0); - FlxG.sound.music.fadeIn(5, 0, 0.5); - - dad.visible = false; - var tankCutscene:TankCutscene = new TankCutscene(-20, 320); - tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong1'); - tankCutscene.animation.addByPrefix('wellWell', 'TANK TALK 1 P1', 24, false); - tankCutscene.animation.addByPrefix('killYou', 'TANK TALK 1 P2', 24, false); - tankCutscene.animation.play('wellWell'); - tankCutscene.antialiasing = true; - gfCutsceneLayer.add(tankCutscene); - - camHUD.visible = false; - - FlxG.camera.zoom *= 1.2; + camFollow.x += 100; camFollow.y += 100; - tankCutscene.startSyncAudio = FlxG.sound.load(Paths.sound('wellWellWell')); + /* + FlxG.sound.playMusic(Paths.music('DISTORTO'), 0); + FlxG.sound.music.fadeIn(5, 0, 0.5); - new FlxTimer().start(3, function(tmr:FlxTimer) - { - camFollow.x += 800; + dad.visible = false; + var tankCutscene:TankCutscene = new TankCutscene(-20, 320); + tankCutscene.frames = Paths.getSparrowAtlas('cutsceneStuff/tankTalkSong1'); + tankCutscene.animation.addByPrefix('wellWell', 'TANK TALK 1 P1', 24, false); + tankCutscene.animation.addByPrefix('killYou', 'TANK TALK 1 P2', 24, false); + tankCutscene.animation.play('wellWell'); + tankCutscene.antialiasing = true; + gfCutsceneLayer.add(tankCutscene); + + camHUD.visible = false; + + FlxG.camera.zoom *= 1.2; camFollow.y += 100; - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.27, {ease: FlxEase.quadInOut}); - new FlxTimer().start(1.5, function(bep:FlxTimer) + tankCutscene.startSyncAudio = FlxG.sound.load(Paths.sound('wellWellWell')); + + new FlxTimer().start(3, function(tmr:FlxTimer) { - boyfriend.playAnim('singUP'); - // play sound - FlxG.sound.play(Paths.sound('bfBeep'), function() + camFollow.x += 800; + camFollow.y += 100; + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.27, {ease: FlxEase.quadInOut}); + + new FlxTimer().start(1.5, function(bep:FlxTimer) { - boyfriend.playAnim('idle'); - }); - }); - - new FlxTimer().start(3, function(swaggy:FlxTimer) - { - camFollow.x -= 800; - camFollow.y -= 100; - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.5, {ease: FlxEase.quadInOut}); - tankCutscene.animation.play('killYou'); - FlxG.sound.play(Paths.sound('killYou')); - new FlxTimer().start(6.1, function(swagasdga:FlxTimer) - { - FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); - - FlxG.sound.music.fadeOut((Conductor.crochet / 1000) * 5, 0); - - new FlxTimer().start((Conductor.crochet / 1000) * 5, function(money:FlxTimer) + boyfriend.playAnim('singUP'); + // play sound + FlxG.sound.play(Paths.sound('bfBeep'), function() { - dad.visible = true; - gfCutsceneLayer.remove(tankCutscene); + boyfriend.playAnim('idle'); }); - - cameraMovement(); - - startCountdown(); - camHUD.visible = true; }); - }); - }); + + new FlxTimer().start(3, function(swaggy:FlxTimer) + { + camFollow.x -= 800; + camFollow.y -= 100; + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom * 1.2}, 0.5, {ease: FlxEase.quadInOut}); + tankCutscene.animation.play('killYou'); + FlxG.sound.play(Paths.sound('killYou')); + new FlxTimer().start(6.1, function(swagasdga:FlxTimer) + { + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut}); + + FlxG.sound.music.fadeOut((Conductor.crochet / 1000) * 5, 0); + + new FlxTimer().start((Conductor.crochet / 1000) * 5, function(money:FlxTimer) + { + dad.visible = true; + gfCutsceneLayer.remove(tankCutscene); + }); + + cameraMovement(); + + startCountdown(); + camHUD.visible = true; + }); + }); + });*/ } function gunsIntro() From ece27cd23a582af6aff8fe5336a19256bbce7c10 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Mon, 19 Apr 2021 10:35:39 +0200 Subject: [PATCH 05/13] load songs from reload json button --- source/ChartingState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index d36521a6b..1030c19ba 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1038,7 +1038,7 @@ class ChartingState extends MusicBeatState function loadJson(song:String):Void { PlayState.SONG = Song.loadFromJson(song.toLowerCase(), song.toLowerCase()); - FlxG.resetState(); + LoadingState.loadAndSwitchState(new ChartingState()); } function loadAutosave():Void From e005ac382c327f5205adedf1ab7803a884bf8f05 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Mon, 19 Apr 2021 10:43:21 +0200 Subject: [PATCH 06/13] don't play game over music if already ending --- source/GameOverSubstate.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 86123283f..7d35b6f42 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -111,7 +111,8 @@ class GameOverSubstate extends MusicBeatSubstate FlxG.sound.play(Paths.sound('jeffGameover/jeffGameover-' + randomGameover), 1, false, null, true, function() { - FlxG.sound.music.fadeIn(4, 0.2, 1); + if (!isEnding) + FlxG.sound.music.fadeIn(4, 0.2, 1); }); } default: @@ -130,7 +131,8 @@ class GameOverSubstate extends MusicBeatSubstate private function coolStartDeath(?vol:Float = 1):Void { - FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol); + if (!isEnding) + FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol); } override function beatHit() From 5dddfd71609f447670f6a95864f805893ed13ca4 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Mon, 19 Apr 2021 18:19:40 +0200 Subject: [PATCH 07/13] bf old icon switch switches back to proper player1 --- source/HealthIcon.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 883d3525c..8ebb79306 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -34,7 +34,7 @@ class HealthIcon extends FlxSprite if (isOldIcon) changeIcon('bf-old'); else - changeIcon('bf'); + changeIcon(PlayState.SONG.player1); } public function changeIcon(newChar:String):Void From e6f115dbfe293887c02c88640148c3900685574f Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Mon, 19 Apr 2021 19:11:30 +0200 Subject: [PATCH 08/13] cam lerp on gameover --- source/GameOverSubstate.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 7d35b6f42..9bf0c466a 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -70,6 +70,9 @@ class GameOverSubstate extends MusicBeatSubstate override function update(elapsed:Float) { + // makes the lerp non-dependant on the framerate + FlxG.camera.followLerp = CoolUtil.camLerpShit(0.01); + super.update(elapsed); if (controls.ACCEPT) @@ -96,7 +99,7 @@ class GameOverSubstate extends MusicBeatSubstate if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12) { - FlxG.camera.follow(camFollow, LOCKON, 0.01); + FlxG.camera.follow(camFollow, LOCKON, CoolUtil.camLerpShit(0.01)); } switch (PlayState.storyWeek) From 5aefe519e08e554ad9e927aa9bd3d7a101aedca4 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Tue, 20 Apr 2021 17:55:42 +0200 Subject: [PATCH 09/13] note miss stuff, clean up 'stunned' remnants --- source/Boyfriend.hx | 2 +- source/PlayState.hx | 93 ++++++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/source/Boyfriend.hx b/source/Boyfriend.hx index 3421367cb..222e06d72 100644 --- a/source/Boyfriend.hx +++ b/source/Boyfriend.hx @@ -9,7 +9,7 @@ using StringTools; class Boyfriend extends Character { - public var stunned:Bool = false; + // public var stunned:Bool = false; public function new(x:Float, y:Float, ?char:String = 'bf') { diff --git a/source/PlayState.hx b/source/PlayState.hx index 3291808ae..8e6d7fc90 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2162,7 +2162,7 @@ class PlayState extends MusicBeatState if (health <= 0 && !practiceMode) { - boyfriend.stunned = true; + // boyfriend.stunned = true; persistentUpdate = false; persistentDraw = false; @@ -2199,7 +2199,8 @@ class PlayState extends MusicBeatState { notes.forEachAlive(function(daNote:Note) { - if (daNote.y > FlxG.height) + if ((PreferencesMenu.getPref('downscroll') && daNote.y < -daNote.height) + || (!PreferencesMenu.getPref('downscroll') && daNote.y > FlxG.height)) { daNote.active = false; daNote.visible = false; @@ -2292,17 +2293,19 @@ class PlayState extends MusicBeatState // WIP interpolation shit? Need to fix the pause issue // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * SONG.speed)); - var noteMiss:Bool = daNote.y < -daNote.height; + // removing this so whether the note misses or not is entirely up to Note class + // var noteMiss:Bool = daNote.y < -daNote.height; - if (PreferencesMenu.getPref('downscroll')) - noteMiss = daNote.y > FlxG.height; + // if (PreferencesMenu.getPref('downscroll')) + // noteMiss = daNote.y > FlxG.height; - if (noteMiss) + if (daNote.tooLate || daNote.wasGoodHit) { - if (daNote.tooLate || !daNote.wasGoodHit) + if (daNote.tooLate) { health -= 0.0475; vocals.volume = 0; + killCombo(); } daNote.active = false; @@ -2324,6 +2327,13 @@ class PlayState extends MusicBeatState #end } + function killCombo():Void + { + if (combo > 5 && gf.animOffsets.exists('sad')) + gf.playAnim('sad'); + combo = 0; + } + function endSong():Void { seenCutscene = false; @@ -2725,7 +2735,7 @@ class PlayState extends MusicBeatState for (shit in 0...pressArray.length) { // if a direction is hit that shouldn't be if (pressArray[shit] && !directionList.contains(shit)) - badNoteHit(); + noteMiss(shit); } for (coolNote in possibleNotes) { @@ -2735,7 +2745,9 @@ class PlayState extends MusicBeatState } else { - badNoteHit(); + for (shit in 0...pressArray.length) + if (pressArray[shit]) + noteMiss(shit); } } @@ -2767,44 +2779,39 @@ class PlayState extends MusicBeatState function noteMiss(direction:Int = 1):Void { - if (!boyfriend.stunned) + // whole function used to be encased in if (!boyfriend.stunned) + health -= 0.04; + killCombo(); + + if (!practiceMode) + songScore -= 10; + + vocals.volume = 0; + FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2)); + + /* boyfriend.stunned = true; + + // get stunned for 5 seconds + new FlxTimer().start(5 / 60, function(tmr:FlxTimer) { - health -= 0.04; - if (combo > 5 && gf.animOffsets.exists('sad')) - { - gf.playAnim('sad'); - } - combo = 0; + boyfriend.stunned = false; + }); */ - if (!practiceMode) - songScore -= 10; - - FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2)); - // FlxG.sound.play(Paths.sound('missnote1'), 1, false); - // FlxG.log.add('played imss note'); - - boyfriend.stunned = true; - - // get stunned for 5 seconds - new FlxTimer().start(5 / 60, function(tmr:FlxTimer) - { - boyfriend.stunned = false; - }); - - 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); - } + 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); } } + /* not used anymore lol + function badNoteHit() { // just double pasting this shit cuz fuk u @@ -2822,7 +2829,7 @@ class PlayState extends MusicBeatState noteMiss(2); if (rightP) noteMiss(3); - } + } */ function goodNoteHit(note:Note):Void { From 788c4e6f1b88c25c4ffd7af91be73b9f4ddc4546 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Tue, 20 Apr 2021 20:38:07 +0200 Subject: [PATCH 10/13] combo counter fixes & tweaks --- source/PlayState.hx | 148 ++++++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 67 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 8e6d7fc90..c6af06add 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2331,7 +2331,11 @@ class PlayState extends MusicBeatState { if (combo > 5 && gf.animOffsets.exists('sad')) gf.playAnim('sad'); - combo = 0; + if (combo != 0) + { + combo = 0; + displayCombo(); + } } function endSong():Void @@ -2431,19 +2435,13 @@ class PlayState extends MusicBeatState } } + // gives score and pops up rating private function popUpScore(strumtime:Float, daNote:Note):Void { var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition); // boyfriend.playAnim('hey'); vocals.volume = 1; - var placement:String = Std.string(combo); - - var coolText:FlxText = new FlxText(0, 0, 0, placement, 32); - coolText.screenCenter(); - coolText.x = FlxG.width * 0.55; - // - var rating:FlxSprite = new FlxSprite(); var score:Int = 350; @@ -2490,6 +2488,45 @@ class PlayState extends MusicBeatState daRating = 'bad'; */ + var ratingPath:String = daRating; + + if (curStage.startsWith('school')) + ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel"; + + rating.loadGraphic(Paths.image(ratingPath)); + rating.screenCenter(); + rating.x = FlxG.width * 0.55 - 40; + rating.y -= 60; + rating.acceleration.y = 550; + rating.velocity.y -= FlxG.random.int(140, 175); + rating.velocity.x -= FlxG.random.int(0, 10); + + add(rating); + + if (curStage.startsWith('school')) + { + rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7)); + } + else + { + rating.setGraphicSize(Std.int(rating.width * 0.7)); + rating.antialiasing = true; + } + rating.updateHitbox(); + + FlxTween.tween(rating, {alpha: 0}, 0.2, { + onComplete: function(tween:FlxTween) + { + rating.destroy(); + }, + startDelay: Conductor.crochet * 0.001 + }); + if (combo >= 10 || combo == 0) + displayCombo(); + } + + function displayCombo():Void + { var pixelShitPart1:String = ""; var pixelShitPart2:String = ''; @@ -2499,70 +2536,71 @@ class PlayState extends MusicBeatState pixelShitPart2 = '-pixel'; } - rating.loadGraphic(Paths.image(pixelShitPart1 + daRating + pixelShitPart2)); - rating.screenCenter(); - rating.x = coolText.x - 40; - rating.y -= 60; - rating.acceleration.y = 550; - rating.velocity.y -= FlxG.random.int(140, 175); - rating.velocity.x -= FlxG.random.int(0, 10); - var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2)); comboSpr.screenCenter(); - comboSpr.x = coolText.x; + comboSpr.x = FlxG.width * 0.55; + comboSpr.y += 80; comboSpr.acceleration.y = 600; comboSpr.velocity.y -= 150; - comboSpr.velocity.x += FlxG.random.int(1, 10); - add(rating); - if (!curStage.startsWith('school')) + add(comboSpr); + + if (curStage.startsWith('school')) { - rating.setGraphicSize(Std.int(rating.width * 0.7)); - rating.antialiasing = true; - comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); - comboSpr.antialiasing = true; + comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7)); } else { - rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7)); - comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7)); + comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); + comboSpr.antialiasing = true; } - comboSpr.updateHitbox(); - rating.updateHitbox(); + + FlxTween.tween(comboSpr, {alpha: 0}, 0.2, { + onComplete: function(tween:FlxTween) + { + comboSpr.destroy(); + }, + startDelay: Conductor.crochet * 0.001 + }); var seperatedScore:Array<Int> = []; + var tempCombo:Int = combo; - seperatedScore.push(Math.floor(combo / 100)); - seperatedScore.push(Math.floor((combo - (seperatedScore[0] * 100)) / 10)); - seperatedScore.push(combo % 10); + while (tempCombo != 0) + { + seperatedScore.push(tempCombo % 10); + tempCombo = Std.int(tempCombo / 10); + } + while (seperatedScore.length < 3) + seperatedScore.push(0); - var daLoop:Int = 0; + // seperatedScore.reverse(); + + var daLoop:Int = 1; for (i in seperatedScore) { var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2)); - numScore.screenCenter(); - numScore.x = coolText.x + (43 * daLoop) - 90; - numScore.y += 80; + numScore.y = comboSpr.y; - if (!curStage.startsWith('school')) + if (curStage.startsWith('school')) + { + numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom)); + } + else { numScore.antialiasing = true; numScore.setGraphicSize(Std.int(numScore.width * 0.5)); } - else - { - numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom)); - } numScore.updateHitbox(); + numScore.x = comboSpr.x - (43 * daLoop); //- 90; numScore.acceleration.y = FlxG.random.int(200, 300); numScore.velocity.y -= FlxG.random.int(140, 160); numScore.velocity.x = FlxG.random.float(-5, 5); - if (combo >= 10 || combo == 0) - add(numScore); + add(numScore); FlxTween.tween(numScore, {alpha: 0}, 0.2, { onComplete: function(tween:FlxTween) @@ -2574,30 +2612,6 @@ class PlayState extends MusicBeatState daLoop++; } - /* - trace(combo); - trace(seperatedScore); - */ - - coolText.text = Std.string(seperatedScore); - // add(coolText); - - FlxTween.tween(rating, {alpha: 0}, 0.2, { - startDelay: Conductor.crochet * 0.001 - }); - - FlxTween.tween(comboSpr, {alpha: 0}, 0.2, { - onComplete: function(tween:FlxTween) - { - coolText.destroy(); - comboSpr.destroy(); - - rating.destroy(); - }, - startDelay: Conductor.crochet * 0.001 - }); - - curSection += 1; } var cameraRightSide:Bool = false; @@ -2837,8 +2851,8 @@ class PlayState extends MusicBeatState { if (!note.isSustainNote) { - popUpScore(note.strumTime, note); combo += 1; + popUpScore(note.strumTime, note); } if (note.noteData >= 0) From 1431b19e57c3f7525ab0b35685bcce55b4c26823 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Tue, 20 Apr 2021 20:38:07 +0200 Subject: [PATCH 11/13] combo counter fixes & tweaks --- source/PlayState.hx | 147 ++++++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 67 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 8e6d7fc90..652466c77 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2331,7 +2331,11 @@ class PlayState extends MusicBeatState { if (combo > 5 && gf.animOffsets.exists('sad')) gf.playAnim('sad'); - combo = 0; + if (combo != 0) + { + combo = 0; + displayCombo(); + } } function endSong():Void @@ -2431,19 +2435,13 @@ class PlayState extends MusicBeatState } } + // gives score and pops up rating private function popUpScore(strumtime:Float, daNote:Note):Void { var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition); // boyfriend.playAnim('hey'); vocals.volume = 1; - var placement:String = Std.string(combo); - - var coolText:FlxText = new FlxText(0, 0, 0, placement, 32); - coolText.screenCenter(); - coolText.x = FlxG.width * 0.55; - // - var rating:FlxSprite = new FlxSprite(); var score:Int = 350; @@ -2490,6 +2488,45 @@ class PlayState extends MusicBeatState daRating = 'bad'; */ + var ratingPath:String = daRating; + + if (curStage.startsWith('school')) + ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel"; + + rating.loadGraphic(Paths.image(ratingPath)); + rating.screenCenter(); + rating.x = FlxG.width * 0.55 - 40; + rating.y -= 60; + rating.acceleration.y = 550; + rating.velocity.y -= FlxG.random.int(140, 175); + rating.velocity.x -= FlxG.random.int(0, 10); + + add(rating); + + if (curStage.startsWith('school')) + { + rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7)); + } + else + { + rating.setGraphicSize(Std.int(rating.width * 0.7)); + rating.antialiasing = true; + } + rating.updateHitbox(); + + FlxTween.tween(rating, {alpha: 0}, 0.2, { + onComplete: function(tween:FlxTween) + { + rating.destroy(); + }, + startDelay: Conductor.crochet * 0.001 + }); + if (combo >= 10 || combo == 0) + displayCombo(); + } + + function displayCombo():Void + { var pixelShitPart1:String = ""; var pixelShitPart2:String = ''; @@ -2499,70 +2536,70 @@ class PlayState extends MusicBeatState pixelShitPart2 = '-pixel'; } - rating.loadGraphic(Paths.image(pixelShitPart1 + daRating + pixelShitPart2)); - rating.screenCenter(); - rating.x = coolText.x - 40; - rating.y -= 60; - rating.acceleration.y = 550; - rating.velocity.y -= FlxG.random.int(140, 175); - rating.velocity.x -= FlxG.random.int(0, 10); - var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2)); comboSpr.screenCenter(); - comboSpr.x = coolText.x; + comboSpr.x = FlxG.width * 0.55; comboSpr.acceleration.y = 600; comboSpr.velocity.y -= 150; - comboSpr.velocity.x += FlxG.random.int(1, 10); - add(rating); - if (!curStage.startsWith('school')) + add(comboSpr); + + if (curStage.startsWith('school')) { - rating.setGraphicSize(Std.int(rating.width * 0.7)); - rating.antialiasing = true; - comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); - comboSpr.antialiasing = true; + comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7)); } else { - rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7)); - comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7)); + comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); + comboSpr.antialiasing = true; } - comboSpr.updateHitbox(); - rating.updateHitbox(); + + FlxTween.tween(comboSpr, {alpha: 0}, 0.2, { + onComplete: function(tween:FlxTween) + { + comboSpr.destroy(); + }, + startDelay: Conductor.crochet * 0.001 + }); var seperatedScore:Array<Int> = []; + var tempCombo:Int = combo; - seperatedScore.push(Math.floor(combo / 100)); - seperatedScore.push(Math.floor((combo - (seperatedScore[0] * 100)) / 10)); - seperatedScore.push(combo % 10); + while (tempCombo != 0) + { + seperatedScore.push(tempCombo % 10); + tempCombo = Std.int(tempCombo / 10); + } + while (seperatedScore.length < 3) + seperatedScore.push(0); - var daLoop:Int = 0; + // seperatedScore.reverse(); + + var daLoop:Int = 1; for (i in seperatedScore) { var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2)); - numScore.screenCenter(); - numScore.x = coolText.x + (43 * daLoop) - 90; - numScore.y += 80; + numScore.y = comboSpr.y + 80; - if (!curStage.startsWith('school')) + if (curStage.startsWith('school')) + { + numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom)); + } + else { numScore.antialiasing = true; numScore.setGraphicSize(Std.int(numScore.width * 0.5)); } - else - { - numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom)); - } numScore.updateHitbox(); + numScore.x = comboSpr.x - (43 * daLoop); //- 90; numScore.acceleration.y = FlxG.random.int(200, 300); numScore.velocity.y -= FlxG.random.int(140, 160); numScore.velocity.x = FlxG.random.float(-5, 5); - if (combo >= 10 || combo == 0) - add(numScore); + add(numScore); FlxTween.tween(numScore, {alpha: 0}, 0.2, { onComplete: function(tween:FlxTween) @@ -2574,30 +2611,6 @@ class PlayState extends MusicBeatState daLoop++; } - /* - trace(combo); - trace(seperatedScore); - */ - - coolText.text = Std.string(seperatedScore); - // add(coolText); - - FlxTween.tween(rating, {alpha: 0}, 0.2, { - startDelay: Conductor.crochet * 0.001 - }); - - FlxTween.tween(comboSpr, {alpha: 0}, 0.2, { - onComplete: function(tween:FlxTween) - { - coolText.destroy(); - comboSpr.destroy(); - - rating.destroy(); - }, - startDelay: Conductor.crochet * 0.001 - }); - - curSection += 1; } var cameraRightSide:Bool = false; @@ -2837,8 +2850,8 @@ class PlayState extends MusicBeatState { if (!note.isSustainNote) { - popUpScore(note.strumTime, note); combo += 1; + popUpScore(note.strumTime, note); } if (note.noteData >= 0) From b88ad022f23665597c87f19f1fe328142f618e98 Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Tue, 20 Apr 2021 22:25:38 +0200 Subject: [PATCH 12/13] fix susnotes after note miss changes oops --- source/PlayState.hx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 0d073bec7..a4c793c04 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2299,7 +2299,20 @@ class PlayState extends MusicBeatState // if (PreferencesMenu.getPref('downscroll')) // noteMiss = daNote.y > FlxG.height; - if (daNote.tooLate || daNote.wasGoodHit) + if (daNote.isSustainNote && daNote.wasGoodHit) + { + if ((!PreferencesMenu.getPref('downscroll') && daNote.y < -daNote.height) + || (PreferencesMenu.getPref('downscroll') && daNote.y > FlxG.height)) + { + daNote.active = false; + daNote.visible = false; + + daNote.kill(); + notes.remove(daNote, true); + daNote.destroy(); + } + } + else if (daNote.tooLate || daNote.wasGoodHit) { if (daNote.tooLate) { From adb41ce2895fdee981703aef3efdda1a29db26bb Mon Sep 17 00:00:00 2001 From: MtH <mth@mth.moe> Date: Wed, 21 Apr 2021 15:07:36 +0200 Subject: [PATCH 13/13] wocky slush debug shit, gf in animdebug, changesection --- source/PlayState.hx | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index a4c793c04..36cd9fe7e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -77,7 +77,6 @@ class PlayState extends MusicBeatState private var unspawnNotes:Array<Note> = []; private var strumLine:FlxSprite; - private var curSection:Int = 0; private var camFollow:FlxObject; @@ -2089,11 +2088,21 @@ class PlayState extends MusicBeatState #if debug if (FlxG.keys.justPressed.EIGHT) { + /* 8 for opponent char + SHIFT+8 for player char + CTRL+SHIFT+8 for gf */ if (FlxG.keys.pressed.SHIFT) - FlxG.switchState(new AnimationDebug(SONG.player1)); + if (FlxG.keys.pressed.CONTROL) + FlxG.switchState(new AnimationDebug(gf.curCharacter)); + else + FlxG.switchState(new AnimationDebug(SONG.player1)); else FlxG.switchState(new AnimationDebug(SONG.player2)); } + if (FlxG.keys.justPressed.PAGEUP) + changeSection(1); + if (FlxG.keys.justPressed.PAGEDOWN) + changeSection(-1); #end if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null) @@ -2351,6 +2360,27 @@ class PlayState extends MusicBeatState } } + #if debug + function changeSection(sec:Int):Void + { + FlxG.sound.music.pause(); + + var daBPM:Float = SONG.bpm; + var daPos:Float = 0; + for (i in 0...(Std.int(curStep / 16 + sec))) + { + if (SONG.notes[i].changeBPM) + { + daBPM = SONG.notes[i].bpm; + } + daPos += 4 * (1000 * 60 / daBPM); + } + Conductor.songPosition = FlxG.sound.music.time = daPos; + updateCurStep(); + resyncVocals(); + } + #end + function endSong():Void { seenCutscene = false;