From 16caad18182f93388c0994784af3f2f9dc3c9bdd Mon Sep 17 00:00:00 2001 From: Lotusotho <69006987+lotusotho@users.noreply.github.com> Date: Sun, 6 Dec 2020 14:58:32 +0100 Subject: [PATCH 01/23] Fixed loop problem at the end of Boopeebo --- source/PlayState.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 2c5c6da81..4a9043c11 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -731,7 +731,8 @@ class PlayState extends MusicBeatState { switch (totalBeats) { - case 127: + case 128, 129, 130: + vocals.volume = 0; // FlxG.sound.music.stop(); // curLevel = 'Fresh'; // FlxG.switchState(new PlayState()); From a11acc66886be5c1afc17beddd3a4aa31530bc78 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 6 Dec 2020 16:52:26 -0500 Subject: [PATCH 02/23] removed bullshit from brandy!!! --- CHANGELOG.md | 2 +- Project.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d1bc56df..313dd72f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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). -## [0.2.3] +## [0.2.3] - 2020-12-04 ### Added - More intro texts ### Fixed diff --git a/Project.xml b/Project.xml index 322b46532..2dc527c06 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + From 749470724f590be2ea242a1c7f95fc16bdd82ab9 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 9 Dec 2020 13:53:46 -0500 Subject: [PATCH 03/23] pico charted --- source/ChartingState.hx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 6b1be1346..92ff65f78 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -514,12 +514,19 @@ class ChartingState extends MusicBeatState if (FlxG.keys.justPressed.DOWN) Conductor.changeBPM(Conductor.bpm - 1); */ + var shiftThing:Int = 1; + if (FlxG.keys.pressed.SHIFT) + shiftThing = 4; if (FlxG.keys.justPressed.RIGHT) - changeSection(curSection + 1); + changeSection(curSection + shiftThing); if (FlxG.keys.justPressed.LEFT) - changeSection(curSection - 1); + changeSection(curSection - shiftThing); - bpmTxt.text = "BPM: " + Conductor.bpm + "\nSection: " + curSection; + bpmTxt.text = bpmTxt.text = Std.string(FlxMath.roundDecimal(Conductor.songPosition / 1000, 2)) + + " / " + + Std.string(FlxMath.roundDecimal(FlxG.sound.music.length / 1000, 2)) + + "\nSection: " + + curSection; super.update(elapsed); } From adae54bb9b4b6ecba4e996478d857fa2eccc583f Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 9 Dec 2020 17:36:31 -0500 Subject: [PATCH 04/23] offsets and animations --- source/Boyfriend.hx | 37 ------------------ source/Character.hx | 86 +++++++++++++++++++++++++++++++++++------ source/ChartingState.hx | 2 +- source/PlayState.hx | 2 +- 4 files changed, 76 insertions(+), 51 deletions(-) diff --git a/source/Boyfriend.hx b/source/Boyfriend.hx index 5efc70987..a30805221 100644 --- a/source/Boyfriend.hx +++ b/source/Boyfriend.hx @@ -14,43 +14,6 @@ class Boyfriend extends Character public function new(x:Float, y:Float) { super(x, y); - - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml); - frames = tex; - animation.addByPrefix('idle', 'BF idle dance', 24, false); - animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); - animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); - animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); - animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); - animation.addByPrefix('hey', 'BF HEY', 24, false); - - 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; - - addOffset('idle', -5); - addOffset("singUP", -29, 27); - addOffset("singRIGHT", -38, -7); - addOffset("singLEFT", 12, -6); - addOffset("singDOWN", -10, -50); - addOffset("singUPmiss", -29, 27); - addOffset("singRIGHTmiss", -30, 21); - addOffset("singLEFTmiss", 12, 24); - addOffset("singDOWNmiss", -11, -19); - addOffset("hey", 7, 4); - addOffset('firstDeath', 37, 11); - addOffset('deathLoop', 37, 5); - addOffset('deathConfirm', 37, 69); - addOffset('scared', -4); } override function update(elapsed:Float) diff --git a/source/Character.hx b/source/Character.hx index 813fe4ab6..e6aab01de 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -1,6 +1,7 @@ package; import flixel.FlxSprite; +import flixel.animation.FlxBaseAnimation; import flixel.graphics.frames.FlxAtlasFrames; using StringTools; @@ -107,21 +108,82 @@ class Character extends FlxSprite addOffset("singLEFT", -30); addOffset("singDOWN", -30, -40); playAnim('idle'); - case 'lucky': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.lucky_guitar_assets__png, AssetPaths.lucky_guitar_assets__xml); + case 'pico': + tex = FlxAtlasFrames.fromSparrow(AssetPaths.Pico_FNF_assetss__png, AssetPaths.Pico_FNF_assetss__xml); frames = tex; - animation.addByPrefix('idle', 'lucky guitar idle', 24, false); - animation.addByPrefix('singUP', 'lucky UP NOTE', 24, false); - animation.addByPrefix('singRIGHT', 'lucky sing right', 24, false); - animation.addByPrefix('singDOWN', 'lucky DOWN note', 24, false); - animation.addByPrefix('singLEFT', 'lucky sing left', 24, false); + animation.addByPrefix('idle', "Pico Idle Dance", 24); + animation.addByPrefix('singUP', 'pico Up note0', 24, false); + animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false); + if (isPlayer) + { + animation.addByPrefix('singLEFT', 'Pico NOTE LEFT0', 24, false); + animation.addByPrefix('singRIGHT', 'Pico Note Right0', 24, false); + animation.addByPrefix('singRIGHTmiss', 'Pico Note Right Miss', 24, false); + animation.addByPrefix('singLEFTmiss', 'Pico NOTE LEFT miss', 24, false); + } + else + { + // Need to be flipped! REDO THIS LATER! + animation.addByPrefix('singLEFT', 'Pico Note Right0', 24, false); + animation.addByPrefix('singRIGHT', 'Pico NOTE LEFT0', 24, false); + animation.addByPrefix('singRIGHTmiss', 'Pico NOTE LEFT miss', 24, false); + animation.addByPrefix('singLEFTmiss', 'Pico Note Right Miss', 24, false); + } + + animation.addByPrefix('singUPmiss', 'pico Up note miss', 24); + animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); - addOffset('idle', 0, -180); - addOffset("singUP", 200, -180); - addOffset("singRIGHT", 200, -180); - addOffset("singLEFT", 200, -180); - addOffset("singDOWN", 200, -180); playAnim('idle'); + addOffset('idle'); + addOffset("singUP", -29, 27); + addOffset("singRIGHT", -68, -7); + addOffset("singLEFT", 65, 9); + addOffset("singDOWN", 200, 70); + addOffset("singUPmiss", -19, 67); + addOffset("singRIGHTmiss", -60, 41); + addOffset("singLEFTmiss", 62, 64); + addOffset("singDOWNmiss", 210, -28); + + if (!isPlayer) + flipX = true; + + case 'bf': + var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml); + frames = tex; + animation.addByPrefix('idle', 'BF idle dance', 24, false); + animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); + animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); + animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); + animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); + animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); + animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); + animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); + animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); + animation.addByPrefix('hey', 'BF HEY', 24, false); + + 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; + + addOffset('idle', -5); + addOffset("singUP", -29, 27); + addOffset("singRIGHT", -38, -7); + addOffset("singLEFT", 12, -6); + addOffset("singDOWN", -10, -50); + addOffset("singUPmiss", -29, 27); + addOffset("singRIGHTmiss", -30, 21); + addOffset("singLEFTmiss", 12, 24); + addOffset("singDOWNmiss", -11, -19); + addOffset("hey", 7, 4); + addOffset('firstDeath', 37, 11); + addOffset('deathLoop', 37, 5); + addOffset('deathConfirm', 37, 69); + addOffset('scared', -4); } } diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 92ff65f78..41ed16e9c 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -183,7 +183,7 @@ class ChartingState extends MusicBeatState stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; - var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster']; + var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico']; var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { diff --git a/source/PlayState.hx b/source/PlayState.hx index 2c5c6da81..b000f7d57 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -634,7 +634,7 @@ class PlayState extends MusicBeatState #if debug if (FlxG.keys.justPressed.EIGHT) - FlxG.switchState(new AnimationDebug(SONG.player1)); + FlxG.switchState(new AnimationDebug(SONG.player2)); #end if (startingSong) From 7144c811275eef7799e9077e3278a6175947939e Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 9 Dec 2020 17:46:47 -0500 Subject: [PATCH 05/23] animation fixins --- source/Character.hx | 2 +- source/PlayState.hx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Character.hx b/source/Character.hx index e6aab01de..f29efc018 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -138,7 +138,7 @@ class Character extends FlxSprite addOffset("singUP", -29, 27); addOffset("singRIGHT", -68, -7); addOffset("singLEFT", 65, 9); - addOffset("singDOWN", 200, 70); + addOffset("singDOWN", 200, -70); addOffset("singUPmiss", -19, 67); addOffset("singRIGHTmiss", -60, 41); addOffset("singLEFTmiss", 62, 64); diff --git a/source/PlayState.hx b/source/PlayState.hx index b000f7d57..773bdd136 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -199,6 +199,8 @@ class PlayState extends MusicBeatState dad.y += 100; case 'dad': camPos.x += 400; + case 'pico': + dad.y += 300; } boyfriend = new Boyfriend(770, 450); From 024c760cc26df9330a5673c8595118c042dd53fc Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 9 Dec 2020 18:14:36 -0500 Subject: [PATCH 06/23] fixed pausing desync issue --- source/FreeplayState.hx | 2 +- source/PlayState.hx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 795091ffa..9db9c9a84 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["Pico", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/PlayState.hx b/source/PlayState.hx index 773bdd136..eb1380261 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -578,9 +578,9 @@ class PlayState extends MusicBeatState { if (FlxG.sound.music != null) { - vocals.time = Conductor.songPosition; - FlxG.sound.music.play(); + Conductor.songPosition = FlxG.sound.music.time; + vocals.time = Conductor.songPosition; vocals.play(); } From 55a4de81121fbeb5a4a9b234d6a24dd3f7e68d80 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 9 Dec 2020 18:16:16 -0500 Subject: [PATCH 07/23] fixes #37 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 313dd72f0..d82781021 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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] +### Fixed +- Song desync of you paused and unpaused frequently ([shoutouts SonicBlam](https://github.com/ninjamuffin99/Funkin/issues/37)) + ## [0.2.3] - 2020-12-04 ### Added - More intro texts From 394e8c663bd8d73df7cf0346c185cdb4b25a878d Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Thu, 10 Dec 2020 08:47:28 +0800 Subject: [PATCH 08/23] Fixes MainMenu not playing music after playing/exiting level --- source/MainMenuState.hx | 9 ++++++--- source/TitleState.hx | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 6cad3b3e1..cabf8f046 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -29,6 +29,11 @@ class MainMenuState extends MusicBeatState override function create() { + if (!FlxG.sound.music.playing) + { + FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt); + } + persistentUpdate = persistentDraw = true; var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png); @@ -114,12 +119,10 @@ class MainMenuState extends MusicBeatState if (optionShit[curSelected] == 'donate') { #if linux - Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]); + Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]); #else - FlxG.openURL('https://ninja-muffin24.itch.io/funkin'); #end - } else { diff --git a/source/TitleState.hx b/source/TitleState.hx index ba0012ec6..24f8a4d86 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -51,10 +51,10 @@ class TitleState extends MusicBeatState super.create(); - #if ng - var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); - trace('NEWGROUNDS LOL'); - #end + /* #if ng + var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); + trace('NEWGROUNDS LOL'); + #end */ FlxG.save.bind('funkin', 'ninjamuffin99'); From d4848da0420315e7e74338b6fc4e34ef1c391bde Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Thu, 10 Dec 2020 08:58:46 +0800 Subject: [PATCH 09/23] Freeplay song not continuing fade in when exiting freeplay menu --- source/MainMenuState.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index cabf8f046..ecda7d3bf 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -95,6 +95,11 @@ class MainMenuState extends MusicBeatState override function update(elapsed:Float) { + if (FlxG.sound.music.volume < 1) + { + FlxG.sound.music.volume += 0.5 * FlxG.elapsed; + } + if (!selectedSomethin) { if (controls.UP_P) From 8289358d615c287e64473cfdf9fcaaa068f51c02 Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Thu, 10 Dec 2020 13:02:23 +0800 Subject: [PATCH 10/23] oopsie daisy this shouldn't be tracked my bad --- source/TitleState.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/TitleState.hx b/source/TitleState.hx index 24f8a4d86..ba0012ec6 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -51,10 +51,10 @@ class TitleState extends MusicBeatState super.create(); - /* #if ng - var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); - trace('NEWGROUNDS LOL'); - #end */ + #if ng + var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); + trace('NEWGROUNDS LOL'); + #end FlxG.save.bind('funkin', 'ninjamuffin99'); From 68a15dc8f7e30c9639de7ee762bde3b7cfa0a3d2 Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Thu, 10 Dec 2020 13:04:36 +0800 Subject: [PATCH 11/23] Fixed song starting early when paused during countdown also tweaked something in main menu --- source/MainMenuState.hx | 2 +- source/PlayState.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index ecda7d3bf..9bb35e77f 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -95,7 +95,7 @@ class MainMenuState extends MusicBeatState override function update(elapsed:Float) { - if (FlxG.sound.music.volume < 1) + if (FlxG.sound.music.volume < 0.8) { FlxG.sound.music.volume += 0.5 * FlxG.elapsed; } diff --git a/source/PlayState.hx b/source/PlayState.hx index eb1380261..8240a064c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -576,7 +576,7 @@ class PlayState extends MusicBeatState { if (paused) { - if (FlxG.sound.music != null) + if (FlxG.sound.music != null && !startingSong) { FlxG.sound.music.play(); Conductor.songPosition = FlxG.sound.music.time; From bc0e366895b9e8d9ee1cbe059645c69cfe7aef24 Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Thu, 10 Dec 2020 13:41:31 +0800 Subject: [PATCH 12/23] Fixed song still playing when paused right when song starts This should be it. --- source/PlayState.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 8240a064c..f48db0d72 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -378,11 +378,13 @@ class PlayState extends MusicBeatState function startSong():Void { + startingSong = false; + previousFrameTime = FlxG.game.ticks; lastReportedPlayheadPosition = 0; - startingSong = false; - FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false); + if (!paused) + FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false); FlxG.sound.music.onComplete = endSong; vocals.play(); } From 2cb855702bcd901f0793ce27b34fab6335fb1a40 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 10 Dec 2020 18:23:53 -0500 Subject: [PATCH 13/23] train in progress --- source/FreeplayState.hx | 2 +- source/PlayState.hx | 138 ++++++++++++++++++++++++++++++++++++++++ source/TitleState.hx | 2 +- 3 files changed, 140 insertions(+), 2 deletions(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 9db9c9a84..19a05ed20 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["Pico", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["Pico", "Blammed", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/PlayState.hx b/source/PlayState.hx index eb1380261..d0ce1e592 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -35,6 +35,7 @@ using StringTools; class PlayState extends MusicBeatState { public static var curLevel:String = 'Tutorial'; + public static var curStage:String = ''; public static var SONG:SwagSong; public static var isStoryMode:Bool = false; public static var storyWeek:Int = 0; @@ -81,6 +82,10 @@ class PlayState extends MusicBeatState var halloweenBG:FlxSprite; var isHalloween:Bool = false; + var phillyCityLights:FlxTypedGroup; + var phillyTrain:FlxSprite; + var trainSound:FlxSound; + var talking:Bool = true; var songScore:Int = 0; var scoreTxt:FlxText; @@ -144,6 +149,47 @@ class PlayState extends MusicBeatState isHalloween = true; } + else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed') + { + curStage = 'philly'; + + var bg:FlxSprite = new FlxSprite(-100).loadGraphic(AssetPaths.sky__png); + bg.scrollFactor.set(0.1, 0.1); + add(bg); + + var city:FlxSprite = new FlxSprite(-10).loadGraphic(AssetPaths.city__png); + city.scrollFactor.set(0.3, 0.3); + city.setGraphicSize(Std.int(city.width * 0.85)); + city.updateHitbox(); + add(city); + + phillyCityLights = new FlxTypedGroup(); + add(phillyCityLights); + + for (i in 0...5) + { + var light:FlxSprite = new FlxSprite(city.x).loadGraphic('assets/images/philly/win' + i + '.png'); + light.scrollFactor.set(0.3, 0.3); + light.visible = false; + light.setGraphicSize(Std.int(light.width * 0.85)); + light.updateHitbox(); + phillyCityLights.add(light); + } + + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(AssetPaths.behindTrain__png); + add(streetBehind); + + phillyTrain = new FlxSprite(2000, 300).loadGraphic(AssetPaths.train__png); + add(phillyTrain); + + trainSound = new FlxSound().loadEmbedded('assets/sounds/train_passes' + TitleState.soundExt); + FlxG.sound.list.add(trainSound); + + // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0__png); + + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(AssetPaths.street__png); + add(street); + } else { var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png); @@ -200,6 +246,7 @@ class PlayState extends MusicBeatState case 'dad': camPos.x += 400; case 'pico': + camPos.x += 600; dad.y += 300; } @@ -598,6 +645,23 @@ class PlayState extends MusicBeatState override public function update(elapsed:Float) { + switch (curStage) + { + case 'philly': + if (trainMoving) + { + trainFrameTiming += elapsed; + + if (trainFrameTiming >= 1 / 24) + { + updateTrainPos(); + trainFrameTiming = 0; + } + } + + phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed; + } + super.update(elapsed); scoreTxt.text = "Score:" + songScore; @@ -1308,6 +1372,56 @@ class PlayState extends MusicBeatState } } + var trainMoving:Bool = false; + var trainFrameTiming:Float = 0; + + var trainCars:Int = 8; + var trainFinishing:Bool = false; + + function trainStart():Void + { + trainMoving = true; + if (!trainSound.playing) + trainSound.play(true); + } + + var startedMoving:Bool = false; + + function updateTrainPos():Void + { + if (trainSound.time >= 4700) + { + startedMoving = true; + } + + if (startedMoving) + { + phillyTrain.x -= 400; + + if (phillyTrain.x < -2000 && !trainFinishing) + { + phillyTrain.x = -1150; + trainCars -= 1; + + if (trainCars <= 0) + trainFinishing = true; + } + + if (phillyTrain.x < 0 && trainFinishing) + trainReset(); + } + } + + function trainReset():Void + { + phillyTrain.x = FlxG.width + 200; + trainMoving = false; + // trainSound.stop(); + // trainSound.time = 0; + trainCars = 8; + startedMoving = false; + } + function lightningStrikeShit():Void { FlxG.sound.play('assets/sounds/thunder_' + FlxG.random.int(1, 2) + TitleState.soundExt); @@ -1396,9 +1510,33 @@ class PlayState extends MusicBeatState } } + switch (curStage) + { + case "philly": + if (totalBeats % 4 == 0) + { + phillyCityLights.forEach(function(light:FlxSprite) + { + light.visible = false; + }); + + curLight = FlxG.random.int(0, phillyCityLights.length - 1); + + phillyCityLights.members[curLight].visible = true; + phillyCityLights.members[curLight].alpha = 1; + } + + if (totalBeats % 8 == 4 && FlxG.random.bool(40) && !trainMoving) + { + trainStart(); + } + } + if (isHalloween && FlxG.random.bool(10) && curBeat > lightningStrikeBeat + lightningOffset) { lightningStrikeShit(); } } + + var curLight:Int = 0; } diff --git a/source/TitleState.hx b/source/TitleState.hx index ba0012ec6..59eed5b70 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -69,7 +69,7 @@ class TitleState extends MusicBeatState } #if SKIP_TO_PLAYSTATE - FlxG.switchState(new ChartingState()); + FlxG.switchState(new FreeplayState()); #else startIntro(); #end From ceba27472c11ea12f8fdf49724e119cf84b57c48 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 00:57:42 -0500 Subject: [PATCH 14/23] charts and fixins --- CHANGELOG.md | 2 ++ source/Character.hx | 2 +- source/PlayState.hx | 7 ++++--- source/TitleState.hx | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d82781021..a9dda5dd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ 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] +### Changed +- Made it less punishing to ATTEMPT to hit a note and miss, rather than let it pass you ### Fixed - Song desync of you paused and unpaused frequently ([shoutouts SonicBlam](https://github.com/ninjamuffin99/Funkin/issues/37)) diff --git a/source/Character.hx b/source/Character.hx index f29efc018..f79dfa3d1 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -239,7 +239,7 @@ class Character extends FlxSprite playAnim('idle'); case 'monster': playAnim('idle'); - case 'lucky': + case 'pico': playAnim('idle'); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index d0ce1e592..f4d1b5486 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -179,7 +179,7 @@ class PlayState extends MusicBeatState var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(AssetPaths.behindTrain__png); add(streetBehind); - phillyTrain = new FlxSprite(2000, 300).loadGraphic(AssetPaths.train__png); + phillyTrain = new FlxSprite(2000, 360).loadGraphic(AssetPaths.train__png); add(phillyTrain); trainSound = new FlxSound().loadEmbedded('assets/sounds/train_passes' + TitleState.soundExt); @@ -1242,7 +1242,7 @@ class PlayState extends MusicBeatState { if (!boyfriend.stunned) { - health -= 0.06; + health -= 0.025; if (combo > 5) { gf.playAnim('sad'); @@ -1419,6 +1419,7 @@ class PlayState extends MusicBeatState // trainSound.stop(); // trainSound.time = 0; trainCars = 8; + trainFinishing = false; startedMoving = false; } @@ -1526,7 +1527,7 @@ class PlayState extends MusicBeatState phillyCityLights.members[curLight].alpha = 1; } - if (totalBeats % 8 == 4 && FlxG.random.bool(40) && !trainMoving) + if (totalBeats % 8 == 4 && FlxG.random.bool(30) && !trainMoving) { trainStart(); } diff --git a/source/TitleState.hx b/source/TitleState.hx index 59eed5b70..ba0012ec6 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -69,7 +69,7 @@ class TitleState extends MusicBeatState } #if SKIP_TO_PLAYSTATE - FlxG.switchState(new FreeplayState()); + FlxG.switchState(new ChartingState()); #else startIntro(); #end From 7874300986c3fa7ab403ad8656cda549565d1bb2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 04:15:24 -0500 Subject: [PATCH 15/23] week setup? --- source/FreeplayState.hx | 2 +- source/MenuCharacter.hx | 1 + source/MenuItem.hx | 1 + source/PlayState.hx | 10 +++++----- source/StoryMenuState.hx | 24 ++++++++++++++++++------ source/TitleState.hx | 4 ++-- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 19a05ed20..8d6fd5a18 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["Pico", "Blammed", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["Pico", "Philly", "Blammed", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index 6835daa9a..b550c330c 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -21,6 +21,7 @@ class MenuCharacter extends FlxSprite animation.addByPrefix('gf', "GF Dancing Beat WHITE", 24); animation.addByPrefix('dad', "Dad idle dance BLACK LINE", 24); animation.addByPrefix('spooky', "spooky dance idle BLACK LINES", 24); + animation.addByPrefix('pico', "Pico Idle Dance", 24); animation.play(character); updateHitbox(); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index e5bf62c9e..32652114c 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -22,6 +22,7 @@ class MenuItem extends FlxSpriteGroup week.animation.addByPrefix('week0', 'tutorial selected', 24); week.animation.addByPrefix('week1', "WEEK1 select", 24); week.animation.addByPrefix('week2', "week2 select", 24); + week.animation.addByPrefix('week3', "Week 3 press", 24); add(week); week.animation.play('week' + weekNum); diff --git a/source/PlayState.hx b/source/PlayState.hx index f4d1b5486..0f420c772 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -149,7 +149,7 @@ class PlayState extends MusicBeatState isHalloween = true; } - else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed') + else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed' || SONG.song.toLowerCase() == 'philly') { curStage = 'philly'; @@ -898,7 +898,7 @@ class PlayState extends MusicBeatState { if (daNote.tooLate || !daNote.wasGoodHit) { - health -= 0.04; + health -= 0.045; vocals.volume = 0; } @@ -939,7 +939,7 @@ class PlayState extends MusicBeatState FlxG.switchState(new StoryMenuState()); // if () - StoryMenuState.weekUnlocked[2] = true; + StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek, StoryMenuState.weekUnlocked.length - 1))] = true; if (SONG.validScore) { @@ -1242,7 +1242,7 @@ class PlayState extends MusicBeatState { if (!boyfriend.stunned) { - health -= 0.025; + health -= 0.035; if (combo > 5) { gf.playAnim('sad'); @@ -1407,7 +1407,7 @@ class PlayState extends MusicBeatState trainFinishing = true; } - if (phillyTrain.x < 0 && trainFinishing) + if (phillyTrain.x < -4000 && trainFinishing) trainReset(); } } diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index d5338b2af..d0ae3ef06 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -17,12 +17,22 @@ class StoryMenuState extends MusicBeatState { var scoreText:FlxText; - var weekData:Array = [['Tutorial'], ['Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South']]; + var weekData:Array = [ + ['Tutorial'], + ['Bopeebo', 'Fresh', 'Dadbattle'], + ['Spookeez', 'South'], + ['Pico', 'Philly', "Blammed"] + ]; var curDifficulty:Int = 1; - public static var weekUnlocked:Array = [true, true, false]; + public static var weekUnlocked:Array = [true, true, false, false]; - var weekCharacters:Array = [['dad', 'bf', 'gf'], ['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']]; + var weekCharacters:Array = [ + ['dad', 'bf', 'gf'], + ['dad', 'bf', 'gf'], + ['spooky', 'bf', 'gf'], + ['pico', 'bf', 'gf'] + ]; var curWeek:Int = 0; var txtTracklist:FlxText; @@ -113,6 +123,8 @@ class StoryMenuState extends MusicBeatState case 'gf': weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.5)); weekCharacterThing.updateHitbox(); + case 'pico': + weekCharacterThing.y += 60; } grpWeekCharacters.add(weekCharacterThing); @@ -231,11 +243,12 @@ class StoryMenuState extends MusicBeatState var movedBack:Bool = false; var selectedWeek:Bool = false; var stopspamming:Bool = false; + function selectWeek() { if (weekUnlocked[curWeek]) { - if (stopspamming == false) + if (stopspamming == false) { FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt); @@ -356,10 +369,9 @@ class StoryMenuState extends MusicBeatState txtTracklist.screenCenter(X); txtTracklist.x -= FlxG.width * 0.35; - + #if !switch intendedScore = Highscore.getWeekScore(curWeek, curDifficulty); #end - } } diff --git a/source/TitleState.hx b/source/TitleState.hx index ba0012ec6..6d43402c5 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -64,8 +64,8 @@ class TitleState extends MusicBeatState { StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked; - if (StoryMenuState.weekUnlocked.length < 3) - StoryMenuState.weekUnlocked.insert(0, true); + if (StoryMenuState.weekUnlocked.length < 4) + StoryMenuState.weekUnlocked.insert(0, false); } #if SKIP_TO_PLAYSTATE From 930c9ccd1a1ba8fb772ace49261cde14b99c21ff Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 06:45:00 -0500 Subject: [PATCH 16/23] gf assets and offsets update --- CHANGELOG.md | 1 + source/Character.hx | 7 +++++-- source/FreeplayState.hx | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9dda5dd2..4ecb8ada4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Made it less punishing to ATTEMPT to hit a note and miss, rather than let it pass you ### Fixed - Song desync of you paused and unpaused frequently ([shoutouts SonicBlam](https://github.com/ninjamuffin99/Funkin/issues/37)) +- Animation offsets when GF is scared ## [0.2.3] - 2020-12-04 ### Added diff --git a/source/Character.hx b/source/Character.hx index f79dfa3d1..f775cbea6 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -41,7 +41,8 @@ class Character extends FlxSprite animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false); 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.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24); + animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false); animation.addByPrefix('scared', 'GF FEAR', 24); addOffset('cheer'); @@ -53,8 +54,10 @@ class Character extends FlxSprite addOffset("singRIGHT", 0, -20); addOffset("singLEFT", 0, -19); addOffset("singDOWN", 0, -20); + addOffset('hairBlow', 45, -8); + addOffset('hairFall', 0, -9); - addOffset('scared'); + addOffset('scared', -2, -17); playAnim('danceRight'); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 8d6fd5a18..d1e369bd3 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -48,6 +48,13 @@ class FreeplayState extends MusicBeatState songs.push('South'); } + if (StoryMenuState.weekUnlocked[3] || isDebug) + { + songs.push('Pico'); + songs.push('Philly'); + songs.push('Blammed'); + } + // LOAD MUSIC // LOAD CHARACTERS From fefa5f80519371161aa7edab9fe9af047f2901e2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 07:55:39 -0500 Subject: [PATCH 17/23] philly charts and hair --- source/Character.hx | 21 ++++++++++++++++----- source/PlayState.hx | 2 ++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index f775cbea6..51d683081 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -210,6 +210,13 @@ class Character extends FlxSprite } } + switch (curCharacter) + { + case 'gf': + if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished) + playAnim('danceRight'); + } + super.update(elapsed); } @@ -225,12 +232,16 @@ class Character extends FlxSprite case 'bf': case 'gf': - danced = !danced; + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); case 'spooky': danced = !danced; diff --git a/source/PlayState.hx b/source/PlayState.hx index 0f420c772..7dec60e54 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1392,6 +1392,7 @@ class PlayState extends MusicBeatState if (trainSound.time >= 4700) { startedMoving = true; + gf.playAnim('hairBlow'); } if (startedMoving) @@ -1414,6 +1415,7 @@ class PlayState extends MusicBeatState function trainReset():Void { + gf.playAnim('hairFall'); phillyTrain.x = FlxG.width + 200; trainMoving = false; // trainSound.stop(); From edd4fc5b58d912c229d13d5c290e5c3866723d0e Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 08:08:41 -0500 Subject: [PATCH 18/23] changelog and update shit --- CHANGELOG.md | 4 ++++ Project.xml | 2 +- source/FreeplayState.hx | 2 +- source/PlayState.hx | 7 ++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ecb8ada4..e5b59f9b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ 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] +### Added +- 3 NEW SONGS BY KAWAISPRITE. Pico, Philly, and Blammed. +- NEW CHARACTER, PICO. Based off the classic Flash game "Pico's School" by Tom Fulp +- NEW LEVEL WOW! PHILLY BABEEEE ### Changed - Made it less punishing to ATTEMPT to hit a note and miss, rather than let it pass you ### Fixed diff --git a/Project.xml b/Project.xml index 2dc527c06..b150255b9 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index d1e369bd3..7c45fb287 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["Pico", "Philly", "Blammed", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/PlayState.hx b/source/PlayState.hx index 7dec60e54..450a5a87e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1377,6 +1377,7 @@ class PlayState extends MusicBeatState var trainCars:Int = 8; var trainFinishing:Bool = false; + var trainCooldown:Int = 0; function trainStart():Void { @@ -1516,6 +1517,9 @@ class PlayState extends MusicBeatState switch (curStage) { case "philly": + if (!trainMoving) + trainCooldown += 1; + if (totalBeats % 4 == 0) { phillyCityLights.forEach(function(light:FlxSprite) @@ -1529,8 +1533,9 @@ class PlayState extends MusicBeatState phillyCityLights.members[curLight].alpha = 1; } - if (totalBeats % 8 == 4 && FlxG.random.bool(30) && !trainMoving) + if (totalBeats % 8 == 4 && FlxG.random.bool(30) && !trainMoving && trainCooldown > 8) { + trainCooldown = FlxG.random.int(-4, 0); trainStart(); } } From 88ada9d34587a39018794d9d22bb2940702d4e92 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 08:49:06 -0500 Subject: [PATCH 19/23] tutorial patch --- source/StoryMenuState.hx | 4 +++- source/TitleState.hx | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index d0ae3ef06..b881fa9cc 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -124,7 +124,9 @@ class StoryMenuState extends MusicBeatState weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.5)); weekCharacterThing.updateHitbox(); case 'pico': - weekCharacterThing.y += 60; + weekCharacterThing.y += 170; + weekCharacterThing.flipX = true; + weekCharacterThing.x -= 40; } grpWeekCharacters.add(weekCharacterThing); diff --git a/source/TitleState.hx b/source/TitleState.hx index 6d43402c5..26bb4405b 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -65,11 +65,15 @@ class TitleState extends MusicBeatState StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked; if (StoryMenuState.weekUnlocked.length < 4) - StoryMenuState.weekUnlocked.insert(0, false); + StoryMenuState.weekUnlocked.insert(0, true); + + // QUICK PATCH OOPS! + if (!StoryMenuState.weekUnlocked[0]) + StoryMenuState.weekUnlocked[0] = true; } #if SKIP_TO_PLAYSTATE - FlxG.switchState(new ChartingState()); + FlxG.switchState(new StoryMenuState()); #else startIntro(); #end From 9738b1ac93ffcb31beeacf992f44e21c7844877d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 11 Dec 2020 17:22:22 -0500 Subject: [PATCH 20/23] changelog shit --- CHANGELOG.md | 2 +- source/PlayState.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b59f9b8..ffce7b604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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.4] - 2020-12-11 ### Added - 3 NEW SONGS BY KAWAISPRITE. Pico, Philly, and Blammed. - NEW CHARACTER, PICO. Based off the classic Flash game "Pico's School" by Tom Fulp diff --git a/source/PlayState.hx b/source/PlayState.hx index 450a5a87e..ff7aab0a3 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -939,7 +939,7 @@ class PlayState extends MusicBeatState FlxG.switchState(new StoryMenuState()); // if () - StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek, StoryMenuState.weekUnlocked.length - 1))] = true; + StoryMenuState.weekUnlocked[Std.int(Math.min(storyWeek + 1, StoryMenuState.weekUnlocked.length - 1))] = true; if (SONG.validScore) { From 1a897d27984d565fa2761de47dde26cd25114701 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 13 Dec 2020 01:08:21 -0500 Subject: [PATCH 21/23] lol idk lol --- CHANGELOG.md | 2 ++ source/PlayState.hx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffce7b604..f28da89b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ 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.4] - 2020-12-11 ### Added - 3 NEW SONGS BY KAWAISPRITE. Pico, Philly, and Blammed. diff --git a/source/PlayState.hx b/source/PlayState.hx index ff7aab0a3..6d4933102 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -659,7 +659,7 @@ class PlayState extends MusicBeatState } } - phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed; + // phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed; } super.update(elapsed); @@ -1530,7 +1530,7 @@ class PlayState extends MusicBeatState curLight = FlxG.random.int(0, phillyCityLights.length - 1); phillyCityLights.members[curLight].visible = true; - phillyCityLights.members[curLight].alpha = 1; + // phillyCityLights.members[curLight].alpha = 1; } if (totalBeats % 8 == 4 && FlxG.random.bool(30) && !trainMoving && trainCooldown > 8) From b5c77a060d67aa9bb1f03a5535804bfeb3e43cdc Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 13 Dec 2020 01:42:48 -0500 Subject: [PATCH 22/23] colol workflow?? --- .github/workflows/superlinter.yml | 25 +++++++++++++++++++++++++ CHANGELOG.md | 3 +++ Project.xml | 2 +- source/PlayState.hx | 24 ++++++++++++++---------- 4 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/superlinter.yml diff --git a/.github/workflows/superlinter.yml b/.github/workflows/superlinter.yml new file mode 100644 index 000000000..7c11dc827 --- /dev/null +++ b/.github/workflows/superlinter.yml @@ -0,0 +1,25 @@ +name: Super-Linter + +# Run this workflow every time a new commit pushed to your repository +on: push + +jobs: + # Set the job key. The key is displayed as the job name + # when a job name is not provided + super-lint: + # Name the Job + name: Lint code base + # Set the type of machine to run on + runs-on: ubuntu-latest + + steps: + # Checks out a copy of your repository on the ubuntu-latest machine + - name: Checkout code + uses: actions/checkout@v2 + + # Runs the Super-Linter action + - name: Run Super-Linter + uses: github/super-linter@v3 + env: + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f28da89b9..2f39c89b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ 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] +### Fixed +- When pausing music at the start, it doesn't continue the song anyways. ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48)) +- IDK i think backing out of song menu should play main menu songs again hehe ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48)) ## [0.2.4] - 2020-12-11 ### Added diff --git a/Project.xml b/Project.xml index b150255b9..21ed84198 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/source/PlayState.hx b/source/PlayState.hx index 90f453be4..1a58bc483 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -627,10 +627,7 @@ class PlayState extends MusicBeatState { if (FlxG.sound.music != null && !startingSong) { - FlxG.sound.music.play(); - Conductor.songPosition = FlxG.sound.music.time; - vocals.time = Conductor.songPosition; - vocals.play(); + resyncVocals(); } if (!startTimer.finished) @@ -641,6 +638,16 @@ class PlayState extends MusicBeatState super.closeSubState(); } + function resyncVocals():Void + { + vocals.pause(); + + FlxG.sound.music.play(); + Conductor.songPosition = FlxG.sound.music.time; + vocals.time = Conductor.songPosition; + vocals.play(); + } + private var paused:Bool = false; var startedCountdown:Bool = false; var canPause:Bool = true; @@ -800,7 +807,7 @@ class PlayState extends MusicBeatState switch (totalBeats) { case 128, 129, 130: - vocals.volume = 0; + vocals.volume = 0; // FlxG.sound.music.stop(); // curLevel = 'Fresh'; // FlxG.switchState(new PlayState()); @@ -1445,12 +1452,9 @@ class PlayState extends MusicBeatState { if (SONG.needsVoices) { - if (vocals.time > Conductor.songPosition + Conductor.stepCrochet - || vocals.time < Conductor.songPosition - Conductor.stepCrochet) + if (vocals.time > Conductor.songPosition + 20 || vocals.time < Conductor.songPosition - 20) { - vocals.pause(); - vocals.time = Conductor.songPosition; - vocals.play(); + resyncVocals(); } } From 2ff2d57540c91bbcd8eca3b29f9c7eba25c5b189 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 13 Dec 2020 02:45:36 -0500 Subject: [PATCH 23/23] new shit babyu --- .github/workflows/superlinter.yml | 29 +++++++---------------------- source/MainMenuState.hx | 2 +- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/superlinter.yml b/.github/workflows/superlinter.yml index 7c11dc827..799adf821 100644 --- a/.github/workflows/superlinter.yml +++ b/.github/workflows/superlinter.yml @@ -1,25 +1,10 @@ -name: Super-Linter - -# Run this workflow every time a new commit pushed to your repository -on: push - +name: learn-github-actions +on: [push] jobs: - # Set the job key. The key is displayed as the job name - # when a job name is not provided - super-lint: - # Name the Job - name: Lint code base - # Set the type of machine to run on + check-bats-version: runs-on: ubuntu-latest - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - - # Runs the Super-Linter action - - name: Run Super-Linter - uses: github/super-linter@v3 - env: - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm install -g bats + - run: bats -v diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 9bb35e77f..3446f4721 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -81,7 +81,7 @@ class MainMenuState extends MusicBeatState FlxG.camera.follow(camFollow, null, 0.06); - var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, "v" + Application.current.meta.get('version')); + var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, "v" + Application.current.meta.get('version'), 12); versionShit.scrollFactor.set(); versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit);