From aedac402cf7ec925bfd010e8cdbc2aaf92d0dda0 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 15 Dec 2020 22:00:22 -0500 Subject: [PATCH 01/86] NGio bootleg API bullshit --- .github/workflows/superlinter.yml | 16 ++++++++-------- source/MainMenuState.hx | 3 +++ source/NGio.hx | 5 +++++ source/TitleState.hx | 2 ++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/superlinter.yml b/.github/workflows/superlinter.yml index 799adf821..7f2c82e13 100644 --- a/.github/workflows/superlinter.yml +++ b/.github/workflows/superlinter.yml @@ -1,10 +1,10 @@ -name: learn-github-actions -on: [push] jobs: - check-bats-version: - runs-on: ubuntu-latest + build: + runs-on: [ubuntu-latest, macos-latest] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - run: npm install -g bats - - run: bats -v + - uses: krdlab/setup-haxe@v1 + with: + haxe-version: 4.0.5 + - run: | + haxe -version + haxelib install hxnodejs \ No newline at end of file diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 3446f4721..fceb951a4 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -10,6 +10,7 @@ import flixel.text.FlxText; import flixel.tweens.FlxEase; import flixel.tweens.FlxTween; import flixel.util.FlxColor; +import io.newgrounds.NG; import lime.app.Application; class MainMenuState extends MusicBeatState @@ -86,6 +87,8 @@ class MainMenuState extends MusicBeatState versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); + NG.core.calls.event.logEvent('swag').send(); + changeItem(); super.create(); diff --git a/source/NGio.hx b/source/NGio.hx index 2073c073b..cafc26b37 100644 --- a/source/NGio.hx +++ b/source/NGio.hx @@ -22,6 +22,11 @@ class NGio public static var ngDataLoaded(default, null):FlxSignal = new FlxSignal(); public static var ngScoresLoaded(default, null):FlxSignal = new FlxSignal(); + public static function noLogin(api:String) + { + NG.create(api); + } + public function new(api:String, encKey:String, ?sessionId:String) { trace("connecting to newgrounds"); diff --git a/source/TitleState.hx b/source/TitleState.hx index 26bb4405b..f2ca6f8f1 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -51,6 +51,8 @@ class TitleState extends MusicBeatState super.create(); + NGio.noLogin(APIStuff.API); + #if ng var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); trace('NEWGROUNDS LOL'); From bd4353fef262ad3f0592035138c18366945c1dec Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 15 Dec 2020 22:23:58 -0500 Subject: [PATCH 02/86] added quick and dirty build instructions --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 313730e50..a3d8f76cf 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,54 @@ This is the repository for Friday Night Funkin, a game originally made for Ludum Play the Ludum Dare prototype here: https://ninja-muffin24.itch.io/friday-night-funkin Play the Newgrounds one here: https://www.newgrounds.com/portal/view/770371 -Support the project on the itch.io page: https://ninja-muffin24.itch.io/funkin \ No newline at end of file +Support the project on the itch.io page: https://ninja-muffin24.itch.io/funkin + +## Build instructions + +### Installing shit + +First you need to install Haxe and HaxeFlixel. I'm too lazy to write and keep updated with that setup (which is pretty simple). +The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documentation/getting-started/) + +That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe discord server: https://discord.gg/5ybrNNWx9S + +Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml`, but here are the one's I'm using as of writing. + +``` +hscript +flixel-ui +newgrounds +``` + +so for each of those type `haxelib install [library]` so shit like `haxelib install newgrounds` + +### Ignored files + +I gitignore the API keys for the game, so that no one can nab them and post fake highscores on the leaderboards. But because of that the game +doesn't compile without it. + +Just make a file in `/source` and call it `APIStuff.hx`, and copy paste this into it + +```haxe +package; + +class APIStuff +{ + public static var API:String = ""; + public static var EncKey:String = ""; +} + +``` + +and you should be good to go there. + +### Compiling game + +Once you have all those installed, it's pretty easy to compile game! One that you can compile right off the bat is for HTML5, +you just need to run `lime test html5 -debug` in your command prompt in the project root. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) + +To run it for your desktop (Windows, Mac, Linux) it's a bit more complicated. I know for Windows you need to download Visual Studio Community 2017 or 2019 or something, and in the libraries download in that download somethin that says build tools LOL homie im too dumb idk how to do that shit most of the time. + +### Additional guides + +- [Command line basics](https://ninjamuffin99.newgrounds.com/news/post/1090480) \ No newline at end of file From 260dc55f71291a4d156aefab6b137d171cb7bbbc Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 15 Dec 2020 22:29:00 -0500 Subject: [PATCH 03/86] creds in readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index a3d8f76cf..310155234 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ Play the Ludum Dare prototype here: https://ninja-muffin24.itch.io/friday-night- Play the Newgrounds one here: https://www.newgrounds.com/portal/view/770371 Support the project on the itch.io page: https://ninja-muffin24.itch.io/funkin +## Credits / shoutouts + +- [ninjamuffin99 (me!)](twitter.com/ninja_muffin99) - Programmer +- [PhantomArcade3K](twitter.com/phantomarcade3k) and [Evilsk8r](twitter.com/evilsk8r) - Art +- [Kawaisprite](twitter.com/kawaisprite) - Musician + +This game was made with love to Newgrounds and it's community. Extra love to Tom Fulp. + ## Build instructions ### Installing shit From cd45f4cd3f2bbfa7b3fffef6ff6f59179a1f329f Mon Sep 17 00:00:00 2001 From: dinkstr Date: Thu, 17 Dec 2020 14:21:09 +0000 Subject: [PATCH 04/86] Fix broken Twitter links in readme :) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 310155234..f65fe6fc5 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ Support the project on the itch.io page: https://ninja-muffin24.itch.io/funkin ## Credits / shoutouts -- [ninjamuffin99 (me!)](twitter.com/ninja_muffin99) - Programmer -- [PhantomArcade3K](twitter.com/phantomarcade3k) and [Evilsk8r](twitter.com/evilsk8r) - Art -- [Kawaisprite](twitter.com/kawaisprite) - Musician +- [ninjamuffin99 (me!)](https://twitter.com/ninja_muffin99) - Programmer +- [PhantomArcade3K](https://twitter.com/phantomarcade3k) and [Evilsk8r](https://twitter.com/evilsk8r) - Art +- [Kawaisprite](https://twitter.com/kawaisprite) - Musician This game was made with love to Newgrounds and it's community. Extra love to Tom Fulp. @@ -62,4 +62,4 @@ To run it for your desktop (Windows, Mac, Linux) it's a bit more complicated. I ### Additional guides -- [Command line basics](https://ninjamuffin99.newgrounds.com/news/post/1090480) \ No newline at end of file +- [Command line basics](https://ninjamuffin99.newgrounds.com/news/post/1090480) From 656bb3bec3b7f38fd373cfd9c94b3ccb4152df6c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 17 Dec 2020 15:03:33 -0500 Subject: [PATCH 05/86] fix crash --- CHANGELOG.md | 1 + source/PlayState.hx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f39c89b3..84ecd5f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] ### Fixed +- Crash when playing Week 3 and then playing a non-week 3 song - 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)) diff --git a/source/PlayState.hx b/source/PlayState.hx index 1a58bc483..408948235 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -135,6 +135,7 @@ class PlayState extends MusicBeatState if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') { + curState = "spooky"; halloweenLevel = true; var hallowTex = FlxAtlasFrames.fromSparrow(AssetPaths.halloween_bg__png, AssetPaths.halloween_bg__xml); @@ -192,6 +193,7 @@ class PlayState extends MusicBeatState } else { + curStage = 'stage'; var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png); // bg.setGraphicSize(Std.int(bg.width * 2.5)); // bg.updateHitbox(); @@ -974,6 +976,7 @@ class PlayState extends MusicBeatState trace(PlayState.storyPlaylist[0].toLowerCase() + difficulty); PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]); + FlxG.sound.music.stop(); FlxG.switchState(new PlayState()); } } From 33acea20bf1da799e44dd881a16a6c00df68ce0b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 21 Dec 2020 16:23:22 -0500 Subject: [PATCH 06/86] poop --- source/PlayState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 408948235..5541e5789 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -135,7 +135,7 @@ class PlayState extends MusicBeatState if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') { - curState = "spooky"; + curStage = "spooky"; halloweenLevel = true; var hallowTex = FlxAtlasFrames.fromSparrow(AssetPaths.halloween_bg__png, AssetPaths.halloween_bg__xml); From b889648968fe51770664a09fb6a6f2e6d49b04a9 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 21 Dec 2020 17:20:57 -0500 Subject: [PATCH 07/86] songs --- source/TitleState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/TitleState.hx b/source/TitleState.hx index f2ca6f8f1..aaf5cb053 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -75,7 +75,7 @@ class TitleState extends MusicBeatState } #if SKIP_TO_PLAYSTATE - FlxG.switchState(new StoryMenuState()); + FlxG.switchState(new ChartingState()); #else startIntro(); #end From a7111abeb3882e278225aa3260a0a7254d86a1c7 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 22 Dec 2020 19:57:55 -0500 Subject: [PATCH 08/86] mom chart --- source/MainMenuState.hx | 5 +++++ source/NGio.hx | 28 ++++++++++++++++++++++----- source/OutdatedSubState.hx | 39 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 source/OutdatedSubState.hx diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index fceb951a4..e8aa27b01 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -87,6 +87,11 @@ class MainMenuState extends MusicBeatState versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); + if (versionShit.text != NGio.GAME_VER) + { + openSubState(new OutdatedSubState()); + } + NG.core.calls.event.logEvent('swag').send(); changeItem(); diff --git a/source/NGio.hx b/source/NGio.hx index cafc26b37..2b25adf36 100644 --- a/source/NGio.hx +++ b/source/NGio.hx @@ -7,6 +7,10 @@ import io.newgrounds.components.ScoreBoardComponent.Period; import io.newgrounds.objects.Medal; import io.newgrounds.objects.Score; import io.newgrounds.objects.ScoreBoard; +import io.newgrounds.objects.events.Response; +import io.newgrounds.objects.events.Result.GetCurrentVersionResult; +import io.newgrounds.objects.events.Result.GetVersionResult; +import lime.app.Application; import openfl.display.Stage; /** @@ -22,9 +26,26 @@ class NGio public static var ngDataLoaded(default, null):FlxSignal = new FlxSignal(); public static var ngScoresLoaded(default, null):FlxSignal = new FlxSignal(); + public static var GAME_VER:String = ""; + public static function noLogin(api:String) { + trace('INIT NOLOGIN'); + GAME_VER = "v" + Application.current.meta.get('version'); + NG.create(api); + + NG.onCoreReady.add(function() + { + trace('READY SHIT??'); + var call = NG.core.calls.gateway.getVersion().addDataHandler(function(response:Response) + { + GAME_VER = response.result.data.version; + trace('CURRENT NG VERSION: ' + GAME_VER); + }); + + call.send(); + }); } public function new(api:String, encKey:String, ?sessionId:String) @@ -153,11 +174,8 @@ class NGio inline static public function logEvent(event:String) { - if (isLoggedIn) - { - NG.core.calls.event.logEvent(event); - trace('should have logged: ' + event); - } + NG.core.calls.event.logEvent(event).send(); + trace('should have logged: ' + event); } inline static public function unlockMedal(id:Int) diff --git a/source/OutdatedSubState.hx b/source/OutdatedSubState.hx new file mode 100644 index 000000000..865c70d46 --- /dev/null +++ b/source/OutdatedSubState.hx @@ -0,0 +1,39 @@ +package; + +import flixel.FlxG; +import flixel.FlxSubState; +import flixel.text.FlxText; +import flixel.util.FlxColor; +import lime.app.Application; + +class OutdatedSubState extends MusicBeatSubstate +{ + public function new() + { + super(); + var ver = "v" + Application.current.meta.get('version'); + var txt:FlxText = new FlxText(0, 0, 0, + "HEY! You're running an outdated version of the game!\nCurrent version is " + + ver + + " while the current version is " + + NGio.GAME_VER + + " ! Press Space to go to itch.io, or ESCAPE to ignore this!!", + 32); + txt.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, CENTER); + txt.screenCenter(); + add(txt); + } + + override function update(elapsed:Float) + { + if (controls.ACCEPT) + { + FlxG.openURL("https://ninja-muffin24.itch.io/funkin"); + } + if (controls.BACK) + { + close(); + } + super.update(elapsed); + } +} From 7f16f0341e42dd4663de5a0298f837e07dd74e5c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 22 Dec 2020 20:55:03 -0500 Subject: [PATCH 09/86] cool shit mommy gf --- source/Character.hx | 21 +++++++++++++++++++++ source/ChartingState.hx | 2 +- source/PlayState.hx | 23 +++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/source/Character.hx b/source/Character.hx index 51d683081..8565945e4 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -96,6 +96,25 @@ class Character extends FlxSprite addOffset("singDOWN", -50, -130); playAnim('danceRight'); + case 'mom': + tex = FlxAtlasFrames.fromSparrow(AssetPaths.Mom_Assets__png, AssetPaths.Mom_Assets__xml); + frames = tex; + + animation.addByPrefix('idle', "Mom Idle", 24, false); + animation.addByPrefix('singUP', "Mom Up Pose", 24, false); + animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false); + animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false); + // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT + // CUZ DAVE IS DUMB! + animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); + + playAnim('idle'); + + addOffset('idle'); + addOffset("singUP", 14, 71); + addOffset("singRIGHT", 10, -60); + addOffset("singLEFT", 250, -23); + addOffset("singDOWN", 20, -160); case 'monster': tex = FlxAtlasFrames.fromSparrow(AssetPaths.Monster_Assets__png, AssetPaths.Monster_Assets__xml); frames = tex; @@ -229,6 +248,8 @@ class Character extends FlxSprite { switch (curCharacter) { + case 'mom': + playAnim('idle'); case 'bf': case 'gf': diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 41ed16e9c..cc93694e8 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', 'pico']; + var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom']; var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { diff --git a/source/PlayState.hx b/source/PlayState.hx index 5541e5789..b16591b10 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -351,6 +351,7 @@ class PlayState extends MusicBeatState } var startTimer:FlxTimer; + var perfectMode:Bool = false; function startCountdown():Void { @@ -656,6 +657,16 @@ class PlayState extends MusicBeatState override public function update(elapsed:Float) { + #if !debug + perfectMode = false; + #end + + if (FlxG.keys.justPressed.NINE) + { + perfectMode = !perfectMode; + trace('PERFECT MODE! ' + perfectMode); + } + switch (curStage) { case 'philly': @@ -757,6 +768,8 @@ class PlayState extends MusicBeatState { camFollow.setPosition(dad.getMidpoint().x + 150, dad.getMidpoint().y - 100); // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); + if (dad.curCharacter == 'mom') + camFollow.y = dad.getMidpoint().y; vocals.volume = 1; if (SONG.song.toLowerCase() == 'tutorial') @@ -1150,6 +1163,9 @@ class PlayState extends MusicBeatState { for (daNote in possibleNotes) { + if (perfectMode) + noteCheck(true, daNote); + switch (daNote.noteData) { case 2: // NOTES YOU JUST PRESSED @@ -1497,6 +1513,13 @@ class PlayState extends MusicBeatState } // FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM); + // HARDCODING FOR MILF ZOOMS! + if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat <= 200 && camZooming && FlxG.camera.zoom < 1.35) + { + FlxG.camera.zoom += 0.015; + camHUD.zoom += 0.03; + } + if (camZooming && FlxG.camera.zoom < 1.35 && totalBeats % 4 == 0) { FlxG.camera.zoom += 0.015; From afac78707699f8044fa4fe6ab964f8e349f64072 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 24 Dec 2020 18:24:11 -0500 Subject: [PATCH 10/86] moved flash files --- CHANGELOG.md | 2 ++ source/FreeplayState.hx | 2 +- source/HealthIcon.hx | 25 +++++++++++++++++++ source/PlayState.hx | 55 ++++++++++++++++++++++++----------------- 4 files changed, 61 insertions(+), 23 deletions(-) create mode 100644 source/HealthIcon.hx diff --git a/CHANGELOG.md b/CHANGELOG.md index 84ecd5f0f..017b7bb07 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] +### Added +- Different icons depending on which character you are against ### Fixed - Crash when playing Week 3 and then playing a non-week 3 song - 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)) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 7c45fb287..ede087ed8 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 = ["Milf", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx new file mode 100644 index 000000000..b5be951f5 --- /dev/null +++ b/source/HealthIcon.hx @@ -0,0 +1,25 @@ +package; + +import flixel.FlxSprite; + +class HealthIcon extends FlxSprite +{ + public function new(char:String = 'bf', isPlayer:Bool = false) + { + super(); + + loadGraphic(AssetPaths.iconGrid__png, true, 150, 150); + + antialiasing = true; + animation.add('bf', [0, 1], 0, false, isPlayer); + animation.add('spooky', [2, 3], 0, false, isPlayer); + animation.add('pico', [4, 5], 0, false, isPlayer); + animation.add('mom', [6, 7], 0, false, isPlayer); + animation.add('tankman', [8, 9], 0, false, isPlayer); + animation.add('face', [10, 11], 0, false, isPlayer); + animation.add('dad', [12, 13], 0, false, isPlayer); + animation.add('bf-old', [14, 15], 0, false, isPlayer); + animation.play(char); + scrollFactor.set(); + } +} diff --git a/source/PlayState.hx b/source/PlayState.hx index b16591b10..d4a6307df 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -73,7 +73,8 @@ class PlayState extends MusicBeatState private var generatedMusic:Bool = false; private var startingSong:Bool = false; - private var healthHeads:FlxSprite; + private var iconP1:HealthIcon; + private var iconP2:HealthIcon; private var camHUD:FlxCamera; private var camGame:FlxCamera; @@ -309,17 +310,14 @@ class PlayState extends MusicBeatState scoreTxt.scrollFactor.set(); add(scoreTxt); - healthHeads = new FlxSprite(); - var headTex = FlxAtlasFrames.fromSparrow(AssetPaths.healthHeads__png, AssetPaths.healthHeads__xml); - healthHeads.frames = headTex; - healthHeads.animation.add('healthy', [0]); - healthHeads.animation.add('unhealthy', [1]); - healthHeads.y = healthBar.y - (healthHeads.height / 2); - healthHeads.scrollFactor.set(); - healthHeads.antialiasing = true; - add(healthHeads); + iconP1 = new HealthIcon(SONG.player1, true); + iconP1.y = healthBar.y - (iconP1.height / 2); + add(iconP1); + + iconP2 = new HealthIcon(SONG.player2, false); + iconP2.y = healthBar.y - (iconP2.height / 2); + add(iconP2); - // healthBar.visible = healthHeads.visible = healthBarBG.visible = false; if (isStoryMode) { // TEMP for now, later get rid of startCountdown() @@ -333,7 +331,8 @@ class PlayState extends MusicBeatState notes.cameras = [camHUD]; healthBar.cameras = [camHUD]; healthBarBG.cameras = [camHUD]; - healthHeads.cameras = [camHUD]; + iconP1.cameras = [camHUD]; + iconP2.cameras = [camHUD]; scoreTxt.cameras = [camHUD]; doof.cameras = [camHUD]; @@ -663,8 +662,10 @@ class PlayState extends MusicBeatState if (FlxG.keys.justPressed.NINE) { - perfectMode = !perfectMode; - trace('PERFECT MODE! ' + perfectMode); + if (iconP1.animation.curAnim.name == 'bf-old') + iconP1.animation.play(SONG.player1); + else + iconP1.animation.play('bf-old'); } switch (curStage) @@ -705,17 +706,24 @@ class PlayState extends MusicBeatState // FlxG.watch.addQuick('VOL', vocals.amplitudeLeft); // FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight); - healthHeads.setGraphicSize(Std.int(FlxMath.lerp(150, healthHeads.width, 0.50))); - healthHeads.updateHitbox(); - healthHeads.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (healthHeads.width / 2); + iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.50))); + iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.50))); + + iconP1.updateHitbox(); + iconP2.updateHitbox(); + + var iconOffset:Int = 26; + + iconP1.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01) - iconOffset); + iconP2.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (iconP2.width - iconOffset); if (health > 2) health = 2; if (healthBar.percent < 20) - healthHeads.animation.play('unhealthy'); + iconP1.animation.curAnim.curFrame = 1; else - healthHeads.animation.play('healthy'); + iconP1.animation.curAnim.curFrame = 0; /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ @@ -914,7 +922,7 @@ class PlayState extends MusicBeatState daNote.destroy(); } - daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * PlayState.SONG.speed)); + 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)); @@ -1526,8 +1534,11 @@ class PlayState extends MusicBeatState camHUD.zoom += 0.03; } - healthHeads.setGraphicSize(Std.int(healthHeads.width + 30)); - healthHeads.updateHitbox(); + iconP1.setGraphicSize(Std.int(iconP1.width + 30)); + iconP2.setGraphicSize(Std.int(iconP2.width + 30)); + + iconP1.updateHitbox(); + iconP2.updateHitbox(); if (totalBeats % gfSpeed == 0) { From 649ce2bc9d7cf5047f0be9b3bb78194b278167b6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 25 Dec 2020 00:17:21 -0500 Subject: [PATCH 11/86] outdated check --- source/MainMenuState.hx | 8 +++++--- source/NGio.hx | 10 ++++++---- source/OutdatedSubState.hx | 16 +++++++++++----- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index e8aa27b01..0f287a040 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -87,12 +87,14 @@ class MainMenuState extends MusicBeatState versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); - if (versionShit.text != NGio.GAME_VER) + if (versionShit.text != NGio.GAME_VER && !OutdatedSubState.leftState) { - openSubState(new OutdatedSubState()); + trace('OLD VERSION!'); + + FlxG.switchState(new OutdatedSubState()); } - NG.core.calls.event.logEvent('swag').send(); + // NG.core.calls.event.logEvent('swag').send(); changeItem(); diff --git a/source/NGio.hx b/source/NGio.hx index 2b25adf36..96ced6257 100644 --- a/source/NGio.hx +++ b/source/NGio.hx @@ -2,6 +2,7 @@ package; import flixel.FlxG; import flixel.util.FlxSignal; +import flixel.util.FlxTimer; import io.newgrounds.NG; import io.newgrounds.components.ScoreBoardComponent.Period; import io.newgrounds.objects.Medal; @@ -27,6 +28,7 @@ class NGio public static var ngScoresLoaded(default, null):FlxSignal = new FlxSignal(); public static var GAME_VER:String = ""; + public static var gotOnlineVer:Bool = false; public static function noLogin(api:String) { @@ -35,13 +37,13 @@ class NGio NG.create(api); - NG.onCoreReady.add(function() + new FlxTimer().start(2, function(tmr:FlxTimer) { - trace('READY SHIT??'); - var call = NG.core.calls.gateway.getVersion().addDataHandler(function(response:Response) + var call = NG.core.calls.app.getCurrentVersion(GAME_VER).addDataHandler(function(response:Response) { - GAME_VER = response.result.data.version; + GAME_VER = response.result.data.current_version; trace('CURRENT NG VERSION: ' + GAME_VER); + gotOnlineVer = true; }); call.send(); diff --git a/source/OutdatedSubState.hx b/source/OutdatedSubState.hx index 865c70d46..06d0aae70 100644 --- a/source/OutdatedSubState.hx +++ b/source/OutdatedSubState.hx @@ -1,18 +1,23 @@ package; import flixel.FlxG; +import flixel.FlxSprite; import flixel.FlxSubState; import flixel.text.FlxText; import flixel.util.FlxColor; import lime.app.Application; -class OutdatedSubState extends MusicBeatSubstate +class OutdatedSubState extends MusicBeatState { - public function new() + public static var leftState:Bool = false; + + override function create() { - super(); + super.create(); + var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK); + add(bg); var ver = "v" + Application.current.meta.get('version'); - var txt:FlxText = new FlxText(0, 0, 0, + var txt:FlxText = new FlxText(0, 0, FlxG.width, "HEY! You're running an outdated version of the game!\nCurrent version is " + ver + " while the current version is " @@ -32,7 +37,8 @@ class OutdatedSubState extends MusicBeatSubstate } if (controls.BACK) { - close(); + leftState = true; + FlxG.switchState(new MainMenuState()); } super.update(elapsed); } From 18b87b391ea8ac51314c9972b5804dab841d1808 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 25 Dec 2020 03:40:01 -0500 Subject: [PATCH 12/86] dumb lol! --- source/ChartingState.hx | 22 ++++++++++++++++++++++ source/MainMenuState.hx | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index cc93694e8..1832c6d00 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -242,6 +242,19 @@ class ChartingState extends MusicBeatState copySection(Std.int(stepperCopy.value)); }); + var clearSectionButton:FlxButton = new FlxButton(10, 150, "Clear", clearSection); + + var swapSection:FlxButton = new FlxButton(10, 170, "Swap section", function() + { + for (i in 0..._song.notes[curSection].sectionNotes.length) + { + var note = _song.notes[curSection].sectionNotes[i]; + note[1] = (note[1] + 4) % 8; + _song.notes[curSection].sectionNotes[i] = note; + updateGrid(); + } + }); + check_mustHitSection = new FlxUICheckBox(10, 30, null, null, "Must hit section", 100); check_mustHitSection.name = 'check_mustHit'; check_mustHitSection.checked = true; @@ -256,6 +269,8 @@ class ChartingState extends MusicBeatState tab_group_section.add(check_mustHitSection); tab_group_section.add(check_changeBPM); tab_group_section.add(copyButton); + tab_group_section.add(clearSectionButton); + tab_group_section.add(swapSection); UI_box.addGroup(tab_group_section); } @@ -722,6 +737,13 @@ class ChartingState extends MusicBeatState updateGrid(); } + function clearSection():Void + { + _song.notes[curSection].sectionNotes = []; + + updateGrid(); + } + function clearSong():Void { for (daSection in 0..._song.notes.length) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 0f287a040..5b1afb628 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -13,6 +13,8 @@ import flixel.util.FlxColor; import io.newgrounds.NG; import lime.app.Application; +using StringTools; + class MainMenuState extends MusicBeatState { var curSelected:Int = 0; @@ -87,7 +89,7 @@ class MainMenuState extends MusicBeatState versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); - if (versionShit.text != NGio.GAME_VER && !OutdatedSubState.leftState) + if (versionShit.text.trim() != NGio.GAME_VER.trim() && !OutdatedSubState.leftState) { trace('OLD VERSION!'); From ea1c0e388867769f1c2e7e34cd471d99197fef24 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 25 Dec 2020 04:09:14 -0500 Subject: [PATCH 13/86] AUTOSAVE FOR NOTE EDITOR! --- source/ChartingState.hx | 26 ++++++++++++++++++++++---- source/Song.hx | 11 +++++++---- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 1832c6d00..789dba736 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -102,6 +102,9 @@ class ChartingState extends MusicBeatState }; } + FlxG.mouse.visible = true; + FlxG.save.bind('funkin', 'ninjamuffin99'); + tempBpm = _song.bpm; addSection(); @@ -175,6 +178,8 @@ class ChartingState extends MusicBeatState loadJson(_song.song.toLowerCase()); }); + var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 60, 'load autosave', loadAutosave); + var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 1); stepperSpeed.value = _song.speed; stepperSpeed.name = 'song_speed'; @@ -206,6 +211,7 @@ class ChartingState extends MusicBeatState tab_group_song.add(saveButton); tab_group_song.add(reloadSong); tab_group_song.add(reloadSongJson); + tab_group_song.add(loadAutosaveBtn); tab_group_song.add(stepperBPM); tab_group_song.add(stepperSpeed); tab_group_song.add(player1DropDown); @@ -769,6 +775,8 @@ class ChartingState extends MusicBeatState updateGrid(); updateNoteUI(); + + autosaveSong(); } function getStrumTime(yPos:Float):Float @@ -829,11 +837,21 @@ class ChartingState extends MusicBeatState FlxG.resetState(); } - var mp3File:Sound; - var waveForm:FlxSprite; - - function drawWave():Void + function loadAutosave():Void { + PlayState.SONG = Song.parseJSONshit(FlxG.save.data.autosave); + FlxG.resetState(); + } + + function autosaveSong():Void + { + FlxG.save.data.autosave = Json.stringify({ + "song": _song, + "bpm": Conductor.bpm, + "sections": _song.notes.length, + 'notes': _song.notes + }); + FlxG.save.flush(); } private function saveLevel() diff --git a/source/Song.hx b/source/Song.hx index 772652b94..55827e79b 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -58,10 +58,6 @@ class Song // LOL GOING THROUGH THE BULLSHIT TO CLEAN IDK WHATS STRANGE } - var swagShit:SwagSong = cast Json.parse(rawJson).song; - swagShit.validScore = true; - trace(swagShit.notes[0]); - // FIX THE CASTING ON WINDOWS/NATIVE // Windows??? // trace(songData); @@ -80,6 +76,13 @@ class Song daBpm = songData.bpm; daSectionLengths = songData.sectionLengths; */ + return parseJSONshit(rawJson); + } + + public static function parseJSONshit(rawJson:String):SwagSong + { + var swagShit:SwagSong = cast Json.parse(rawJson).song; + swagShit.validScore = true; return swagShit; } } From cc83872fe4be0a0e851e5afabd4a2b753e543dde Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 25 Dec 2020 04:10:28 -0500 Subject: [PATCH 14/86] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 017b7bb07..c0b967ae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] ### Added - Different icons depending on which character you are against +- Autosave to chart editor +- Clear section button to note editor +- Swap button in note editor +### Changed +- Mouse is now visible in note editor ### Fixed - Crash when playing Week 3 and then playing a non-week 3 song - 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)) From 84eca4325cf53069d24704293bd491c264a2d1e9 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 25 Dec 2020 18:24:20 -0500 Subject: [PATCH 15/86] charts and shit fixied --- CHANGELOG.md | 1 + source/ChartingState.hx | 48 +++++++++++++++++++++++++++----------- source/MainMenuState.hx | 2 +- source/OutdatedSubState.hx | 4 ++-- 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0b967ae7..a73c08e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Clear section button to note editor - Swap button in note editor ### Changed +- Made Spookeez on Normal easier. - Mouse is now visible in note editor ### Fixed - Crash when playing Week 3 and then playing a non-week 3 song diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 789dba736..157ed2c11 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -178,7 +178,7 @@ class ChartingState extends MusicBeatState loadJson(_song.song.toLowerCase()); }); - var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 60, 'load autosave', loadAutosave); + var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 30, 'load autosave', loadAutosave); var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 1); stepperSpeed.value = _song.speed; @@ -510,21 +510,43 @@ class ChartingState extends MusicBeatState changeSection(curSection); } - if (FlxG.keys.pressed.W || FlxG.keys.pressed.S) + if (!FlxG.keys.pressed.SHIFT) { - FlxG.sound.music.pause(); - vocals.pause(); - - var daTime:Float = 700 * FlxG.elapsed; - - if (FlxG.keys.pressed.W) + if (FlxG.keys.pressed.W || FlxG.keys.pressed.S) { - FlxG.sound.music.time -= daTime; - } - else - FlxG.sound.music.time += daTime; + FlxG.sound.music.pause(); + vocals.pause(); - vocals.time = FlxG.sound.music.time; + var daTime:Float = 700 * FlxG.elapsed; + + if (FlxG.keys.pressed.W) + { + FlxG.sound.music.time -= daTime; + } + else + FlxG.sound.music.time += daTime; + + vocals.time = FlxG.sound.music.time; + } + } + else + { + if (FlxG.keys.justPressed.W || FlxG.keys.justPressed.S) + { + FlxG.sound.music.pause(); + vocals.pause(); + + var daTime:Float = Conductor.stepCrochet * 2; + + if (FlxG.keys.justPressed.W) + { + FlxG.sound.music.time -= daTime; + } + else + FlxG.sound.music.time += daTime; + + vocals.time = FlxG.sound.music.time; + } } } diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 5b1afb628..3bf7ef213 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -22,7 +22,7 @@ class MainMenuState extends MusicBeatState var menuItems:FlxTypedGroup; #if !switch - var optionShit:Array = ['story mode', 'freeplay', 'donate']; + var optionShit:Array = ['story mode', 'freeplay', 'options', 'donate']; #else var optionShit:Array = ['story mode', 'freeplay']; #end diff --git a/source/OutdatedSubState.hx b/source/OutdatedSubState.hx index 06d0aae70..962edd932 100644 --- a/source/OutdatedSubState.hx +++ b/source/OutdatedSubState.hx @@ -20,9 +20,9 @@ class OutdatedSubState extends MusicBeatState var txt:FlxText = new FlxText(0, 0, FlxG.width, "HEY! You're running an outdated version of the game!\nCurrent version is " + ver - + " while the current version is " + + " while the most recent version is " + NGio.GAME_VER - + " ! Press Space to go to itch.io, or ESCAPE to ignore this!!", + + "! Press Space to go to itch.io, or ESCAPE to ignore this!!", 32); txt.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, CENTER); txt.screenCenter(); From b07372aa8e301b04926511b1de59f40baf5faba2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 26 Dec 2020 21:46:22 -0500 Subject: [PATCH 16/86] CHARTS --- Project.xml | 1 + source/BlendModeEffect.hx | 34 ++++++++++++++++++++ source/ChartingState.hx | 4 +-- source/FreeplayState.hx | 2 +- source/OverlayShader.hx | 33 ++++++++++++++++++++ source/PauseSubState.hx | 2 +- source/PlayState.hx | 65 +++++++++++++++++++++++++++++++++++++-- source/TitleState.hx | 4 ++- 8 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 source/BlendModeEffect.hx create mode 100644 source/OverlayShader.hx diff --git a/Project.xml b/Project.xml index 21ed84198..878edf8c1 100644 --- a/Project.xml +++ b/Project.xml @@ -58,6 +58,7 @@ + diff --git a/source/BlendModeEffect.hx b/source/BlendModeEffect.hx new file mode 100644 index 000000000..1c9038be7 --- /dev/null +++ b/source/BlendModeEffect.hx @@ -0,0 +1,34 @@ +package; + +import flixel.util.FlxColor; +import openfl.display.ShaderParameter; + +typedef BlendModeShader = +{ + var uBlendColor:ShaderParameter; +} + +class BlendModeEffect +{ + public var shader(default, null):BlendModeShader; + + @:isVar + public var color(default, set):FlxColor; + + public function new(shader:BlendModeShader, color:FlxColor):Void + { + shader.uBlendColor.value = []; + this.shader = shader; + this.color = color; + } + + function set_color(color:FlxColor):FlxColor + { + shader.uBlendColor.value[0] = color.redFloat; + shader.uBlendColor.value[1] = color.greenFloat; + shader.uBlendColor.value[2] = color.blueFloat; + shader.uBlendColor.value[3] = color.alphaFloat; + + return this.color = color; + } +} diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 157ed2c11..3f8f8c190 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -241,9 +241,9 @@ class ChartingState extends MusicBeatState stepperSectionBPM.value = Conductor.bpm; stepperSectionBPM.name = 'section_bpm'; - var stepperCopy:FlxUINumericStepper = new FlxUINumericStepper(110, 30, 1, 1, -999, 999, 0); + var stepperCopy:FlxUINumericStepper = new FlxUINumericStepper(110, 130, 1, 1, -999, 999, 0); - var copyButton:FlxButton = new FlxButton(110, 8, "Copy last section", function() + var copyButton:FlxButton = new FlxButton(10, 130, "Copy last section", function() { copySection(Std.int(stepperCopy.value)); }); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index ede087ed8..699dc1a53 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["Milf", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["High", "Milf", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/OverlayShader.hx b/source/OverlayShader.hx new file mode 100644 index 000000000..4de9a555e --- /dev/null +++ b/source/OverlayShader.hx @@ -0,0 +1,33 @@ +package; + +import flixel.system.FlxAssets.FlxShader; + +class OverlayShader extends FlxShader +{ + @:glFragmentSource(' + #pragma header + uniform vec4 uBlendColor; + + vec3 blendLighten(base:Vec3, blend:Vec3) : Vec3 { + return mix( + 1.0 - 2.0 * (1.0 - base) * (1.0 - blend), + 2.0 * base * blend, + step( base, vec3(0.5) ) + ); + } + + vec4 blendLighten(vec4 base, vec4 blend, float opacity) + { + return (blendLighten(base, blend) * opacity + base * (1.0 - opacity)); + } + + void main() + { + vec4 base = texture2D(bitmap, openfl_TextureCoordv); + gl_FragColor = blendLighten(base, uBlendColor, uBlendColor.a); + }') + public function new() + { + super(); + } +} diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 1c7297043..ac747dbca 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -46,7 +46,7 @@ class PauseSubState extends MusicBeatSubstate changeSelection(); - cameras = [FlxG.cameras.list[1]]; + cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]]; } override function update(elapsed:Float) diff --git a/source/PlayState.hx b/source/PlayState.hx index d4a6307df..42ccb54db 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -29,6 +29,8 @@ import flixel.util.FlxStringUtil; import flixel.util.FlxTimer; import haxe.Json; import lime.utils.Assets; +import openfl.display.BlendMode; +import openfl.filters.ShaderFilter; using StringTools; @@ -87,12 +89,16 @@ class PlayState extends MusicBeatState var phillyTrain:FlxSprite; var trainSound:FlxSound; + var limo:FlxSprite; + var talking:Bool = true; var songScore:Int = 0; var scoreTxt:FlxText; public static var campaignScore:Int = 0; + var defaultCamZoom:Float = 1.05; + override public function create() { // var gameCam:FlxCamera = FlxG.camera; @@ -192,6 +198,41 @@ class PlayState extends MusicBeatState var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(AssetPaths.street__png); add(street); } + else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') + { + curStage = 'limo'; + defaultCamZoom = 0.90; + + var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(AssetPaths.limoSunset__png); + skyBG.scrollFactor.set(0.1, 0.1); + add(skyBG); + + var bgLimo:FlxSprite = new FlxSprite(-200, 400); + bgLimo.frames = FlxAtlasFrames.fromSparrow(AssetPaths.bgLimo__png, AssetPaths.bgLimo__xml); + bgLimo.animation.addByPrefix('drive', "BG limo", 24); + bgLimo.animation.play('drive'); + bgLimo.scrollFactor.set(0.4, 0.4); + add(bgLimo); + + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(AssetPaths.limoOverlay__png); + overlayShit.alpha = 0.5; + // add(overlayShit); + + // var shaderBullshit = new BlendModeEffect(new OverlayShader(), FlxColor.RED); + + // FlxG.camera.setFilters([new ShaderFilter(cast shaderBullshit.shader)]); + + // overlayShit.shader = shaderBullshit; + + var limoTex = FlxAtlasFrames.fromSparrow(AssetPaths.limoDrive__png, AssetPaths.limoDrive__xml); + + limo = new FlxSprite(-120, 550); + limo.frames = limoTex; + limo.animation.addByPrefix('drive', "Limo stage", 24); + limo.animation.play('drive'); + limo.antialiasing = true; + // add(limo); + } else { curStage = 'stage'; @@ -226,6 +267,10 @@ class PlayState extends MusicBeatState gf.antialiasing = true; add(gf); + // Shitty layering but whatev it works LOL + if (curStage == 'limo') + add(limo); + dad = new Character(100, 100, SONG.player2); add(dad); @@ -256,6 +301,16 @@ class PlayState extends MusicBeatState boyfriend = new Boyfriend(770, 450); add(boyfriend); + // REPOSITIONING PER STAGE + switch (curStage) + { + case 'limo': + { + boyfriend.y -= 220; + boyfriend.x += 260; + } + } + var doof:DialogueBox = new DialogueBox(false, dialogue); // doof.x += 70; doof.y = FlxG.height * 0.5; @@ -287,7 +342,7 @@ class PlayState extends MusicBeatState FlxG.camera.follow(camFollow, LOCKON, 0.04); // FlxG.camera.setScrollBounds(0, FlxG.width, 0, FlxG.height); - FlxG.camera.zoom = 1.05; + FlxG.camera.zoom = defaultCamZoom; FlxG.worldBounds.set(0, 0, FlxG.width, FlxG.height); @@ -790,6 +845,11 @@ class PlayState extends MusicBeatState { camFollow.setPosition(boyfriend.getMidpoint().x - 100, boyfriend.getMidpoint().y - 100); + if (curStage == 'limo') + { + camFollow.x = boyfriend.getMidpoint().x - 300; + } + if (SONG.song.toLowerCase() == 'tutorial') { FlxTween.tween(FlxG.camera, {zoom: 1}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut}); @@ -799,7 +859,7 @@ class PlayState extends MusicBeatState if (camZooming) { - FlxG.camera.zoom = FlxMath.lerp(1.05, FlxG.camera.zoom, 0.95); + FlxG.camera.zoom = FlxMath.lerp(defaultCamZoom, FlxG.camera.zoom, 0.95); camHUD.zoom = FlxMath.lerp(1, camHUD.zoom, 0.95); } @@ -1003,6 +1063,7 @@ class PlayState extends MusicBeatState } else { + trace('WENT BACK TO FREEPLAY??'); FlxG.switchState(new FreeplayState()); } } diff --git a/source/TitleState.hx b/source/TitleState.hx index aaf5cb053..a91ed235f 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -74,7 +74,9 @@ class TitleState extends MusicBeatState StoryMenuState.weekUnlocked[0] = true; } - #if SKIP_TO_PLAYSTATE + #if FREEPLAY + FlxG.switchState(new FreeplayState()); + #elseif CHARTING FlxG.switchState(new ChartingState()); #else startIntro(); From 05fcb4fb7457103b8cb002e118fdead05d685865 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 27 Dec 2020 03:13:51 -0500 Subject: [PATCH 17/86] bg dancers coded --- source/Alphabet.hx | 9 +++------ source/BackgroundDancer.hx | 30 ++++++++++++++++++++++++++++++ source/FreeplayState.hx | 2 +- source/HealthIcon.hx | 1 + source/PlayState.hx | 18 +++++++++++++++++- 5 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 source/BackgroundDancer.hx diff --git a/source/Alphabet.hx b/source/Alphabet.hx index a5e1d9396..ba5c75141 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -48,7 +48,6 @@ class Alphabet extends FlxSpriteGroup this.text = text; isBold = bold; - if (text != "") { if (typed) @@ -73,13 +72,13 @@ class Alphabet extends FlxSpriteGroup // { // } - if (character == " ") + if (character == " " || character == "-") { lastWasSpace = true; } if (AlphaCharacter.alphabet.indexOf(character.toLowerCase()) != -1) - //if (AlphaCharacter.alphabet.contains(character.toLowerCase())) + // if (AlphaCharacter.alphabet.contains(character.toLowerCase())) { if (lastSprite != null) { @@ -123,7 +122,6 @@ class Alphabet extends FlxSpriteGroup _finalText = text; doSplitWords(); - // trace(arrayShit); var loopNum:Int = 0; @@ -140,7 +138,6 @@ class Alphabet extends FlxSpriteGroup xPosResetted = true; xPos = 0; curRow += 1; - } if (splitWords[loopNum] == " ") @@ -157,7 +154,7 @@ class Alphabet extends FlxSpriteGroup #end if (AlphaCharacter.alphabet.indexOf(splitWords[loopNum].toLowerCase()) != -1 || isNumber || isSymbol) - //if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()) || isNumber || isSymbol) + // if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()) || isNumber || isSymbol) { if (lastSprite != null && !xPosResetted) diff --git a/source/BackgroundDancer.hx b/source/BackgroundDancer.hx new file mode 100644 index 000000000..2a4645086 --- /dev/null +++ b/source/BackgroundDancer.hx @@ -0,0 +1,30 @@ +package; + +import flixel.FlxSprite; +import flixel.graphics.frames.FlxAtlasFrames; + +class BackgroundDancer extends FlxSprite +{ + public function new(x:Float, y:Float) + { + super(x, y); + + frames = FlxAtlasFrames.fromSparrow(AssetPaths.limoDancer__png, AssetPaths.limoDancer__xml); + animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); + animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); + animation.play('danceLeft'); + antialiasing = true; + } + + var danceDir:Bool = false; + + public function dance():Void + { + danceDir = !danceDir; + + if (danceDir) + animation.play('danceRight', true); + else + animation.play('danceLeft', true); + } +} diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 699dc1a53..2c39e3dc5 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["High", "Milf", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["Satin-Panties", "High", "Milf", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index b5be951f5..683a27114 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -19,6 +19,7 @@ class HealthIcon extends FlxSprite animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); + animation.add('gf', [16], 0, false, isPlayer); animation.play(char); scrollFactor.set(); } diff --git a/source/PlayState.hx b/source/PlayState.hx index 42ccb54db..66b9909f7 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -90,6 +90,7 @@ class PlayState extends MusicBeatState var trainSound:FlxSound; var limo:FlxSprite; + var grpLimoDancers:FlxTypedGroup; var talking:Bool = true; var songScore:Int = 0; @@ -209,11 +210,21 @@ class PlayState extends MusicBeatState var bgLimo:FlxSprite = new FlxSprite(-200, 400); bgLimo.frames = FlxAtlasFrames.fromSparrow(AssetPaths.bgLimo__png, AssetPaths.bgLimo__xml); - bgLimo.animation.addByPrefix('drive', "BG limo", 24); + bgLimo.animation.addByPrefix('drive', "background limo pink", 24); bgLimo.animation.play('drive'); bgLimo.scrollFactor.set(0.4, 0.4); add(bgLimo); + grpLimoDancers = new FlxTypedGroup(); + add(grpLimoDancers); + + for (i in 0...5) + { + var dancer:BackgroundDancer = new BackgroundDancer((370 * i) + 130, 20); + dancer.scrollFactor.set(0.4, 0.4); + grpLimoDancers.add(dancer); + } + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(AssetPaths.limoOverlay__png); overlayShit.alpha = 0.5; // add(overlayShit); @@ -1621,6 +1632,11 @@ class PlayState extends MusicBeatState switch (curStage) { + case 'limo': + grpLimoDancers.forEach(function(dancer:BackgroundDancer) + { + dancer.dance(); + }); case "philly": if (!trainMoving) trainCooldown += 1; From b3ad4ab90842a443ff64c8a309ba95adfd28ab1c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 27 Dec 2020 05:37:04 -0500 Subject: [PATCH 18/86] maybe ready to go??? --- source/FreeplayState.hx | 9 ++++++++- source/MenuCharacter.hx | 1 + source/MenuItem.hx | 1 + source/PlayState.hx | 35 +++++++++++++++++++++++++++++++++-- source/StoryMenuState.hx | 8 +++++--- 5 files changed, 48 insertions(+), 6 deletions(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 2c39e3dc5..13742f687 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -12,7 +12,7 @@ import lime.utils.Assets; class FreeplayState extends MusicBeatState { - var songs:Array = ["Satin-Panties", "High", "Milf", "Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = ["Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; var selector:FlxText; var curSelected:Int = 0; @@ -55,6 +55,13 @@ class FreeplayState extends MusicBeatState songs.push('Blammed'); } + if (StoryMenuState.weekUnlocked[4] || isDebug) + { + songs.push('Satin-Panties'); + songs.push('High'); + songs.push('Milf'); + } + // LOAD MUSIC // LOAD CHARACTERS diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index b550c330c..e25c892f9 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -22,6 +22,7 @@ class MenuCharacter extends FlxSprite 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.addByPrefix('mom', "Mom Idle Black Lines smol", 24); animation.play(character); updateHitbox(); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 32652114c..6c18fc89f 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -23,6 +23,7 @@ class MenuItem extends FlxSpriteGroup week.animation.addByPrefix('week1', "WEEK1 select", 24); week.animation.addByPrefix('week2', "week2 select", 24); week.animation.addByPrefix('week3', "Week 3 press", 24); + week.animation.addByPrefix('week3', "Week 4 press", 24); add(week); week.animation.play('week' + weekNum); diff --git a/source/PlayState.hx b/source/PlayState.hx index 66b9909f7..404a5d30c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -91,6 +91,7 @@ class PlayState extends MusicBeatState var limo:FlxSprite; var grpLimoDancers:FlxTypedGroup; + var fastCar:FlxSprite; var talking:Bool = true; var songScore:Int = 0; @@ -208,7 +209,7 @@ class PlayState extends MusicBeatState skyBG.scrollFactor.set(0.1, 0.1); add(skyBG); - var bgLimo:FlxSprite = new FlxSprite(-200, 400); + var bgLimo:FlxSprite = new FlxSprite(-200, 480); bgLimo.frames = FlxAtlasFrames.fromSparrow(AssetPaths.bgLimo__png, AssetPaths.bgLimo__xml); bgLimo.animation.addByPrefix('drive', "background limo pink", 24); bgLimo.animation.play('drive'); @@ -220,7 +221,7 @@ class PlayState extends MusicBeatState for (i in 0...5) { - var dancer:BackgroundDancer = new BackgroundDancer((370 * i) + 130, 20); + var dancer:BackgroundDancer = new BackgroundDancer((370 * i) + 130, bgLimo.y - 400); dancer.scrollFactor.set(0.4, 0.4); grpLimoDancers.add(dancer); } @@ -242,6 +243,8 @@ class PlayState extends MusicBeatState limo.animation.addByPrefix('drive', "Limo stage", 24); limo.animation.play('drive'); limo.antialiasing = true; + + fastCar = new FlxSprite(-300, 160).loadGraphic(AssetPaths.fastCarLol__png); // add(limo); } else @@ -319,6 +322,9 @@ class PlayState extends MusicBeatState { boyfriend.y -= 220; boyfriend.x += 260; + + resetFastCar(); + add(fastCar); } } @@ -1481,6 +1487,28 @@ class PlayState extends MusicBeatState } } + var fastCarCanDrive:Bool = true; + + function resetFastCar():Void + { + fastCar.x = -12600; + fastCar.y = FlxG.random.int(140, 250); + fastCar.velocity.x = 0; + fastCarCanDrive = true; + } + + function fastCarDrive() + { + FlxG.sound.play('assets/sounds/carPass' + FlxG.random.int(0, 1) + TitleState.soundExt, 0.7); + + fastCar.velocity.x = (FlxG.random.int(170, 220) / FlxG.elapsed) * 3; + fastCarCanDrive = false; + new FlxTimer().start(2, function(tmr:FlxTimer) + { + resetFastCar(); + }); + } + var trainMoving:Bool = false; var trainFrameTiming:Float = 0; @@ -1637,6 +1665,9 @@ class PlayState extends MusicBeatState { dancer.dance(); }); + + if (FlxG.random.bool(10) && fastCarCanDrive) + fastCarDrive(); case "philly": if (!trainMoving) trainCooldown += 1; diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index b881fa9cc..bc48cb717 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -21,17 +21,19 @@ class StoryMenuState extends MusicBeatState ['Tutorial'], ['Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South'], - ['Pico', 'Philly', "Blammed"] + ['Pico', 'Philly', "Blammed"], + ['Satin-Panties', "High", "Milf"] ]; var curDifficulty:Int = 1; - public static var weekUnlocked:Array = [true, true, false, false]; + public static var weekUnlocked:Array = [true, true, true, true, true]; var weekCharacters:Array = [ ['dad', 'bf', 'gf'], ['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf'], - ['pico', 'bf', 'gf'] + ['pico', 'bf', 'gf'], + ['mom', 'bf', 'gf'] ]; var curWeek:Int = 0; From 57520a407db6f3f788a4016b9e1391ea0ceef36c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 27 Dec 2020 05:42:06 -0500 Subject: [PATCH 19/86] oops no options lolol --- CHANGELOG.md | 5 ++++- Project.xml | 2 +- source/MainMenuState.hx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a73c08e02..718e33774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] ### Added -- Different icons depending on which character you are against +- MOMMY GF, 3 NEW ASS SONGS BY KAWAISPRITE, NEW ART BY PHANTOMARCADE,WOOOOOOAH!!!! +- Different icons depending on which character you are against, art by EVILSK8R!! - Autosave to chart editor - Clear section button to note editor - Swap button in note editor +- a new boot text or two +- automatic check for when you're on an old version of the game! ### Changed - Made Spookeez on Normal easier. - Mouse is now visible in note editor diff --git a/Project.xml b/Project.xml index 878edf8c1..e8abec2e7 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 3bf7ef213..5b1afb628 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -22,7 +22,7 @@ class MainMenuState extends MusicBeatState var menuItems:FlxTypedGroup; #if !switch - var optionShit:Array = ['story mode', 'freeplay', 'options', 'donate']; + var optionShit:Array = ['story mode', 'freeplay', 'donate']; #else var optionShit:Array = ['story mode', 'freeplay']; #end From b051b18cf2e95f449d7ffd1dd7277ec4dc7f32e0 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 27 Dec 2020 05:57:45 -0500 Subject: [PATCH 20/86] week unlockin shit --- CHANGELOG.md | 2 +- source/MenuCharacter.hx | 2 +- source/MenuItem.hx | 2 +- source/StoryMenuState.hx | 4 ++++ source/TitleState.hx | 4 +++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 718e33774..8d48303e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Clear section button to note editor - Swap button in note editor - a new boot text or two -- automatic check for when you're on an old version of the game! +- automatic check for when you're on an old version of the game! ### Changed - Made Spookeez on Normal easier. - Mouse is now visible in note editor diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index e25c892f9..361aede1f 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -22,7 +22,7 @@ class MenuCharacter extends FlxSprite 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.addByPrefix('mom', "Mom Idle Black Lines smol", 24); + animation.addByPrefix('mom', "Mom Idle BLACK LINES", 24); animation.play(character); updateHitbox(); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 6c18fc89f..17a5f6305 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -23,7 +23,7 @@ class MenuItem extends FlxSpriteGroup week.animation.addByPrefix('week1', "WEEK1 select", 24); week.animation.addByPrefix('week2', "week2 select", 24); week.animation.addByPrefix('week3', "Week 3 press", 24); - week.animation.addByPrefix('week3', "Week 4 press", 24); + week.animation.addByPrefix('week4', "Week 4 press", 24); add(week); week.animation.play('week' + weekNum); diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index bc48cb717..7c3129f96 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -8,6 +8,7 @@ import flixel.group.FlxGroup; import flixel.math.FlxMath; import flixel.text.FlxText; import flixel.tweens.FlxTween; +import flixel.util.FlxColor; import flixel.util.FlxTimer; import lime.net.curl.CURLCode; @@ -74,6 +75,9 @@ class StoryMenuState extends MusicBeatState grpWeekText = new FlxTypedGroup(); add(grpWeekText); + var blackBarThingie:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, 56, FlxColor.BLACK); + add(blackBarThingie); + grpWeekCharacters = new FlxTypedGroup(); grpLocks = new FlxTypedGroup(); diff --git a/source/TitleState.hx b/source/TitleState.hx index a91ed235f..e89a91b9c 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -64,7 +64,9 @@ class TitleState extends MusicBeatState if (FlxG.save.data.weekUnlocked != null) { - StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked; + // FIX LATER!!! + // WEEK UNLOCK PROGRESSION!! + // StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked; if (StoryMenuState.weekUnlocked.length < 4) StoryMenuState.weekUnlocked.insert(0, true); From 37b69c4f40f2154e425b03810c41873ffcb4e841 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 27 Dec 2020 13:19:06 -0500 Subject: [PATCH 21/86] updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d48303e4..a3aa76091 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.5] - 2020-12-27 ### Added - MOMMY GF, 3 NEW ASS SONGS BY KAWAISPRITE, NEW ART BY PHANTOMARCADE,WOOOOOOAH!!!! - Different icons depending on which character you are against, art by EVILSK8R!! From 47c26e634e30a3960108a925f4b62ed380002a08 Mon Sep 17 00:00:00 2001 From: Scott-GH Date: Tue, 29 Dec 2020 23:22:02 -0800 Subject: [PATCH 22/86] Added a fix to music restarting when the song ends. --- source/PlayState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 404a5d30c..ecc649316 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1028,7 +1028,7 @@ class PlayState extends MusicBeatState function endSong():Void { canPause = false; - + FlxG.sound.music = new FlxSound(); if (SONG.validScore) { #if !switch From d3d6657760acc138f13caf92e089f825c3fb7b8d Mon Sep 17 00:00:00 2001 From: Xxmu8lxX <46245756+enter-a-nickname16@users.noreply.github.com> Date: Wed, 30 Dec 2020 13:11:23 -0500 Subject: [PATCH 23/86] Update README.md Fixed grammar stuff, and added instructions on how to compile on windows/linux/mac. --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f65fe6fc5..d3052d244 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documenta That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe discord server: https://discord.gg/5ybrNNWx9S -Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml`, but here are the one's I'm using as of writing. +Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. ``` hscript @@ -55,10 +55,25 @@ and you should be good to go there. ### Compiling game -Once you have all those installed, it's pretty easy to compile game! One that you can compile right off the bat is for HTML5, -you just need to run `lime test html5 -debug` in your command prompt in the project root. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) +Once you have all those installed, it's pretty easy to compile the game. You just need to run 'lime test html5 -debug' in the root of the project to build and run the HTML5 version. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) -To run it for your desktop (Windows, Mac, Linux) it's a bit more complicated. I know for Windows you need to download Visual Studio Community 2017 or 2019 or something, and in the libraries download in that download somethin that says build tools LOL homie im too dumb idk how to do that shit most of the time. +To run it from your desktop (Windows, Mac, Linux) it can be a bit more involved. For Linux, you only need to open a terminal in the project directory and run 'lime test linux -debug' and then run the executible file in export/release/linux/bin. For Windows, you need to install Visual Studio Community 2019. While installing VSC, don't click on any of the options to install workloads. Instead, go to the individual components tab and choose the following: +* MSCV v142 - VS 2019 C++ x64/x86 build tools +* Windows SDK (10.0.17763.0) +* C++ profiling tools +* C++ CMake tools for windows +* C++ ATL for v142 build tools (x86 & x64) +* C++ MFC for v142 build tools (x86 & x64) +* C++/CLI support for v142 build tools (14.21) +* C++ Modules for v142 build tools (x64/x86 -) +* Clang Compiler for Windows +* Windows 10 SDK (10.0.17134.0) +* Windows 10 SDk (10.0.16299.0) +* MSVC v141 - VS 2017 C++ x64/x86 build tools +* MSVC v140 - VS 2015 C++ build tools (v14.00) + +This will install about 22GB of crap, but once that is done you can open up a command line in the project's directory and run `lime test windows -debug`. Once that command finishes (it takes forever even on a higher end PC), you can run FNF from the .exe file under export\release\windows\bin +As for Mac, 'lime test mac -debug' should work, if not the internet surely has a guide on how to compile Haxe stuff for Mac. ### Additional guides From 1475fa10ab184e4d14e5e6dc9a989043dcbbe018 Mon Sep 17 00:00:00 2001 From: pahaze Date: Fri, 1 Jan 2021 00:39:58 -0500 Subject: [PATCH 24/86] Add enemies' dying faces --- source/Controls.hx | 3 ++- source/PlayState.hx | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/source/Controls.hx b/source/Controls.hx index 7d1e2c40e..0a63dc0b1 100644 --- a/source/Controls.hx +++ b/source/Controls.hx @@ -405,7 +405,7 @@ class Controls extends FlxActionSet switch (device) { case null: - // add all + // add all #if (haxe >= "4.0.0") for (gamepad in controls.gamepadsAdded) if (!gamepadsAdded.contains(gamepad)) @@ -415,6 +415,7 @@ class Controls extends FlxActionSet if (gamepadsAdded.indexOf(gamepad) == -1) gamepadsAdded.push(gamepad); #end + mergeKeyboardScheme(controls.keyboardScheme); diff --git a/source/PlayState.hx b/source/PlayState.hx index 404a5d30c..8ac43f675 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -725,6 +725,8 @@ class PlayState extends MusicBeatState private var paused:Bool = false; var startedCountdown:Bool = false; var canPause:Bool = true; + + override public function update(elapsed:Float) { @@ -783,7 +785,7 @@ class PlayState extends MusicBeatState iconP1.updateHitbox(); iconP2.updateHitbox(); - + var iconOffset:Int = 26; iconP1.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01) - iconOffset); @@ -791,12 +793,19 @@ class PlayState extends MusicBeatState if (health > 2) health = 2; + + if (healthBar.percent < 20) iconP1.animation.curAnim.curFrame = 1; else iconP1.animation.curAnim.curFrame = 0; - + + if (healthBar.percent > 80) + iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1; + else + iconP2.animation.curAnim.curFrame = Std.parseInt(curStage); + /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ From c98f52f766bafe23bf20ad45895247694490e55a Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 2 Jan 2021 13:39:37 -0500 Subject: [PATCH 25/86] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3aa76091..435804328 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 no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) + ## [0.2.5] - 2020-12-27 ### Added - MOMMY GF, 3 NEW ASS SONGS BY KAWAISPRITE, NEW ART BY PHANTOMARCADE,WOOOOOOAH!!!! From 7b2c930808866ad678aea2a96e63a2791b3d189e Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 4 Jan 2021 18:56:30 -0500 Subject: [PATCH 26/86] MOD SHIT IN PROGRESS --- Project.xml | 2 ++ source/Alphabet.hx | 2 +- source/AssetPaths.hx | 4 ---- source/BackgroundDancer.hx | 2 +- source/Character.hx | 14 +++++++------- source/ChartingState.hx | 6 ++++++ source/DialogueBox.hx | 2 +- source/FreeplayState.hx | 2 +- source/GameOverState.hx | 4 ++-- source/HealthIcon.hx | 2 +- source/MainMenuState.hx | 6 +++--- source/MenuCharacter.hx | 2 +- source/MenuItem.hx | 2 +- source/Note.hx | 2 +- source/OptionsMenu.hx | 2 +- source/PlayState.hx | 36 ++++++++++++++++++------------------ source/StoryMenuState.hx | 2 +- source/TitleState.hx | 13 ++++++++----- 18 files changed, 56 insertions(+), 49 deletions(-) delete mode 100644 source/AssetPaths.hx diff --git a/Project.xml b/Project.xml index e8abec2e7..329a7ab82 100644 --- a/Project.xml +++ b/Project.xml @@ -42,6 +42,7 @@ + @@ -68,6 +69,7 @@ + diff --git a/source/Alphabet.hx b/source/Alphabet.hx index ba5c75141..f9bfe23d7 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -245,7 +245,7 @@ class AlphaCharacter extends FlxSprite public function new(x:Float, y:Float) { super(x, y); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.alphabet__png, AssetPaths.alphabet__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/alphabet.png', 'assets/images/alphabet.xml'); frames = tex; antialiasing = true; diff --git a/source/AssetPaths.hx b/source/AssetPaths.hx deleted file mode 100644 index db7ef4445..000000000 --- a/source/AssetPaths.hx +++ /dev/null @@ -1,4 +0,0 @@ -package; - -@:build(flixel.system.FlxAssets.buildFileReferences("assets", true)) -class AssetPaths {} diff --git a/source/BackgroundDancer.hx b/source/BackgroundDancer.hx index 2a4645086..e88c01905 100644 --- a/source/BackgroundDancer.hx +++ b/source/BackgroundDancer.hx @@ -9,7 +9,7 @@ class BackgroundDancer extends FlxSprite { super(x, y); - frames = FlxAtlasFrames.fromSparrow(AssetPaths.limoDancer__png, AssetPaths.limoDancer__xml); + frames = FlxAtlasFrames.fromSparrow("assets/images/limo/limoDancer.png", "assets/images/limo/limoDancer.xml"); animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.play('danceLeft'); diff --git a/source/Character.hx b/source/Character.hx index 8565945e4..255fcdc3a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -31,7 +31,7 @@ class Character extends FlxSprite { case 'gf': // GIRLFRIEND CODE - tex = FlxAtlasFrames.fromSparrow(AssetPaths.GF_assets__png, AssetPaths.GF_assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/GF_assets.png', 'assets/images/GF_assets.xml'); frames = tex; animation.addByPrefix('cheer', 'GF Cheer', 24, false); animation.addByPrefix('singLEFT', 'GF left note', 24, false); @@ -63,7 +63,7 @@ class Character extends FlxSprite case 'dad': // DAD ANIMATION LOADING CODE - tex = FlxAtlasFrames.fromSparrow(AssetPaths.DADDY_DEAREST__png, AssetPaths.DADDY_DEAREST__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/DADDY_DEAREST.png', 'assets/images/DADDY_DEAREST.xml'); frames = tex; animation.addByPrefix('idle', 'Dad idle dance', 24); animation.addByPrefix('singUP', 'Dad Sing Note UP', 24); @@ -78,7 +78,7 @@ class Character extends FlxSprite addOffset("singLEFT", -10, 10); addOffset("singDOWN", 0, -30); case 'spooky': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.spooky_kids_assets__png, AssetPaths.spooky_kids_assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/spooky_kids_assets.png', 'assets/images/spooky_kids_assets.xml'); frames = tex; animation.addByPrefix('singUP', 'spooky UP NOTE', 24, false); animation.addByPrefix('singDOWN', 'spooky DOWN note', 24, false); @@ -97,7 +97,7 @@ class Character extends FlxSprite playAnim('danceRight'); case 'mom': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Mom_Assets__png, AssetPaths.Mom_Assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/Mom_Assets.png', 'assets/images/Mom_Assets.xml'); frames = tex; animation.addByPrefix('idle', "Mom Idle", 24, false); @@ -116,7 +116,7 @@ class Character extends FlxSprite addOffset("singLEFT", 250, -23); addOffset("singDOWN", 20, -160); case 'monster': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Monster_Assets__png, AssetPaths.Monster_Assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/Monster_Assets.png', 'assets/images/Monster_Assets.xml'); frames = tex; animation.addByPrefix('idle', 'monster idle', 24); animation.addByPrefix('singUP', 'monster up note', 24, false); @@ -131,7 +131,7 @@ class Character extends FlxSprite addOffset("singDOWN", -30, -40); playAnim('idle'); case 'pico': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Pico_FNF_assetss__png, AssetPaths.Pico_FNF_assetss__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/.Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); frames = tex; animation.addByPrefix('idle', "Pico Idle Dance", 24); animation.addByPrefix('singUP', 'pico Up note0', 24, false); @@ -170,7 +170,7 @@ class Character extends FlxSprite flipX = true; case 'bf': - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/BOYFRIEND.png', 'assets/images/BOYFRIEND.xml'); frames = tex; animation.addByPrefix('idle', 'BF idle dance', 24, false); animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 3f8f8c190..db4c6b338 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -24,6 +24,7 @@ import flixel.ui.FlxButton; import flixel.ui.FlxSpriteButton; import flixel.util.FlxColor; import haxe.Json; +import lime.utils.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; import openfl.events.IOErrorEvent; @@ -190,6 +191,11 @@ class ChartingState extends MusicBeatState var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom']; + for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) + { + characters.push(i); + } + var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { _song.player1 = characters[Std.parseInt(character)]; diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 488fe35fd..17f3d616d 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -20,7 +20,7 @@ class DialogueBox extends FlxSpriteGroup super(); box = new FlxSprite(40); - box.frames = FlxAtlasFrames.fromSparrow(AssetPaths.speech_bubble_talking__png, AssetPaths.speech_bubble_talking__xml); + box.frames = FlxAtlasFrames.fromSparrow('assets/images/speech_bubble_talking.png', 'assets/images/speech_bubble_talking.xml'); box.animation.addByPrefix('normalOpen', 'Speech Bubble Normal Open', 24, false); box.animation.addByPrefix('normal', 'speech bubble normal', 24); box.animation.play('normalOpen'); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 13742f687..e20858def 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -66,7 +66,7 @@ class FreeplayState extends MusicBeatState // LOAD CHARACTERS - var bg:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuBGBlue__png); + var bg:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuBGBlue.png'); add(bg); grpSongs = new FlxTypedGroup(); diff --git a/source/GameOverState.hx b/source/GameOverState.hx index 064325478..ba7cb3472 100644 --- a/source/GameOverState.hx +++ b/source/GameOverState.hx @@ -24,7 +24,7 @@ class GameOverState extends FlxTransitionableState override function create() { /* var loser:FlxSprite = new FlxSprite(100, 100); - var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose__png, AssetPaths.lose__xml); + var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose.png, AssetPaths.lose.xml); loser.frames = loseTex; loser.animation.addByPrefix('lose', 'lose', 24, false); loser.animation.play('lose'); @@ -37,7 +37,7 @@ class GameOverState extends FlxTransitionableState FlxG.camera.follow(bf, LOCKON, 0.001); /* - var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart__png); + var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart.png); restart.setGraphicSize(Std.int(restart.width * 0.6)); restart.updateHitbox(); restart.alpha = 0; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 683a27114..99f0e32ae 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -8,7 +8,7 @@ class HealthIcon extends FlxSprite { super(); - loadGraphic(AssetPaths.iconGrid__png, true, 150, 150); + loadGraphic('assets/images/iconGrid.png', true, 150, 150); antialiasing = true; animation.add('bf', [0, 1], 0, false, isPlayer); diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 5b1afb628..1c470084f 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -39,7 +39,7 @@ class MainMenuState extends MusicBeatState persistentUpdate = persistentDraw = true; - var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png); + var bg:FlxSprite = new FlxSprite(-80).loadGraphic('assets/images/menuBG.png'); bg.scrollFactor.x = 0; bg.scrollFactor.y = 0.18; bg.setGraphicSize(Std.int(bg.width * 1.1)); @@ -51,7 +51,7 @@ class MainMenuState extends MusicBeatState camFollow = new FlxObject(0, 0, 1, 1); add(camFollow); - magenta = new FlxSprite(-80).loadGraphic(AssetPaths.menuDesat__png); + magenta = new FlxSprite(-80).loadGraphic('assets/images/menuDesat.png'); magenta.scrollFactor.x = 0; magenta.scrollFactor.y = 0.18; magenta.setGraphicSize(Std.int(magenta.width * 1.1)); @@ -66,7 +66,7 @@ class MainMenuState extends MusicBeatState menuItems = new FlxTypedGroup(); add(menuItems); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.FNF_main_menu_assets__png, AssetPaths.FNF_main_menu_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/FNF_main_menu_assets.png', 'assets/images/FNF_main_menu_assets.xml'); for (i in 0...optionShit.length) { diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index 361aede1f..a621409a0 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -13,7 +13,7 @@ class MenuCharacter extends FlxSprite this.character = character; - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_characters__png, AssetPaths.campaign_menu_UI_characters__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_characters.png', 'assets/images/campaign_menu_UI_characters.xml'); frames = tex; animation.addByPrefix('bf', "BF idle dance white", 24); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 17a5f6305..e35e26a1f 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -14,7 +14,7 @@ class MenuItem extends FlxSpriteGroup { super(x, y); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_assets.png', 'assets/images/campaign_menu_UI_assets.xml'); week = new FlxSprite(); week.frames = tex; diff --git a/source/Note.hx b/source/Note.hx index 06825e717..adbe6d984 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -43,7 +43,7 @@ class Note extends FlxSprite this.noteData = noteData; - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.NOTE_assets__png, AssetPaths.NOTE_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); frames = tex; animation.addByPrefix('greenScroll', 'green0'); animation.addByPrefix('redScroll', 'red0'); diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index c79c3ec70..9e9f35408 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -8,7 +8,7 @@ class OptionsMenu extends MusicBeatState { override function create() { - var menuBG:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuDesat__png); + var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png'); menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); diff --git a/source/PlayState.hx b/source/PlayState.hx index ecc649316..7dc9a5f32 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -147,7 +147,7 @@ class PlayState extends MusicBeatState curStage = "spooky"; halloweenLevel = true; - var hallowTex = FlxAtlasFrames.fromSparrow(AssetPaths.halloween_bg__png, AssetPaths.halloween_bg__xml); + var hallowTex = FlxAtlasFrames.fromSparrow('assets/images/halloween_bg.png', 'assets/images/halloween_bg.xml'); halloweenBG = new FlxSprite(-200, -100); halloweenBG.frames = hallowTex; @@ -163,11 +163,11 @@ class PlayState extends MusicBeatState { curStage = 'philly'; - var bg:FlxSprite = new FlxSprite(-100).loadGraphic(AssetPaths.sky__png); + var bg:FlxSprite = new FlxSprite(-100).loadGraphic('assets/images/sky.png'); bg.scrollFactor.set(0.1, 0.1); add(bg); - var city:FlxSprite = new FlxSprite(-10).loadGraphic(AssetPaths.city__png); + var city:FlxSprite = new FlxSprite(-10).loadGraphic('assets/images/city.png'); city.scrollFactor.set(0.3, 0.3); city.setGraphicSize(Std.int(city.width * 0.85)); city.updateHitbox(); @@ -186,18 +186,18 @@ class PlayState extends MusicBeatState phillyCityLights.add(light); } - var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(AssetPaths.behindTrain__png); + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic('assets/images/behindTrain.png'); add(streetBehind); - phillyTrain = new FlxSprite(2000, 360).loadGraphic(AssetPaths.train__png); + phillyTrain = new FlxSprite(2000, 360).loadGraphic('assets/images/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 cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); - var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(AssetPaths.street__png); + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic('assets/images/street.png'); add(street); } else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') @@ -205,12 +205,12 @@ class PlayState extends MusicBeatState curStage = 'limo'; defaultCamZoom = 0.90; - var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(AssetPaths.limoSunset__png); + var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic('assets/images/limo/limoSunset.png'); skyBG.scrollFactor.set(0.1, 0.1); add(skyBG); var bgLimo:FlxSprite = new FlxSprite(-200, 480); - bgLimo.frames = FlxAtlasFrames.fromSparrow(AssetPaths.bgLimo__png, AssetPaths.bgLimo__xml); + bgLimo.frames = FlxAtlasFrames.fromSparrow('assets/images/limo/bgLimo.png', 'assets/images/limo/bgLimo.xml'); bgLimo.animation.addByPrefix('drive', "background limo pink", 24); bgLimo.animation.play('drive'); bgLimo.scrollFactor.set(0.4, 0.4); @@ -226,7 +226,7 @@ class PlayState extends MusicBeatState grpLimoDancers.add(dancer); } - var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(AssetPaths.limoOverlay__png); + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic('assets/images/limo/limoOverlay.png'); overlayShit.alpha = 0.5; // add(overlayShit); @@ -236,7 +236,7 @@ class PlayState extends MusicBeatState // overlayShit.shader = shaderBullshit; - var limoTex = FlxAtlasFrames.fromSparrow(AssetPaths.limoDrive__png, AssetPaths.limoDrive__xml); + var limoTex = FlxAtlasFrames.fromSparrow('assets/images/limo/limoDrive.png', 'assets/images/limo/limoDrive.xml'); limo = new FlxSprite(-120, 550); limo.frames = limoTex; @@ -244,13 +244,13 @@ class PlayState extends MusicBeatState limo.animation.play('drive'); limo.antialiasing = true; - fastCar = new FlxSprite(-300, 160).loadGraphic(AssetPaths.fastCarLol__png); + fastCar = new FlxSprite(-300, 160).loadGraphic('assets/images/limo/fastCarLol.png'); // add(limo); } else { curStage = 'stage'; - var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png); + var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic('assets/images/stageback.png'); // bg.setGraphicSize(Std.int(bg.width * 2.5)); // bg.updateHitbox(); bg.antialiasing = true; @@ -258,7 +258,7 @@ class PlayState extends MusicBeatState bg.active = false; add(bg); - var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(AssetPaths.stagefront__png); + var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic('assets/images/stagefront.png'); stageFront.setGraphicSize(Std.int(stageFront.width * 1.1)); stageFront.updateHitbox(); stageFront.antialiasing = true; @@ -266,7 +266,7 @@ class PlayState extends MusicBeatState stageFront.active = false; add(stageFront); - var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(AssetPaths.stagecurtains__png); + var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic('assets/images/stagecurtains.png'); stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); stageCurtains.updateHitbox(); stageCurtains.antialiasing = true; @@ -365,7 +365,7 @@ class PlayState extends MusicBeatState FlxG.fixedTimestep = false; - healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(AssetPaths.healthBar__png); + healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic('assets/images/healthBar.png'); healthBarBG.screenCenter(X); healthBarBG.scrollFactor.set(); add(healthBarBG); @@ -618,7 +618,7 @@ class PlayState extends MusicBeatState { FlxG.log.add(i); var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y); - var arrTex = FlxAtlasFrames.fromSparrow(AssetPaths.NOTE_assets__png, AssetPaths.NOTE_assets__xml); + var arrTex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); babyArrow.frames = arrTex; babyArrow.animation.addByPrefix('green', 'arrowUP'); babyArrow.animation.addByPrefix('blue', 'arrowDOWN'); @@ -1141,7 +1141,7 @@ class PlayState extends MusicBeatState rating.antialiasing = true; rating.velocity.x -= FlxG.random.int(0, 10); - var comboSpr:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.combo__png); + var comboSpr:FlxSprite = new FlxSprite().loadGraphic('assets/images/combo.png'); comboSpr.screenCenter(); comboSpr.x = coolText.x; comboSpr.acceleration.y = 600; diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 7c3129f96..ad6aefa8b 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -69,7 +69,7 @@ class StoryMenuState extends MusicBeatState rankText.size = scoreText.size; rankText.screenCenter(X); - var ui_tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml); + var ui_tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_assets.png', 'assets/images/campaign_menu_UI_assets.xml'); var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51); grpWeekText = new FlxTypedGroup(); diff --git a/source/TitleState.hx b/source/TitleState.hx index e89a91b9c..786d2f2cc 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -21,6 +21,7 @@ import flixel.tweens.FlxTween; import flixel.util.FlxColor; import flixel.util.FlxTimer; import lime.utils.Assets; +import polymod.Polymod; class TitleState extends MusicBeatState { @@ -39,6 +40,8 @@ class TitleState extends MusicBeatState override public function create():Void { + Polymod.init({modRoot: "assets/mods", dirs: ['introMod']}); + #if (!web) TitleState.soundExt = '.ogg'; #end @@ -128,7 +131,7 @@ class TitleState extends MusicBeatState add(bg); logoBl = new FlxSprite(-150, -100); - logoBl.frames = FlxAtlasFrames.fromSparrow(AssetPaths.logoBumpin__png, AssetPaths.logoBumpin__xml); + logoBl.frames = FlxAtlasFrames.fromSparrow('assets/images/logoBumpin.png', 'assets/images/logoBumpin.xml'); logoBl.antialiasing = true; logoBl.animation.addByPrefix('bump', 'logo bumpin', 24); logoBl.animation.play('bump'); @@ -137,7 +140,7 @@ class TitleState extends MusicBeatState // logoBl.color = FlxColor.BLACK; gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07); - gfDance.frames = FlxAtlasFrames.fromSparrow(AssetPaths.gfDanceTitle__png, AssetPaths.gfDanceTitle__xml); + gfDance.frames = FlxAtlasFrames.fromSparrow('assets/images/gfDanceTitle.png', 'assets/images/gfDanceTitle.xml'); gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); gfDance.antialiasing = true; @@ -145,7 +148,7 @@ class TitleState extends MusicBeatState add(logoBl); titleText = new FlxSprite(100, FlxG.height * 0.8); - titleText.frames = FlxAtlasFrames.fromSparrow(AssetPaths.titleEnter__png, AssetPaths.titleEnter__xml); + titleText.frames = FlxAtlasFrames.fromSparrow('assets/images/titleEnter.png', 'assets/images/titleEnter.xml'); titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); titleText.animation.addByPrefix('press', "ENTER PRESSED", 24); titleText.antialiasing = true; @@ -154,7 +157,7 @@ class TitleState extends MusicBeatState // titleText.screenCenter(X); add(titleText); - var logo:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.logo__png); + var logo:FlxSprite = new FlxSprite().loadGraphic('assets/images/logo.png'); logo.screenCenter(); logo.antialiasing = true; // add(logo); @@ -176,7 +179,7 @@ class TitleState extends MusicBeatState credTextShit.visible = false; - ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic(AssetPaths.newgrounds_logo__png); + ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic('assets/images/newgrounds_logo.png'); add(ngSpr); ngSpr.visible = false; ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.8)); From 6c3f1df72fd495bedfcd0415e145a2df86ca5a6b Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Tue, 5 Jan 2021 16:29:32 +0800 Subject: [PATCH 27/86] Move version check screen to TitleState --- source/MainMenuState.hx | 7 ------- source/TitleState.hx | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 1c470084f..e1a1db228 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -89,13 +89,6 @@ class MainMenuState extends MusicBeatState versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); - if (versionShit.text.trim() != NGio.GAME_VER.trim() && !OutdatedSubState.leftState) - { - trace('OLD VERSION!'); - - FlxG.switchState(new OutdatedSubState()); - } - // NG.core.calls.event.logEvent('swag').send(); changeItem(); diff --git a/source/TitleState.hx b/source/TitleState.hx index 786d2f2cc..c63d37bd3 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -20,9 +20,13 @@ import flixel.tweens.FlxEase; import flixel.tweens.FlxTween; import flixel.util.FlxColor; import flixel.util.FlxTimer; +import io.newgrounds.NG; +import lime.app.Application; import lime.utils.Assets; import polymod.Polymod; +using StringTools; + class TitleState extends MusicBeatState { static var initialized:Bool = false; @@ -261,7 +265,19 @@ class TitleState extends MusicBeatState new FlxTimer().start(2, function(tmr:FlxTimer) { - FlxG.switchState(new MainMenuState()); + // Check if version is outdated + + var version:String = "v" + Application.current.meta.get('version'); + + if (version.trim() != NGio.GAME_VER.trim() && !OutdatedSubState.leftState) + { + trace('OLD VERSION!'); + FlxG.switchState(new OutdatedSubState()); + } + else + { + FlxG.switchState(new MainMenuState()); + } }); // FlxG.sound.play('assets/music/titleShoot' + TitleState.soundExt, 0.7); } From a3d9baec0b12e75669677329a9a98d096c73fa5a Mon Sep 17 00:00:00 2001 From: pahaze Date: Tue, 5 Jan 2021 07:53:42 -0500 Subject: [PATCH 28/86] Update to latest master commit --- CHANGELOG.md | 4 ++++ Project.xml | 2 ++ README.md | 23 ++++++++++++++---- source/Alphabet.hx | 2 +- source/BackgroundDancer.hx | 2 +- source/Character.hx | 14 +++++------ source/ChartingState.hx | 6 +++++ source/Controls.hx | 3 +-- source/DialogueBox.hx | 2 +- source/FreeplayState.hx | 2 +- source/GameOverState.hx | 4 ++-- source/HealthIcon.hx | 2 +- source/MainMenuState.hx | 6 ++--- source/MenuCharacter.hx | 2 +- source/MenuItem.hx | 2 +- source/Note.hx | 2 +- source/OptionsMenu.hx | 2 +- source/PlayState.hx | 48 +++++++++++++++++--------------------- source/StoryMenuState.hx | 2 +- source/TitleState.hx | 13 +++++++---- 20 files changed, 84 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3aa76091..435804328 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 no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) + ## [0.2.5] - 2020-12-27 ### Added - MOMMY GF, 3 NEW ASS SONGS BY KAWAISPRITE, NEW ART BY PHANTOMARCADE,WOOOOOOAH!!!! diff --git a/Project.xml b/Project.xml index e8abec2e7..329a7ab82 100644 --- a/Project.xml +++ b/Project.xml @@ -42,6 +42,7 @@ + @@ -68,6 +69,7 @@ + diff --git a/README.md b/README.md index f65fe6fc5..d3052d244 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documenta That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe discord server: https://discord.gg/5ybrNNWx9S -Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml`, but here are the one's I'm using as of writing. +Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. ``` hscript @@ -55,10 +55,25 @@ and you should be good to go there. ### Compiling game -Once you have all those installed, it's pretty easy to compile game! One that you can compile right off the bat is for HTML5, -you just need to run `lime test html5 -debug` in your command prompt in the project root. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) +Once you have all those installed, it's pretty easy to compile the game. You just need to run 'lime test html5 -debug' in the root of the project to build and run the HTML5 version. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) -To run it for your desktop (Windows, Mac, Linux) it's a bit more complicated. I know for Windows you need to download Visual Studio Community 2017 or 2019 or something, and in the libraries download in that download somethin that says build tools LOL homie im too dumb idk how to do that shit most of the time. +To run it from your desktop (Windows, Mac, Linux) it can be a bit more involved. For Linux, you only need to open a terminal in the project directory and run 'lime test linux -debug' and then run the executible file in export/release/linux/bin. For Windows, you need to install Visual Studio Community 2019. While installing VSC, don't click on any of the options to install workloads. Instead, go to the individual components tab and choose the following: +* MSCV v142 - VS 2019 C++ x64/x86 build tools +* Windows SDK (10.0.17763.0) +* C++ profiling tools +* C++ CMake tools for windows +* C++ ATL for v142 build tools (x86 & x64) +* C++ MFC for v142 build tools (x86 & x64) +* C++/CLI support for v142 build tools (14.21) +* C++ Modules for v142 build tools (x64/x86 -) +* Clang Compiler for Windows +* Windows 10 SDK (10.0.17134.0) +* Windows 10 SDk (10.0.16299.0) +* MSVC v141 - VS 2017 C++ x64/x86 build tools +* MSVC v140 - VS 2015 C++ build tools (v14.00) + +This will install about 22GB of crap, but once that is done you can open up a command line in the project's directory and run `lime test windows -debug`. Once that command finishes (it takes forever even on a higher end PC), you can run FNF from the .exe file under export\release\windows\bin +As for Mac, 'lime test mac -debug' should work, if not the internet surely has a guide on how to compile Haxe stuff for Mac. ### Additional guides diff --git a/source/Alphabet.hx b/source/Alphabet.hx index ba5c75141..f9bfe23d7 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -245,7 +245,7 @@ class AlphaCharacter extends FlxSprite public function new(x:Float, y:Float) { super(x, y); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.alphabet__png, AssetPaths.alphabet__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/alphabet.png', 'assets/images/alphabet.xml'); frames = tex; antialiasing = true; diff --git a/source/BackgroundDancer.hx b/source/BackgroundDancer.hx index 2a4645086..e88c01905 100644 --- a/source/BackgroundDancer.hx +++ b/source/BackgroundDancer.hx @@ -9,7 +9,7 @@ class BackgroundDancer extends FlxSprite { super(x, y); - frames = FlxAtlasFrames.fromSparrow(AssetPaths.limoDancer__png, AssetPaths.limoDancer__xml); + frames = FlxAtlasFrames.fromSparrow("assets/images/limo/limoDancer.png", "assets/images/limo/limoDancer.xml"); animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.play('danceLeft'); diff --git a/source/Character.hx b/source/Character.hx index 8565945e4..255fcdc3a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -31,7 +31,7 @@ class Character extends FlxSprite { case 'gf': // GIRLFRIEND CODE - tex = FlxAtlasFrames.fromSparrow(AssetPaths.GF_assets__png, AssetPaths.GF_assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/GF_assets.png', 'assets/images/GF_assets.xml'); frames = tex; animation.addByPrefix('cheer', 'GF Cheer', 24, false); animation.addByPrefix('singLEFT', 'GF left note', 24, false); @@ -63,7 +63,7 @@ class Character extends FlxSprite case 'dad': // DAD ANIMATION LOADING CODE - tex = FlxAtlasFrames.fromSparrow(AssetPaths.DADDY_DEAREST__png, AssetPaths.DADDY_DEAREST__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/DADDY_DEAREST.png', 'assets/images/DADDY_DEAREST.xml'); frames = tex; animation.addByPrefix('idle', 'Dad idle dance', 24); animation.addByPrefix('singUP', 'Dad Sing Note UP', 24); @@ -78,7 +78,7 @@ class Character extends FlxSprite addOffset("singLEFT", -10, 10); addOffset("singDOWN", 0, -30); case 'spooky': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.spooky_kids_assets__png, AssetPaths.spooky_kids_assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/spooky_kids_assets.png', 'assets/images/spooky_kids_assets.xml'); frames = tex; animation.addByPrefix('singUP', 'spooky UP NOTE', 24, false); animation.addByPrefix('singDOWN', 'spooky DOWN note', 24, false); @@ -97,7 +97,7 @@ class Character extends FlxSprite playAnim('danceRight'); case 'mom': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Mom_Assets__png, AssetPaths.Mom_Assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/Mom_Assets.png', 'assets/images/Mom_Assets.xml'); frames = tex; animation.addByPrefix('idle', "Mom Idle", 24, false); @@ -116,7 +116,7 @@ class Character extends FlxSprite addOffset("singLEFT", 250, -23); addOffset("singDOWN", 20, -160); case 'monster': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Monster_Assets__png, AssetPaths.Monster_Assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/Monster_Assets.png', 'assets/images/Monster_Assets.xml'); frames = tex; animation.addByPrefix('idle', 'monster idle', 24); animation.addByPrefix('singUP', 'monster up note', 24, false); @@ -131,7 +131,7 @@ class Character extends FlxSprite addOffset("singDOWN", -30, -40); playAnim('idle'); case 'pico': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Pico_FNF_assetss__png, AssetPaths.Pico_FNF_assetss__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/.Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); frames = tex; animation.addByPrefix('idle', "Pico Idle Dance", 24); animation.addByPrefix('singUP', 'pico Up note0', 24, false); @@ -170,7 +170,7 @@ class Character extends FlxSprite flipX = true; case 'bf': - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/BOYFRIEND.png', 'assets/images/BOYFRIEND.xml'); frames = tex; animation.addByPrefix('idle', 'BF idle dance', 24, false); animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 3f8f8c190..db4c6b338 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -24,6 +24,7 @@ import flixel.ui.FlxButton; import flixel.ui.FlxSpriteButton; import flixel.util.FlxColor; import haxe.Json; +import lime.utils.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; import openfl.events.IOErrorEvent; @@ -190,6 +191,11 @@ class ChartingState extends MusicBeatState var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom']; + for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) + { + characters.push(i); + } + var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { _song.player1 = characters[Std.parseInt(character)]; diff --git a/source/Controls.hx b/source/Controls.hx index 0a63dc0b1..7d1e2c40e 100644 --- a/source/Controls.hx +++ b/source/Controls.hx @@ -405,7 +405,7 @@ class Controls extends FlxActionSet switch (device) { case null: - // add all + // add all #if (haxe >= "4.0.0") for (gamepad in controls.gamepadsAdded) if (!gamepadsAdded.contains(gamepad)) @@ -415,7 +415,6 @@ class Controls extends FlxActionSet if (gamepadsAdded.indexOf(gamepad) == -1) gamepadsAdded.push(gamepad); #end - mergeKeyboardScheme(controls.keyboardScheme); diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 488fe35fd..17f3d616d 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -20,7 +20,7 @@ class DialogueBox extends FlxSpriteGroup super(); box = new FlxSprite(40); - box.frames = FlxAtlasFrames.fromSparrow(AssetPaths.speech_bubble_talking__png, AssetPaths.speech_bubble_talking__xml); + box.frames = FlxAtlasFrames.fromSparrow('assets/images/speech_bubble_talking.png', 'assets/images/speech_bubble_talking.xml'); box.animation.addByPrefix('normalOpen', 'Speech Bubble Normal Open', 24, false); box.animation.addByPrefix('normal', 'speech bubble normal', 24); box.animation.play('normalOpen'); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 13742f687..e20858def 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -66,7 +66,7 @@ class FreeplayState extends MusicBeatState // LOAD CHARACTERS - var bg:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuBGBlue__png); + var bg:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuBGBlue.png'); add(bg); grpSongs = new FlxTypedGroup(); diff --git a/source/GameOverState.hx b/source/GameOverState.hx index 064325478..ba7cb3472 100644 --- a/source/GameOverState.hx +++ b/source/GameOverState.hx @@ -24,7 +24,7 @@ class GameOverState extends FlxTransitionableState override function create() { /* var loser:FlxSprite = new FlxSprite(100, 100); - var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose__png, AssetPaths.lose__xml); + var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose.png, AssetPaths.lose.xml); loser.frames = loseTex; loser.animation.addByPrefix('lose', 'lose', 24, false); loser.animation.play('lose'); @@ -37,7 +37,7 @@ class GameOverState extends FlxTransitionableState FlxG.camera.follow(bf, LOCKON, 0.001); /* - var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart__png); + var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart.png); restart.setGraphicSize(Std.int(restart.width * 0.6)); restart.updateHitbox(); restart.alpha = 0; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 683a27114..99f0e32ae 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -8,7 +8,7 @@ class HealthIcon extends FlxSprite { super(); - loadGraphic(AssetPaths.iconGrid__png, true, 150, 150); + loadGraphic('assets/images/iconGrid.png', true, 150, 150); antialiasing = true; animation.add('bf', [0, 1], 0, false, isPlayer); diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 5b1afb628..1c470084f 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -39,7 +39,7 @@ class MainMenuState extends MusicBeatState persistentUpdate = persistentDraw = true; - var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png); + var bg:FlxSprite = new FlxSprite(-80).loadGraphic('assets/images/menuBG.png'); bg.scrollFactor.x = 0; bg.scrollFactor.y = 0.18; bg.setGraphicSize(Std.int(bg.width * 1.1)); @@ -51,7 +51,7 @@ class MainMenuState extends MusicBeatState camFollow = new FlxObject(0, 0, 1, 1); add(camFollow); - magenta = new FlxSprite(-80).loadGraphic(AssetPaths.menuDesat__png); + magenta = new FlxSprite(-80).loadGraphic('assets/images/menuDesat.png'); magenta.scrollFactor.x = 0; magenta.scrollFactor.y = 0.18; magenta.setGraphicSize(Std.int(magenta.width * 1.1)); @@ -66,7 +66,7 @@ class MainMenuState extends MusicBeatState menuItems = new FlxTypedGroup(); add(menuItems); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.FNF_main_menu_assets__png, AssetPaths.FNF_main_menu_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/FNF_main_menu_assets.png', 'assets/images/FNF_main_menu_assets.xml'); for (i in 0...optionShit.length) { diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index 361aede1f..a621409a0 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -13,7 +13,7 @@ class MenuCharacter extends FlxSprite this.character = character; - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_characters__png, AssetPaths.campaign_menu_UI_characters__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_characters.png', 'assets/images/campaign_menu_UI_characters.xml'); frames = tex; animation.addByPrefix('bf', "BF idle dance white", 24); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 17a5f6305..e35e26a1f 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -14,7 +14,7 @@ class MenuItem extends FlxSpriteGroup { super(x, y); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_assets.png', 'assets/images/campaign_menu_UI_assets.xml'); week = new FlxSprite(); week.frames = tex; diff --git a/source/Note.hx b/source/Note.hx index 06825e717..adbe6d984 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -43,7 +43,7 @@ class Note extends FlxSprite this.noteData = noteData; - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.NOTE_assets__png, AssetPaths.NOTE_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); frames = tex; animation.addByPrefix('greenScroll', 'green0'); animation.addByPrefix('redScroll', 'red0'); diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index c79c3ec70..9e9f35408 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -8,7 +8,7 @@ class OptionsMenu extends MusicBeatState { override function create() { - var menuBG:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuDesat__png); + var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png'); menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 8ac43f675..bef9e30db 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -147,7 +147,7 @@ class PlayState extends MusicBeatState curStage = "spooky"; halloweenLevel = true; - var hallowTex = FlxAtlasFrames.fromSparrow(AssetPaths.halloween_bg__png, AssetPaths.halloween_bg__xml); + var hallowTex = FlxAtlasFrames.fromSparrow('assets/images/halloween_bg.png', 'assets/images/halloween_bg.xml'); halloweenBG = new FlxSprite(-200, -100); halloweenBG.frames = hallowTex; @@ -163,11 +163,11 @@ class PlayState extends MusicBeatState { curStage = 'philly'; - var bg:FlxSprite = new FlxSprite(-100).loadGraphic(AssetPaths.sky__png); + var bg:FlxSprite = new FlxSprite(-100).loadGraphic('assets/images/sky.png'); bg.scrollFactor.set(0.1, 0.1); add(bg); - var city:FlxSprite = new FlxSprite(-10).loadGraphic(AssetPaths.city__png); + var city:FlxSprite = new FlxSprite(-10).loadGraphic('assets/images/city.png'); city.scrollFactor.set(0.3, 0.3); city.setGraphicSize(Std.int(city.width * 0.85)); city.updateHitbox(); @@ -186,18 +186,18 @@ class PlayState extends MusicBeatState phillyCityLights.add(light); } - var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(AssetPaths.behindTrain__png); + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic('assets/images/behindTrain.png'); add(streetBehind); - phillyTrain = new FlxSprite(2000, 360).loadGraphic(AssetPaths.train__png); + phillyTrain = new FlxSprite(2000, 360).loadGraphic('assets/images/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 cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); - var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(AssetPaths.street__png); + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic('assets/images/street.png'); add(street); } else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') @@ -205,12 +205,12 @@ class PlayState extends MusicBeatState curStage = 'limo'; defaultCamZoom = 0.90; - var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(AssetPaths.limoSunset__png); + var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic('assets/images/limo/limoSunset.png'); skyBG.scrollFactor.set(0.1, 0.1); add(skyBG); var bgLimo:FlxSprite = new FlxSprite(-200, 480); - bgLimo.frames = FlxAtlasFrames.fromSparrow(AssetPaths.bgLimo__png, AssetPaths.bgLimo__xml); + bgLimo.frames = FlxAtlasFrames.fromSparrow('assets/images/limo/bgLimo.png', 'assets/images/limo/bgLimo.xml'); bgLimo.animation.addByPrefix('drive', "background limo pink", 24); bgLimo.animation.play('drive'); bgLimo.scrollFactor.set(0.4, 0.4); @@ -226,7 +226,7 @@ class PlayState extends MusicBeatState grpLimoDancers.add(dancer); } - var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(AssetPaths.limoOverlay__png); + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic('assets/images/limo/limoOverlay.png'); overlayShit.alpha = 0.5; // add(overlayShit); @@ -236,7 +236,7 @@ class PlayState extends MusicBeatState // overlayShit.shader = shaderBullshit; - var limoTex = FlxAtlasFrames.fromSparrow(AssetPaths.limoDrive__png, AssetPaths.limoDrive__xml); + var limoTex = FlxAtlasFrames.fromSparrow('assets/images/limo/limoDrive.png', 'assets/images/limo/limoDrive.xml'); limo = new FlxSprite(-120, 550); limo.frames = limoTex; @@ -244,13 +244,13 @@ class PlayState extends MusicBeatState limo.animation.play('drive'); limo.antialiasing = true; - fastCar = new FlxSprite(-300, 160).loadGraphic(AssetPaths.fastCarLol__png); + fastCar = new FlxSprite(-300, 160).loadGraphic('assets/images/limo/fastCarLol.png'); // add(limo); } else { curStage = 'stage'; - var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png); + var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic('assets/images/stageback.png'); // bg.setGraphicSize(Std.int(bg.width * 2.5)); // bg.updateHitbox(); bg.antialiasing = true; @@ -258,7 +258,7 @@ class PlayState extends MusicBeatState bg.active = false; add(bg); - var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(AssetPaths.stagefront__png); + var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic('assets/images/stagefront.png'); stageFront.setGraphicSize(Std.int(stageFront.width * 1.1)); stageFront.updateHitbox(); stageFront.antialiasing = true; @@ -266,7 +266,7 @@ class PlayState extends MusicBeatState stageFront.active = false; add(stageFront); - var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(AssetPaths.stagecurtains__png); + var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic('assets/images/stagecurtains.png'); stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); stageCurtains.updateHitbox(); stageCurtains.antialiasing = true; @@ -365,7 +365,7 @@ class PlayState extends MusicBeatState FlxG.fixedTimestep = false; - healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(AssetPaths.healthBar__png); + healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic('assets/images/healthBar.png'); healthBarBG.screenCenter(X); healthBarBG.scrollFactor.set(); add(healthBarBG); @@ -618,7 +618,7 @@ class PlayState extends MusicBeatState { FlxG.log.add(i); var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y); - var arrTex = FlxAtlasFrames.fromSparrow(AssetPaths.NOTE_assets__png, AssetPaths.NOTE_assets__xml); + var arrTex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); babyArrow.frames = arrTex; babyArrow.animation.addByPrefix('green', 'arrowUP'); babyArrow.animation.addByPrefix('blue', 'arrowDOWN'); @@ -725,8 +725,6 @@ class PlayState extends MusicBeatState private var paused:Bool = false; var startedCountdown:Bool = false; var canPause:Bool = true; - - override public function update(elapsed:Float) { @@ -785,7 +783,7 @@ class PlayState extends MusicBeatState iconP1.updateHitbox(); iconP2.updateHitbox(); - + var iconOffset:Int = 26; iconP1.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01) - iconOffset); @@ -793,19 +791,17 @@ class PlayState extends MusicBeatState if (health > 2) health = 2; - - if (healthBar.percent < 20) iconP1.animation.curAnim.curFrame = 1; else iconP1.animation.curAnim.curFrame = 0; - if (healthBar.percent > 80) + if (healthBar.percent > 80) iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1; else iconP2.animation.curAnim.curFrame = Std.parseInt(curStage); - + /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ @@ -1037,7 +1033,7 @@ class PlayState extends MusicBeatState function endSong():Void { canPause = false; - + FlxG.sound.music = new FlxSound(); if (SONG.validScore) { #if !switch @@ -1150,7 +1146,7 @@ class PlayState extends MusicBeatState rating.antialiasing = true; rating.velocity.x -= FlxG.random.int(0, 10); - var comboSpr:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.combo__png); + var comboSpr:FlxSprite = new FlxSprite().loadGraphic('assets/images/combo.png'); comboSpr.screenCenter(); comboSpr.x = coolText.x; comboSpr.acceleration.y = 600; diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 7c3129f96..ad6aefa8b 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -69,7 +69,7 @@ class StoryMenuState extends MusicBeatState rankText.size = scoreText.size; rankText.screenCenter(X); - var ui_tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml); + var ui_tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_assets.png', 'assets/images/campaign_menu_UI_assets.xml'); var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51); grpWeekText = new FlxTypedGroup(); diff --git a/source/TitleState.hx b/source/TitleState.hx index e89a91b9c..786d2f2cc 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -21,6 +21,7 @@ import flixel.tweens.FlxTween; import flixel.util.FlxColor; import flixel.util.FlxTimer; import lime.utils.Assets; +import polymod.Polymod; class TitleState extends MusicBeatState { @@ -39,6 +40,8 @@ class TitleState extends MusicBeatState override public function create():Void { + Polymod.init({modRoot: "assets/mods", dirs: ['introMod']}); + #if (!web) TitleState.soundExt = '.ogg'; #end @@ -128,7 +131,7 @@ class TitleState extends MusicBeatState add(bg); logoBl = new FlxSprite(-150, -100); - logoBl.frames = FlxAtlasFrames.fromSparrow(AssetPaths.logoBumpin__png, AssetPaths.logoBumpin__xml); + logoBl.frames = FlxAtlasFrames.fromSparrow('assets/images/logoBumpin.png', 'assets/images/logoBumpin.xml'); logoBl.antialiasing = true; logoBl.animation.addByPrefix('bump', 'logo bumpin', 24); logoBl.animation.play('bump'); @@ -137,7 +140,7 @@ class TitleState extends MusicBeatState // logoBl.color = FlxColor.BLACK; gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07); - gfDance.frames = FlxAtlasFrames.fromSparrow(AssetPaths.gfDanceTitle__png, AssetPaths.gfDanceTitle__xml); + gfDance.frames = FlxAtlasFrames.fromSparrow('assets/images/gfDanceTitle.png', 'assets/images/gfDanceTitle.xml'); gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); gfDance.antialiasing = true; @@ -145,7 +148,7 @@ class TitleState extends MusicBeatState add(logoBl); titleText = new FlxSprite(100, FlxG.height * 0.8); - titleText.frames = FlxAtlasFrames.fromSparrow(AssetPaths.titleEnter__png, AssetPaths.titleEnter__xml); + titleText.frames = FlxAtlasFrames.fromSparrow('assets/images/titleEnter.png', 'assets/images/titleEnter.xml'); titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); titleText.animation.addByPrefix('press', "ENTER PRESSED", 24); titleText.antialiasing = true; @@ -154,7 +157,7 @@ class TitleState extends MusicBeatState // titleText.screenCenter(X); add(titleText); - var logo:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.logo__png); + var logo:FlxSprite = new FlxSprite().loadGraphic('assets/images/logo.png'); logo.screenCenter(); logo.antialiasing = true; // add(logo); @@ -176,7 +179,7 @@ class TitleState extends MusicBeatState credTextShit.visible = false; - ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic(AssetPaths.newgrounds_logo__png); + ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic('assets/images/newgrounds_logo.png'); add(ngSpr); ngSpr.visible = false; ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.8)); From dcab10d067752ecb6d30920b0917d289fc1f30ac Mon Sep 17 00:00:00 2001 From: Waviest <31796727+WaviestBalloon@users.noreply.github.com> Date: Thu, 7 Jan 2021 00:57:59 +0000 Subject: [PATCH 29/86] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d3052d244..6dd0a86d8 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ flixel-ui newgrounds ``` -so for each of those type `haxelib install [library]` so shit like `haxelib install newgrounds` +So for each of those type `haxelib install [library]` so shit like `haxelib install newgrounds` ### Ignored files @@ -60,15 +60,15 @@ Once you have all those installed, it's pretty easy to compile the game. You jus To run it from your desktop (Windows, Mac, Linux) it can be a bit more involved. For Linux, you only need to open a terminal in the project directory and run 'lime test linux -debug' and then run the executible file in export/release/linux/bin. For Windows, you need to install Visual Studio Community 2019. While installing VSC, don't click on any of the options to install workloads. Instead, go to the individual components tab and choose the following: * MSCV v142 - VS 2019 C++ x64/x86 build tools * Windows SDK (10.0.17763.0) -* C++ profiling tools +* C++ Profiling tools * C++ CMake tools for windows * C++ ATL for v142 build tools (x86 & x64) * C++ MFC for v142 build tools (x86 & x64) * C++/CLI support for v142 build tools (14.21) -* C++ Modules for v142 build tools (x64/x86 -) +* C++ Modules for v142 build tools (x64/x86) * Clang Compiler for Windows * Windows 10 SDK (10.0.17134.0) -* Windows 10 SDk (10.0.16299.0) +* Windows 10 SDK (10.0.16299.0) * MSVC v141 - VS 2017 C++ x64/x86 build tools * MSVC v140 - VS 2015 C++ build tools (v14.00) From 41bb7eea606a0148033b46f0fd8a03eecd679948 Mon Sep 17 00:00:00 2001 From: Waviest <31796727+WaviestBalloon@users.noreply.github.com> Date: Thu, 7 Jan 2021 01:16:57 +0000 Subject: [PATCH 30/86] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dd0a86d8..da4cd3863 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This game was made with love to Newgrounds and it's community. Extra love to Tom First you need to install Haxe and HaxeFlixel. I'm too lazy to write and keep updated with that setup (which is pretty simple). The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documentation/getting-started/) -That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe discord server: https://discord.gg/5ybrNNWx9S +That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe Discord server: https://discord.gg/5ybrNNWx9S Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. From efbb088fb88cff730966c1aa0ef93799c5be527f Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 6 Jan 2021 22:38:17 -0500 Subject: [PATCH 31/86] chart editor type beat --- CHANGELOG.md | 3 +++ source/ChartingState.hx | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 435804328..763ca377a 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] +### Added +- Enemy icons change when they you are winning a lot ([Thanks to pahaze for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/138)) +- Holding CTRL in charting editor places notes on both sides ### Fixed - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index db4c6b338..d9c595365 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -82,6 +82,9 @@ class ChartingState extends MusicBeatState gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16); add(gridBG); + var gridBlackLine:FlxSprite = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK); + add(gridBlackLine); + curRenderedNotes = new FlxTypedGroup(); curRenderedSustains = new FlxTypedGroup(); @@ -798,6 +801,11 @@ class ChartingState extends MusicBeatState curSelectedNote = _song.notes[curSection].sectionNotes[_song.notes[curSection].sectionNotes.length - 1]; + if (FlxG.keys.pressed.CONTROL) + { + _song.notes[curSection].sectionNotes.push([noteStrum, (noteData + 4) % 8, noteSus]); + } + trace(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * lengthBpmBullshit()))); trace(curSection); From fe21dfe7e8334d0811d4e892a761fdc918bd0ed1 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 6 Jan 2021 23:02:23 -0500 Subject: [PATCH 32/86] charting editor improvements --- source/ChartingState.hx | 47 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index d9c595365..b7001a708 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -514,9 +514,18 @@ class ChartingState extends MusicBeatState if (FlxG.keys.justPressed.R) { if (FlxG.keys.pressed.SHIFT) - changeSection(); + resetSection(); else - changeSection(curSection); + resetSection(true); + } + + if (FlxG.mouse.wheel != 0) + { + FlxG.sound.music.pause(); + vocals.pause(); + + FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 1); + vocals.time = FlxG.sound.music.time; } if (!FlxG.keys.pressed.SHIFT) @@ -569,9 +578,9 @@ class ChartingState extends MusicBeatState var shiftThing:Int = 1; if (FlxG.keys.pressed.SHIFT) shiftThing = 4; - if (FlxG.keys.justPressed.RIGHT) + if (FlxG.keys.justPressed.RIGHT || FlxG.keys.justPressed.D) changeSection(curSection + shiftThing); - if (FlxG.keys.justPressed.LEFT) + if (FlxG.keys.justPressed.LEFT || FlxG.keys.justPressed.A) changeSection(curSection - shiftThing); bpmTxt.text = bpmTxt.text = Std.string(FlxMath.roundDecimal(Conductor.songPosition / 1000, 2)) @@ -604,6 +613,26 @@ class ChartingState extends MusicBeatState return curStep; } + function resetSection(songBeginning:Bool = false):Void + { + updateGrid(); + + FlxG.sound.music.pause(); + vocals.pause(); + + // Basically old shit from changeSection??? + FlxG.sound.music.time = lengthBpmBullshit() * Conductor.stepCrochet * curSection; + + if (songBeginning) + FlxG.sound.music.time = 0; + + vocals.time = FlxG.sound.music.time; + updateCurStep(); + + updateGrid(); + updateSectionUI(); + } + function changeSection(sec:Int = 0, ?updateMusic:Bool = true):Void { trace('changing section' + sec); @@ -627,7 +656,15 @@ class ChartingState extends MusicBeatState daNum++; } - FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet; + if (FlxG.keys.pressed.CONTROL) + { + FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet; + } + else + { + FlxG.sound.music.time += (lengthBpmBullshit() * Conductor.stepCrochet) * sec; + } + vocals.time = FlxG.sound.music.time; updateCurStep(); } From 17b6015b2c1ad74bb8fe52fadb90c1f9c40ba4c6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 7 Jan 2021 20:38:32 -0500 Subject: [PATCH 33/86] more keybind shit --- CHANGELOG.md | 1 + source/ChartingState.hx | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 763ca377a..112ab5f21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Enemy icons change when they you are winning a lot ([Thanks to pahaze for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/138)) - Holding CTRL in charting editor places notes on both sides +- Other charting editor workflow improvements ### Fixed - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index b7001a708..54f526ce2 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -495,6 +495,22 @@ class ChartingState extends MusicBeatState FlxG.switchState(new PlayState()); } + if (FlxG.keys.justPressed.TAB) + { + if (FlxG.keys.pressed.SHIFT) + { + UI_box.selected_tab -= 1; + if (UI_box.selected_tab < 0) + UI_box.selected_tab = 2; + } + else + { + UI_box.selected_tab += 1; + if (UI_box.selected_tab >= 3) + UI_box.selected_tab = 0; + } + } + if (!typingShit.hasFocus) { if (FlxG.keys.justPressed.SPACE) @@ -514,9 +530,9 @@ class ChartingState extends MusicBeatState if (FlxG.keys.justPressed.R) { if (FlxG.keys.pressed.SHIFT) - resetSection(); - else resetSection(true); + else + resetSection(); } if (FlxG.mouse.wheel != 0) @@ -524,7 +540,7 @@ class ChartingState extends MusicBeatState FlxG.sound.music.pause(); vocals.pause(); - FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 1); + FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4); vocals.time = FlxG.sound.music.time; } @@ -624,7 +640,10 @@ class ChartingState extends MusicBeatState FlxG.sound.music.time = lengthBpmBullshit() * Conductor.stepCrochet * curSection; if (songBeginning) + { FlxG.sound.music.time = 0; + curSection = 0; + } vocals.time = FlxG.sound.music.time; updateCurStep(); From 2063d00b5d156738412a6a0cdcee9cc6bb9cb93b Mon Sep 17 00:00:00 2001 From: George FunBook Date: Fri, 8 Jan 2021 14:01:59 -0600 Subject: [PATCH 34/86] fix pico asset paths --- source/Character.hx | 2 +- source/PlayState.hx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 255fcdc3a..09af0eb9c 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -131,7 +131,7 @@ class Character extends FlxSprite addOffset("singDOWN", -30, -40); playAnim('idle'); case 'pico': - tex = FlxAtlasFrames.fromSparrow('assets/images/.Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); + tex = FlxAtlasFrames.fromSparrow('assets/images/Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); frames = tex; animation.addByPrefix('idle', "Pico Idle Dance", 24); animation.addByPrefix('singUP', 'pico Up note0', 24, false); diff --git a/source/PlayState.hx b/source/PlayState.hx index bef9e30db..8f7d2e613 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -163,11 +163,11 @@ class PlayState extends MusicBeatState { curStage = 'philly'; - var bg:FlxSprite = new FlxSprite(-100).loadGraphic('assets/images/sky.png'); + var bg:FlxSprite = new FlxSprite(-100).loadGraphic('assets/images/philly/sky.png'); bg.scrollFactor.set(0.1, 0.1); add(bg); - var city:FlxSprite = new FlxSprite(-10).loadGraphic('assets/images/city.png'); + var city:FlxSprite = new FlxSprite(-10).loadGraphic('assets/images/philly/city.png'); city.scrollFactor.set(0.3, 0.3); city.setGraphicSize(Std.int(city.width * 0.85)); city.updateHitbox(); @@ -186,10 +186,10 @@ class PlayState extends MusicBeatState phillyCityLights.add(light); } - var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic('assets/images/behindTrain.png'); + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic('assets/images/philly/behindTrain.png'); add(streetBehind); - phillyTrain = new FlxSprite(2000, 360).loadGraphic('assets/images/train.png'); + phillyTrain = new FlxSprite(2000, 360).loadGraphic('assets/images/philly/train.png'); add(phillyTrain); trainSound = new FlxSound().loadEmbedded('assets/sounds/train_passes' + TitleState.soundExt); @@ -197,7 +197,7 @@ class PlayState extends MusicBeatState // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); - var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic('assets/images/street.png'); + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic('assets/images/philly/street.png'); add(street); } else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') From bf4f828f566330e1d2c447383b1792d79d468244 Mon Sep 17 00:00:00 2001 From: Lotusotho <69006987+lotusotho@users.noreply.github.com> Date: Sun, 10 Jan 2021 17:03:46 +0100 Subject: [PATCH 35/86] Delete FlxTransitionableState --- source/PlayState.hx | 1 - 1 file changed, 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 8f7d2e613..10dcad3e1 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -11,7 +11,6 @@ import flixel.FlxSprite; import flixel.FlxState; import flixel.FlxSubState; import flixel.addons.display.FlxGridOverlay; -import flixel.addons.transition.FlxTransitionableState; import flixel.graphics.atlas.FlxAtlas; import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup.FlxTypedGroup; From 937e546820e9aec4ec7ed5b43976bca4f09f5188 Mon Sep 17 00:00:00 2001 From: Waviest <31796727+WaviestBalloon@users.noreply.github.com> Date: Mon, 11 Jan 2021 16:28:34 +0000 Subject: [PATCH 36/86] Update README.md Co-authored-by: M&M --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da4cd3863..72da2c2ca 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ and you should be good to go there. Once you have all those installed, it's pretty easy to compile the game. You just need to run 'lime test html5 -debug' in the root of the project to build and run the HTML5 version. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) To run it from your desktop (Windows, Mac, Linux) it can be a bit more involved. For Linux, you only need to open a terminal in the project directory and run 'lime test linux -debug' and then run the executible file in export/release/linux/bin. For Windows, you need to install Visual Studio Community 2019. While installing VSC, don't click on any of the options to install workloads. Instead, go to the individual components tab and choose the following: -* MSCV v142 - VS 2019 C++ x64/x86 build tools +* MSVC v142 - VS 2019 C++ x64/x86 build tools * Windows SDK (10.0.17763.0) * C++ Profiling tools * C++ CMake tools for windows From 8ad3bf1f44c92ca326218b0febaf09e417b21847 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 13 Jan 2021 22:38:31 -0500 Subject: [PATCH 37/86] swappable characters debug --- CHANGELOG.md | 3 +++ source/Boyfriend.hx | 4 ++-- source/Character.hx | 26 ++++++++++++++++++--- source/ChartingState.hx | 50 +++++++++++++++++++++++++++++++++-------- source/PlayState.hx | 6 ++--- 5 files changed, 72 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 112ab5f21..80367d567 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Enemy icons change when they you are winning a lot ([Thanks to pahaze for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/138)) - Holding CTRL in charting editor places notes on both sides +- Q and E changes sustain lengths in note editor - Other charting editor workflow improvements +### Removed +- Removed APE ### Fixed - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) diff --git a/source/Boyfriend.hx b/source/Boyfriend.hx index a30805221..b22917935 100644 --- a/source/Boyfriend.hx +++ b/source/Boyfriend.hx @@ -11,9 +11,9 @@ class Boyfriend extends Character { public var stunned:Bool = false; - public function new(x:Float, y:Float) + public function new(x:Float, y:Float, ?char:String = 'bf') { - super(x, y); + super(x, y, char, true); } override function update(elapsed:Float) diff --git a/source/Character.hx b/source/Character.hx index 255fcdc3a..3b2b22875 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -166,8 +166,7 @@ class Character extends FlxSprite addOffset("singLEFTmiss", 62, 64); addOffset("singDOWNmiss", 210, -28); - if (!isPlayer) - flipX = true; + flipX = true; case 'bf': var tex = FlxAtlasFrames.fromSparrow('assets/images/BOYFRIEND.png', 'assets/images/BOYFRIEND.xml'); @@ -188,7 +187,6 @@ class Character extends FlxSprite animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false); animation.addByPrefix('scared', 'BF idle shaking', 24); - playAnim('idle'); antialiasing = true; @@ -206,6 +204,28 @@ class Character extends FlxSprite addOffset('deathLoop', 37, 5); addOffset('deathConfirm', 37, 69); addOffset('scared', -4); + + flipX = true; + } + + playAnim('singUP'); + + if (isPlayer) + { + flipX = !flipX; + + // var animArray + var oldRight = animation.getByName('singRIGHT').frames; + animation.getByName('singRIGHT').frames = animation.getByName('singLEFT').frames; + animation.getByName('singLEFT').frames = oldRight; + + // IF THEY HAVE MISS ANIMATIONS?? + if (animation.getByName('singRIGHTmiss') != null) + { + var oldMiss = animation.getByName('singRIGHTmiss').frames; + animation.getByName('singRIGHTmiss').frames = animation.getByName('singLEFTmiss').frames; + animation.getByName('singLEFTmiss').frames = oldMiss; + } } } diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 54f526ce2..04d6bab33 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -47,6 +47,8 @@ class ChartingState extends MusicBeatState */ var curSection:Int = 0; + public static var lastSection:Int = 0; + var bpmTxt:FlxText; var strumLine:FlxSprite; @@ -79,6 +81,8 @@ class ChartingState extends MusicBeatState override function create() { + curSection = lastSection; + gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16); add(gridBG); @@ -167,6 +171,18 @@ class ChartingState extends MusicBeatState trace('CHECKED!'); }; + var check_mute_inst = new FlxUICheckBox(10, 200, null, null, "Mute Instrumental (in editor)", 100); + check_mute_inst.checked = false; + check_mute_inst.callback = function() + { + var vol:Float = 1; + + if (check_mute_inst.checked) + vol = 0; + + FlxG.sound.music.volume = vol; + }; + var saveButton:FlxButton = new FlxButton(110, 8, "Save", function() { saveLevel(); @@ -217,6 +233,7 @@ class ChartingState extends MusicBeatState tab_group_song.add(UI_songTitle); tab_group_song.add(check_voices); + tab_group_song.add(check_mute_inst); tab_group_song.add(saveButton); tab_group_song.add(reloadSong); tab_group_song.add(reloadSongJson); @@ -489,12 +506,23 @@ class ChartingState extends MusicBeatState if (FlxG.keys.justPressed.ENTER) { + lastSection = curSection; + PlayState.SONG = _song; FlxG.sound.music.stop(); vocals.stop(); FlxG.switchState(new PlayState()); } + if (FlxG.keys.justPressed.E) + { + changeNoteSustain(Conductor.stepCrochet); + } + if (FlxG.keys.justPressed.Q) + { + changeNoteSustain(-Conductor.stepCrochet); + } + if (FlxG.keys.justPressed.TAB) { if (FlxG.keys.pressed.SHIFT) @@ -607,6 +635,18 @@ class ChartingState extends MusicBeatState super.update(elapsed); } + function changeNoteSustain(value:Float):Void + { + if (curSelectedNote[2] != null) + { + curSelectedNote[2] += value; + curSelectedNote[2] = Math.max(curSelectedNote[2], 0); + } + + updateNoteUI(); + updateGrid(); + } + function recalculateSteps():Int { var steps:Int = 0; @@ -675,15 +715,7 @@ class ChartingState extends MusicBeatState daNum++; } - if (FlxG.keys.pressed.CONTROL) - { - FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet; - } - else - { - FlxG.sound.music.time += (lengthBpmBullshit() * Conductor.stepCrochet) * sec; - } - + FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet; vocals.time = FlxG.sound.music.time; updateCurStep(); } diff --git a/source/PlayState.hx b/source/PlayState.hx index bef9e30db..adf543204 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -312,7 +312,7 @@ class PlayState extends MusicBeatState dad.y += 300; } - boyfriend = new Boyfriend(770, 450); + boyfriend = new Boyfriend(770, 450, SONG.player1); add(boyfriend); // REPOSITIONING PER STAGE @@ -796,8 +796,8 @@ class PlayState extends MusicBeatState iconP1.animation.curAnim.curFrame = 1; else iconP1.animation.curAnim.curFrame = 0; - - if (healthBar.percent > 80) + + if (healthBar.percent > 80) iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1; else iconP2.animation.curAnim.curFrame = Std.parseInt(curStage); From d8159efb4b189411085799404767978937524237 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 14 Jan 2021 23:33:12 -0500 Subject: [PATCH 38/86] HAIR AND MOD SUPPORT SHIT IN PROGRESS --- Project.xml | 4 +- source/AnimationDebug.hx | 2 + source/Boyfriend.hx | 27 ++++++------ source/Character.hx | 93 +++++++++++++++++++++++++++++++++++++--- source/ChartingState.hx | 2 +- source/CoolUtil.hx | 20 +++++++++ source/FreeplayState.hx | 6 ++- source/HealthIcon.hx | 3 +- source/PlayState.hx | 11 +++-- source/TitleState.hx | 2 +- 10 files changed, 143 insertions(+), 27 deletions(-) create mode 100644 source/CoolUtil.hx diff --git a/Project.xml b/Project.xml index 329a7ab82..f621d06ba 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + @@ -24,7 +24,7 @@ - + diff --git a/source/AnimationDebug.hx b/source/AnimationDebug.hx index e74b45c56..05b40d632 100644 --- a/source/AnimationDebug.hx +++ b/source/AnimationDebug.hx @@ -50,6 +50,7 @@ class AnimationDebug extends FlxState add(dad); char = dad; + dad.flipX = false; } else { @@ -59,6 +60,7 @@ class AnimationDebug extends FlxState add(bf); char = bf; + bf.flipX = false; } dumbTexts = new FlxTypedGroup(); diff --git a/source/Boyfriend.hx b/source/Boyfriend.hx index b22917935..c9f87f9bf 100644 --- a/source/Boyfriend.hx +++ b/source/Boyfriend.hx @@ -18,21 +18,24 @@ class Boyfriend extends Character override function update(elapsed:Float) { - if (animation.curAnim.name.startsWith('sing')) + if (!debugMode) { - holdTimer += elapsed; - } - else - holdTimer = 0; + if (animation.curAnim.name.startsWith('sing')) + { + holdTimer += elapsed; + } + else + holdTimer = 0; - if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode) - { - playAnim('idle', true, false, 10); - } + if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode) + { + playAnim('idle', true, false, 10); + } - if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished) - { - playAnim('deathLoop'); + if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished) + { + playAnim('deathLoop'); + } } super.update(elapsed); diff --git a/source/Character.hx b/source/Character.hx index 3b2b22875..abb2908cb 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -61,6 +61,19 @@ class Character extends FlxSprite playAnim('danceRight'); + case 'gf-car': + tex = FlxAtlasFrames.fromSparrow('assets/images/gfCar.png', 'assets/images/gfCar.xml'); + frames = tex; + animation.addByIndices('singUP', 'GF Dancing Beat Hair blowing CAR', [0], "", 24, false); + animation.addByIndices('danceLeft', 'GF Dancing Beat Hair blowing CAR', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); + animation.addByIndices('danceRight', 'GF Dancing Beat Hair blowing CAR', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, + false); + + addOffset('danceLeft', 0); + addOffset('danceRight', 0); + + playAnim('danceRight'); + case 'dad': // DAD ANIMATION LOADING CODE tex = FlxAtlasFrames.fromSparrow('assets/images/DADDY_DEAREST.png', 'assets/images/DADDY_DEAREST.xml'); @@ -70,13 +83,14 @@ class Character extends FlxSprite animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24); animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24); animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24); - playAnim('idle'); addOffset('idle'); addOffset("singUP", -6, 50); addOffset("singRIGHT", 0, 27); addOffset("singLEFT", -10, 10); addOffset("singDOWN", 0, -30); + + playAnim('idle'); case 'spooky': tex = FlxAtlasFrames.fromSparrow('assets/images/spooky_kids_assets.png', 'assets/images/spooky_kids_assets.xml'); frames = tex; @@ -108,13 +122,33 @@ class Character extends FlxSprite // CUZ DAVE IS DUMB! animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); + addOffset('idle'); + addOffset("singUP", 14, 71); + addOffset("singRIGHT", 10, -60); + addOffset("singLEFT", 250, -23); + addOffset("singDOWN", 20, -160); + playAnim('idle'); + case 'mom-car': + tex = FlxAtlasFrames.fromSparrow('assets/images/momCar.png', 'assets/images/momCar.xml'); + frames = tex; + + animation.addByPrefix('idle', "Mom Idle", 24, false); + animation.addByPrefix('singUP', "Mom Up Pose", 24, false); + animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false); + animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false); + // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT + // CUZ DAVE IS DUMB! + animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); + addOffset('idle'); addOffset("singUP", 14, 71); addOffset("singRIGHT", 10, -60); addOffset("singLEFT", 250, -23); addOffset("singDOWN", 20, -160); + + playAnim('idle'); case 'monster': tex = FlxAtlasFrames.fromSparrow('assets/images/Monster_Assets.png', 'assets/images/Monster_Assets.xml'); frames = tex; @@ -131,7 +165,7 @@ class Character extends FlxSprite addOffset("singDOWN", -30, -40); playAnim('idle'); case 'pico': - tex = FlxAtlasFrames.fromSparrow('assets/images/.Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); + tex = FlxAtlasFrames.fromSparrow('assets/images/Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); frames = tex; animation.addByPrefix('idle', "Pico Idle Dance", 24); animation.addByPrefix('singUP', 'pico Up note0', 24, false); @@ -156,6 +190,7 @@ class Character extends FlxSprite animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); playAnim('idle'); + addOffset('idle'); addOffset("singUP", -29, 27); addOffset("singRIGHT", -68, -7); @@ -166,6 +201,8 @@ class Character extends FlxSprite addOffset("singLEFTmiss", 62, 64); addOffset("singDOWNmiss", 210, -28); + playAnim('idle'); + flipX = true; case 'bf': @@ -205,6 +242,32 @@ class Character extends FlxSprite addOffset('deathConfirm', 37, 69); addOffset('scared', -4); + flipX = true; + case 'bf-car': + var tex = FlxAtlasFrames.fromSparrow('assets/images/bfCar.png', 'assets/images/bfCar.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); + + 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); + flipX = true; } @@ -270,8 +333,12 @@ class Character extends FlxSprite { case 'mom': playAnim('idle'); + case 'mom-car': + playAnim('idle'); case 'bf': - + playAnim('idle'); + case 'bf-car': + playAnim('idle'); case 'gf': if (!animation.curAnim.name.startsWith('hair')) { @@ -283,6 +350,17 @@ class Character extends FlxSprite playAnim('danceLeft'); } + case 'gf-car': + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } + case 'spooky': danced = !danced; @@ -303,10 +381,13 @@ class Character extends FlxSprite { animation.play(AnimName, Force, Reversed, Frame); - var daOffset = animOffsets.get(animation.curAnim.name); - if (animOffsets.exists(animation.curAnim.name)) + if (animation.curAnim != null) { - offset.set(daOffset[0], daOffset[1]); + var daOffset = animOffsets.get(animation.curAnim.name); + if (animOffsets.exists(animation.curAnim.name)) + { + offset.set(daOffset[0], daOffset[1]); + } } if (curCharacter == 'gf') diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 04d6bab33..95b165105 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -208,7 +208,7 @@ class ChartingState extends MusicBeatState stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; - var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom']; + var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom', 'mom-car', 'bf-car']; for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) { diff --git a/source/CoolUtil.hx b/source/CoolUtil.hx new file mode 100644 index 000000000..6c2755195 --- /dev/null +++ b/source/CoolUtil.hx @@ -0,0 +1,20 @@ +package; + +import lime.utils.Assets; + +using StringTools; + +class CoolUtil +{ + public static function coolTextFile(path:String):Array + { + var daList:Array = Assets.getText(path).trim().split('\n'); + + for (i in 0...daList.length) + { + daList[i] = daList[i].trim(); + } + + return daList; + } +} diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index e20858def..f982cc735 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -10,9 +10,11 @@ import flixel.text.FlxText; import flixel.util.FlxColor; import lime.utils.Assets; +using StringTools; + class FreeplayState extends MusicBeatState { - var songs:Array = ["Bopeebo", "Dadbattle", "Fresh", "Tutorial"]; + var songs:Array = []; var selector:FlxText; var curSelected:Int = 0; @@ -28,6 +30,8 @@ class FreeplayState extends MusicBeatState override function create() { + songs = CoolUtil.coolTextFile('assets/data/freeplaySonglist.txt'); + /* if (FlxG.sound.music != null) { diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 99f0e32ae..56b4d8c19 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -7,14 +7,15 @@ class HealthIcon extends FlxSprite public function new(char:String = 'bf', isPlayer:Bool = false) { super(); - loadGraphic('assets/images/iconGrid.png', true, 150, 150); antialiasing = true; animation.add('bf', [0, 1], 0, false, isPlayer); + animation.add('bf-car', [0, 1], 0, false, isPlayer); animation.add('spooky', [2, 3], 0, false, isPlayer); animation.add('pico', [4, 5], 0, false, isPlayer); animation.add('mom', [6, 7], 0, false, isPlayer); + animation.add('mom-car', [6, 7], 0, false, isPlayer); animation.add('tankman', [8, 9], 0, false, isPlayer); animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index adf543204..96d569a5e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -276,7 +276,12 @@ class PlayState extends MusicBeatState add(stageCurtains); } - gf = new Character(400, 130, 'gf'); + var gfVersion:String = 'gf'; + + if (curStage == 'limo') + gfVersion = 'gf-car'; + + gf = new Character(400, 130, gfVersion); gf.scrollFactor.set(0.95, 0.95); gf.antialiasing = true; add(gf); @@ -798,9 +803,9 @@ class PlayState extends MusicBeatState iconP1.animation.curAnim.curFrame = 0; if (healthBar.percent > 80) - iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1; + iconP2.animation.curAnim.curFrame = 1; else - iconP2.animation.curAnim.curFrame = Std.parseInt(curStage); + iconP2.animation.curAnim.curFrame = 0; /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ diff --git a/source/TitleState.hx b/source/TitleState.hx index 786d2f2cc..6b396a87d 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -40,7 +40,7 @@ class TitleState extends MusicBeatState override public function create():Void { - Polymod.init({modRoot: "assets/mods", dirs: ['introMod']}); + Polymod.init({modRoot: "assets/mods", dirs: CoolUtil.coolTextFile('assets/mods/modList.txt')}); #if (!web) TitleState.soundExt = '.ogg'; From 2b1fa0aa77904ab24b6496470e20044141935e39 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 14 Jan 2021 23:39:43 -0500 Subject: [PATCH 39/86] cool changelog lol! --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80367d567..836251248 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Holding CTRL in charting editor places notes on both sides - Q and E changes sustain lengths in note editor - Other charting editor workflow improvements +- More hair physics ### Removed - Removed APE ### Fixed +- Old Verison popup screen weirdness ([Thanks to gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/155)) - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) ## [0.2.5] - 2020-12-27 From 86861b72871af3977d6219fbd153f43ab78181e5 Mon Sep 17 00:00:00 2001 From: regulad Date: Fri, 15 Jan 2021 09:49:25 -0500 Subject: [PATCH 40/86] Small README change I had some troubles compiling and it seems some other people did too (#181, maybe more issues), so hopefully this will help just a little bit --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 72da2c2ca..fbe77d794 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,12 @@ newgrounds So for each of those type `haxelib install [library]` so shit like `haxelib install newgrounds` +You'll also need to install polymod. Do this with + +``` +haxelib git polymod https://github.com/larsiusprime/polymod.git +``` + ### Ignored files I gitignore the API keys for the game, so that no one can nab them and post fake highscores on the leaderboards. But because of that the game From a42e3b9dfcd6d98a53ba9311f0bfcfca575bacfb Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 16 Jan 2021 15:14:56 -0500 Subject: [PATCH 41/86] CHARTS LOL --- source/Character.hx | 14 ++++++++++++++ source/ChartingState.hx | 11 ++++++++++- source/HealthIcon.hx | 2 ++ source/Section.hx | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/source/Character.hx b/source/Character.hx index abb2908cb..1771c49d1 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -269,6 +269,20 @@ class Character extends FlxSprite addOffset("singDOWNmiss", -11, -19); flipX = true; + case 'parents-christmas': + frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/mom_dad_christmas_assets.png', + 'assets/images/christmas/mom_dad_christmas_assets.xml'); + animation.addByPrefix('idle', 'Parent Christmas Idle', 24, false); + animation.addByPrefix('singUP', 'Parent Up Note Dad', 24, false); + animation.addByPrefix('singDOWN', 'Parent Down Note Dad', 24, false); + animation.addByPrefix('singLEFT', 'Parent Left Note Dad', 24, false); + animation.addByPrefix('singRIGHT', 'Parent Right Note Dad', 24, false); + + animation.addByPrefix('singUP-alt', 'Parent Up Note Mom', 24, false); + + animation.addByPrefix('singDOWN-alt', 'Parent Down Note Mom', 24, false); + animation.addByPrefix('singLEFT-alt', 'Parent Left Note Mom', 24, false); + animation.addByPrefix('singRIGHT-alt', 'Parent Right Note Mom', 24, false); } playAnim('singUP'); diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 95b165105..9f9020041 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -253,6 +253,7 @@ class ChartingState extends MusicBeatState var check_mustHitSection:FlxUICheckBox; var check_changeBPM:FlxUICheckBox; var stepperSectionBPM:FlxUINumericStepper; + var check_altAnim:FlxUICheckBox; function addSectionUI():Void { @@ -292,6 +293,9 @@ class ChartingState extends MusicBeatState check_mustHitSection.checked = true; // _song.needsVoices = check_mustHit.checked; + check_altAnim = new FlxUICheckBox(10, 400, null, null, "Alt Animation", 100); + check_altAnim.name = 'check_altAnim'; + check_changeBPM = new FlxUICheckBox(10, 60, null, null, 'Change BPM', 100); check_changeBPM.name = 'check_changeBPM'; @@ -299,6 +303,7 @@ class ChartingState extends MusicBeatState tab_group_section.add(stepperSectionBPM); tab_group_section.add(stepperCopy); tab_group_section.add(check_mustHitSection); + tab_group_section.add(check_altAnim); tab_group_section.add(check_changeBPM); tab_group_section.add(copyButton); tab_group_section.add(clearSectionButton); @@ -384,6 +389,8 @@ class ChartingState extends MusicBeatState case 'Change BPM': _song.notes[curSection].changeBPM = check.checked; FlxG.log.add('changed bpm shit'); + case "Alt Animation": + _song.notes[curSection].altAnim = check.checked; } } else if (id == FlxUINumericStepper.CHANGE_EVENT && (sender is FlxUINumericStepper)) @@ -746,6 +753,7 @@ class ChartingState extends MusicBeatState stepperLength.value = sec.lengthInSteps; check_mustHitSection.checked = sec.mustHitSection; + check_altAnim.checked = sec.altAnim; check_changeBPM.checked = sec.changeBPM; stepperSectionBPM.value = sec.bpm; } @@ -824,7 +832,8 @@ class ChartingState extends MusicBeatState changeBPM: false, mustHitSection: true, sectionNotes: [], - typeOfSection: 0 + typeOfSection: 0, + altAnim: false }; _song.notes.push(sec); diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 56b4d8c19..e519e6974 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -21,6 +21,8 @@ class HealthIcon extends FlxSprite animation.add('dad', [12, 13], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); + animation.add('parents-christmas', [0, 1], 0, false, isPlayer); + animation.add('monster', [0], 0, false, isPlayer); animation.play(char); scrollFactor.set(); } diff --git a/source/Section.hx b/source/Section.hx index 19770b6ea..c859f6f31 100644 --- a/source/Section.hx +++ b/source/Section.hx @@ -8,6 +8,7 @@ typedef SwagSection = var mustHitSection:Bool; var bpm:Int; var changeBPM:Bool; + var altAnim:Bool; } class Section From b3aec93d45b8685785ca9932dfb52be8f00b7b47 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 16 Jan 2021 15:20:57 -0500 Subject: [PATCH 42/86] fix placement of bf --- source/Character.hx | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 1771c49d1..a7e2b1545 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -291,17 +291,21 @@ class Character extends FlxSprite { flipX = !flipX; - // var animArray - var oldRight = animation.getByName('singRIGHT').frames; - animation.getByName('singRIGHT').frames = animation.getByName('singLEFT').frames; - animation.getByName('singLEFT').frames = oldRight; - - // IF THEY HAVE MISS ANIMATIONS?? - if (animation.getByName('singRIGHTmiss') != null) + // Doesn't flip for BF, since his are already in the right place??? + if (character != 'bf' && character != 'bf-car') { - var oldMiss = animation.getByName('singRIGHTmiss').frames; - animation.getByName('singRIGHTmiss').frames = animation.getByName('singLEFTmiss').frames; - animation.getByName('singLEFTmiss').frames = oldMiss; + // var animArray + var oldRight = animation.getByName('singRIGHT').frames; + animation.getByName('singRIGHT').frames = animation.getByName('singLEFT').frames; + animation.getByName('singLEFT').frames = oldRight; + + // IF THEY HAVE MISS ANIMATIONS?? + if (animation.getByName('singRIGHTmiss') != null) + { + var oldMiss = animation.getByName('singRIGHTmiss').frames; + animation.getByName('singRIGHTmiss').frames = animation.getByName('singLEFTmiss').frames; + animation.getByName('singLEFTmiss').frames = oldMiss; + } } } } @@ -395,13 +399,10 @@ class Character extends FlxSprite { animation.play(AnimName, Force, Reversed, Frame); - if (animation.curAnim != null) + var daOffset = animOffsets.get(animation.curAnim.name); + if (animOffsets.exists(animation.curAnim.name)) { - var daOffset = animOffsets.get(animation.curAnim.name); - if (animOffsets.exists(animation.curAnim.name)) - { - offset.set(daOffset[0], daOffset[1]); - } + offset.set(daOffset[0], daOffset[1]); } if (curCharacter == 'gf') From a041da2012764462ea2a6ca45de30b32dcbd0578 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 16 Jan 2021 17:21:06 -0500 Subject: [PATCH 43/86] dope shit in progress --- CHANGELOG.md | 1 + source/Character.hx | 30 ++++++++++++++++++++++++++---- source/ChartingState.hx | 4 +++- source/MusicBeatState.hx | 4 ++++ source/PlayState.hx | 1 + source/TitleState.hx | 7 ++----- 6 files changed, 37 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 836251248..6e6908860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Old Verison popup screen weirdness ([Thanks to gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/155)) - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) +- Screen wipe being cut off in the limo/mom stage. ## [0.2.5] - 2020-12-27 ### Added diff --git a/source/Character.hx b/source/Character.hx index a7e2b1545..36c493c5a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -225,8 +225,6 @@ class Character extends FlxSprite animation.addByPrefix('scared', 'BF idle shaking', 24); - antialiasing = true; - addOffset('idle', -5); addOffset("singUP", -29, 27); addOffset("singRIGHT", -38, -7); @@ -256,8 +254,6 @@ class Character extends FlxSprite animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); - antialiasing = true; - addOffset('idle', -5); addOffset("singUP", -29, 27); addOffset("singRIGHT", -38, -7); @@ -283,8 +279,34 @@ class Character extends FlxSprite animation.addByPrefix('singDOWN-alt', 'Parent Down Note Mom', 24, false); animation.addByPrefix('singLEFT-alt', 'Parent Left Note Mom', 24, false); animation.addByPrefix('singRIGHT-alt', 'Parent Right Note Mom', 24, false); + + addOffset('idle'); + addOffset("singUP", -20, 50); + addOffset("singRIGHT", -51); + addOffset("singLEFT", -30); + addOffset("singDOWN", -30, -40); + addOffset("singUP-alt", -20, 50); + addOffset("singRIGHT-alt", -51); + addOffset("singLEFT-alt", -30); + addOffset("singDOWN-alt", -30, -40); + case 'monster-christmas': + frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/Monster_Assets_Christmas.png', + 'assets/images/christmas/Monster_Assets_Christmas.xml'); + animation.addByPrefix('idle', 'monster idle', 24, false); + animation.addByPrefix('singUP', 'monster up note', 24, false); + animation.addByPrefix('singDOWN', 'monster down', 24, false); + animation.addByPrefix('singLEFT', 'Monster left note', 24, false); + animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); + + addOffset('idle'); + addOffset("singUP", -20, 50); + addOffset("singRIGHT", -51); + addOffset("singLEFT", -30); + addOffset("singDOWN", -30, -40); } + antialiasing = true; + playAnim('singUP'); if (isPlayer) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 9f9020041..7de9b8387 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -208,7 +208,9 @@ class ChartingState extends MusicBeatState stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; - var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom', 'mom-car', 'bf-car']; + var characters:Array = [ + "bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom', 'mom-car', 'bf-car', 'parents-christmas', 'monster-christmas' + ]; for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) { diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index 0d3862002..bda503128 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -3,6 +3,7 @@ package; import flixel.FlxG; import flixel.addons.transition.FlxTransitionableState; import flixel.addons.ui.FlxUIState; +import flixel.math.FlxRect; import flixel.util.FlxTimer; class MusicBeatState extends FlxUIState @@ -22,6 +23,9 @@ class MusicBeatState extends FlxUIState override function create() { + if (transIn != null) + trace('reg ' + transIn.region); + #if (!web) TitleState.soundExt = '.ogg'; #end diff --git a/source/PlayState.hx b/source/PlayState.hx index 3d94bf666..537f0bd19 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -16,6 +16,7 @@ import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup.FlxTypedGroup; import flixel.math.FlxMath; import flixel.math.FlxPoint; +import flixel.math.FlxRect; import flixel.system.FlxSound; import flixel.text.FlxText; import flixel.tweens.FlxEase; diff --git a/source/TitleState.hx b/source/TitleState.hx index f8049205b..b15ee2f41 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -106,12 +106,9 @@ class TitleState extends MusicBeatState diamond.destroyOnNoUse = false; FlxTransitionableState.defaultTransIn = new TransitionData(FADE, FlxColor.BLACK, 1, new FlxPoint(0, -1), {asset: diamond, width: 32, height: 32}, - new FlxRect(0, 0, FlxG.width, FlxG.height)); + new FlxRect(-200, 0, FlxG.width * 1.4, FlxG.height)); FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 0.7, new FlxPoint(0, 1), - {asset: diamond, width: 32, height: 32}, new FlxRect(0, 0, FlxG.width, FlxG.height)); - - FlxTransitionableState.defaultTransIn.tileData = {asset: diamond, width: 32, height: 32}; - FlxTransitionableState.defaultTransOut.tileData = {asset: diamond, width: 32, height: 32}; + {asset: diamond, width: 32, height: 32}, new FlxRect(-200, 0, FlxG.width * 1.4, FlxG.height)); transIn = FlxTransitionableState.defaultTransIn; transOut = FlxTransitionableState.defaultTransOut; From 88b52ab5482624ede9c1c26de9364aa394a74edb Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 16 Jan 2021 23:15:29 -0500 Subject: [PATCH 44/86] cool heads --- CHANGELOG.md | 1 + source/ChartingState.hx | 36 ++++++++++++++++++++++++++++++++++++ source/TitleState.hx | 4 ++++ 3 files changed, 41 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e6908860..3b0289f89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Q and E changes sustain lengths in note editor - Other charting editor workflow improvements - More hair physics +- Heads appear at top of chart editor to help show which side ur charting for ### Removed - Removed APE ### Fixed diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 7de9b8387..62ed05591 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -79,6 +79,9 @@ class ChartingState extends MusicBeatState var vocals:FlxSound; + var leftIcon:HealthIcon; + var rightIcon:HealthIcon; + override function create() { curSection = lastSection; @@ -86,6 +89,20 @@ class ChartingState extends MusicBeatState gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16); add(gridBG); + leftIcon = new HealthIcon('bf'); + rightIcon = new HealthIcon('dad'); + leftIcon.scrollFactor.set(1, 1); + rightIcon.scrollFactor.set(1, 1); + + leftIcon.setGraphicSize(0, 45); + rightIcon.setGraphicSize(0, 45); + + add(leftIcon); + add(rightIcon); + + leftIcon.setPosition(0, -100); + rightIcon.setPosition(gridBG.width / 2, -100); + var gridBlackLine:FlxSprite = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK); add(gridBlackLine); @@ -388,6 +405,9 @@ class ChartingState extends MusicBeatState { case 'Must hit section': _song.notes[curSection].mustHitSection = check.checked; + + updateHeads(); + case 'Change BPM': _song.notes[curSection].changeBPM = check.checked; FlxG.log.add('changed bpm shit'); @@ -758,6 +778,22 @@ class ChartingState extends MusicBeatState check_altAnim.checked = sec.altAnim; check_changeBPM.checked = sec.changeBPM; stepperSectionBPM.value = sec.bpm; + + updateHeads(); + } + + function updateHeads():Void + { + if (check_mustHitSection.checked) + { + leftIcon.animation.play('bf'); + rightIcon.animation.play('dad'); + } + else + { + leftIcon.animation.play('dad'); + rightIcon.animation.play('bf'); + } } function updateNoteUI():Void diff --git a/source/TitleState.hx b/source/TitleState.hx index b15ee2f41..73bbb7534 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -113,6 +113,10 @@ class TitleState extends MusicBeatState transIn = FlxTransitionableState.defaultTransIn; transOut = FlxTransitionableState.defaultTransOut; + // HAD TO MODIFY SOME BACKEND SHIT + // IF THIS PR IS HERE IF ITS ACCEPTED UR GOOD TO GO + // https://github.com/HaxeFlixel/flixel-addons/pull/348 + // var music:FlxSound = new FlxSound(); // music.loadStream('assets/music/freakyMenu' + TitleState.soundExt); // FlxG.sound.list.add(music); From 331201bb2fff22bc41ae5843d73092f16ffe24d7 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 17 Jan 2021 04:16:02 -0500 Subject: [PATCH 45/86] LOTS OF SHIT --- source/Character.hx | 97 ++++++++++++++++++++++------------------- source/FreeplayState.hx | 7 +++ source/PlayState.hx | 18 ++++++-- 3 files changed, 72 insertions(+), 50 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 36c493c5a..b078778e6 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -281,14 +281,14 @@ class Character extends FlxSprite animation.addByPrefix('singRIGHT-alt', 'Parent Right Note Mom', 24, false); addOffset('idle'); - addOffset("singUP", -20, 50); - addOffset("singRIGHT", -51); - addOffset("singLEFT", -30); - addOffset("singDOWN", -30, -40); - addOffset("singUP-alt", -20, 50); - addOffset("singRIGHT-alt", -51); - addOffset("singLEFT-alt", -30); - addOffset("singDOWN-alt", -30, -40); + addOffset("singUP", -47, 24); + addOffset("singRIGHT", -1, -23); + addOffset("singLEFT", -30, 16); + addOffset("singDOWN", -31, -29); + addOffset("singUP-alt", -47, 24); + addOffset("singRIGHT-alt", -1, -24); + addOffset("singLEFT-alt", -30, 15); + addOffset("singDOWN-alt", -30, -27); case 'monster-christmas': frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/Monster_Assets_Christmas.png', 'assets/images/christmas/Monster_Assets_Christmas.xml'); @@ -369,51 +369,56 @@ class Character extends FlxSprite */ public function dance() { - switch (curCharacter) + if (!debugMode) { - case 'mom': - playAnim('idle'); - case 'mom-car': - playAnim('idle'); - case 'bf': - playAnim('idle'); - case 'bf-car': - playAnim('idle'); - case 'gf': - if (!animation.curAnim.name.startsWith('hair')) - { + switch (curCharacter) + { + case 'mom': + playAnim('idle'); + case 'mom-car': + playAnim('idle'); + case 'bf': + playAnim('idle'); + case 'bf-car': + playAnim('idle'); + case 'gf': + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } + + case 'gf-car': + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } + + case 'spooky': danced = !danced; if (danced) playAnim('danceRight'); else playAnim('danceLeft'); - } - - case 'gf-car': - if (!animation.curAnim.name.startsWith('hair')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - } - - case 'spooky': - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - case 'dad': - playAnim('idle'); - case 'monster': - playAnim('idle'); - case 'pico': - playAnim('idle'); + case 'dad': + playAnim('idle'); + case 'parents-christmas': + playAnim('idle'); + case 'monster': + playAnim('idle'); + case 'pico': + playAnim('idle'); + } } } diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index f982cc735..95dcd494b 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -66,6 +66,13 @@ class FreeplayState extends MusicBeatState songs.push('Milf'); } + if (StoryMenuState.weekUnlocked[5] || isDebug) + { + songs.push('Cocoa'); + songs.push('Eggnog'); + // songs.push('Milf'); + } + // LOAD MUSIC // LOAD CHARACTERS diff --git a/source/PlayState.hx b/source/PlayState.hx index 537f0bd19..c5551f0d0 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -987,16 +987,26 @@ class PlayState extends MusicBeatState if (SONG.song != 'Tutorial') camZooming = true; + var altAnim:String = ""; + + if (SONG.notes[Math.floor(curStep / 16)] != null) + { + if (SONG.notes[Math.floor(curStep / 16)].altAnim) + altAnim = '-alt'; + } + + trace("DA ALT THO?: " + SONG.notes[Math.floor(curStep / 16)].altAnim); + switch (Math.abs(daNote.noteData)) { case 2: - dad.playAnim('singUP', true); + dad.playAnim('singUP' + altAnim, true); case 3: - dad.playAnim('singRIGHT', true); + dad.playAnim('singRIGHT' + altAnim, true); case 1: - dad.playAnim('singDOWN', true); + dad.playAnim('singDOWN' + altAnim, true); case 0: - dad.playAnim('singLEFT', true); + dad.playAnim('singLEFT' + altAnim, true); } dad.holdTimer = 0; From df2aa04b4102cb93772f0ba118639f03d7d9791e Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 17 Jan 2021 19:06:36 -0500 Subject: [PATCH 46/86] jump holds --- CHANGELOG.md | 4 ++- source/PlayState.hx | 62 ++++++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b0289f89..601265c13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Other charting editor workflow improvements - More hair physics - Heads appear at top of chart editor to help show which side ur charting for +### Changed +- Tweaked code relating to inputs, hopefully making notes that are close together more fair to hit ### Removed - Removed APE ### Fixed - Old Verison popup screen weirdness ([Thanks to gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/155)) - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) -- Screen wipe being cut off in the limo/mom stage. +- Screen wipe being cut off in the limo/mom stage. Should fill the whole screen now. ## [0.2.5] - 2020-12-27 ### Added diff --git a/source/PlayState.hx b/source/PlayState.hx index c5551f0d0..368b7befb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1262,38 +1262,40 @@ class PlayState extends MusicBeatState if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate) { possibleNotes.push(daNote); + trace(possibleNotes[0].strumTime); + possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime)); + trace(possibleNotes[0].strumTime); } }); if (possibleNotes.length > 0) { - for (daNote in possibleNotes) + var daNote = possibleNotes[0]; + + if (perfectMode) + noteCheck(true, daNote); + + switch (daNote.noteData) { - if (perfectMode) - noteCheck(true, daNote); + case 2: // NOTES YOU JUST PRESSED + if (upP || rightP || downP || leftP) + noteCheck(upP, daNote); + case 3: + if (upP || rightP || downP || leftP) + noteCheck(rightP, daNote); + case 1: + if (upP || rightP || downP || leftP) + noteCheck(downP, daNote); + case 0: + if (upP || rightP || downP || leftP) + noteCheck(leftP, daNote); + } - switch (daNote.noteData) - { - case 2: // NOTES YOU JUST PRESSED - if (upP || rightP || downP || leftP) - noteCheck(upP, daNote); - case 3: - if (upP || rightP || downP || leftP) - noteCheck(rightP, daNote); - case 1: - if (upP || rightP || downP || leftP) - noteCheck(downP, daNote); - case 0: - if (upP || rightP || downP || leftP) - noteCheck(leftP, daNote); - } - - if (daNote.wasGoodHit) - { - daNote.kill(); - notes.remove(daNote, true); - daNote.destroy(); - } + if (daNote.wasGoodHit) + { + daNote.kill(); + notes.remove(daNote, true); + daNote.destroy(); } } else @@ -1312,16 +1314,16 @@ class PlayState extends MusicBeatState { // NOTES YOU ARE HOLDING case 2: - if (up && daNote.prevNote.wasGoodHit) + if (up) goodNoteHit(daNote); case 3: - if (right && daNote.prevNote.wasGoodHit) + if (right) goodNoteHit(daNote); case 1: - if (down && daNote.prevNote.wasGoodHit) + if (down) goodNoteHit(daNote); case 0: - if (left && daNote.prevNote.wasGoodHit) + if (left) goodNoteHit(daNote); } } @@ -1460,7 +1462,9 @@ class PlayState extends MusicBeatState if (keyP) goodNoteHit(note); else + { badNoteCheck(); + } } function goodNoteHit(note:Note):Void From 8e04a5657f378c0d69e09e46d292caa639a13269 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 17 Jan 2021 21:23:40 -0500 Subject: [PATCH 47/86] double notes??? --- source/PlayState.hx | 83 +++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 368b7befb..d108c8960 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1250,6 +1250,8 @@ class PlayState extends MusicBeatState var downR = controls.DOWN_R; var leftR = controls.LEFT_R; + var controlArray:Array = [leftP, downP, upP, rightP]; + // FlxG.watch.addQuick('asdfa', upP); if ((upP || rightP || downP || leftP) && !boyfriend.stunned && generatedMusic) { @@ -1257,14 +1259,17 @@ class PlayState extends MusicBeatState var possibleNotes:Array = []; + var ignoreList:Array = []; + notes.forEachAlive(function(daNote:Note) { if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate) { + // the sorting probably doesn't need to be in here? who cares lol possibleNotes.push(daNote); - trace(possibleNotes[0].strumTime); possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime)); - trace(possibleNotes[0].strumTime); + + ignoreList.push(daNote.noteData); } }); @@ -1275,22 +1280,44 @@ class PlayState extends MusicBeatState if (perfectMode) noteCheck(true, daNote); - switch (daNote.noteData) + for (coolNote in possibleNotes) { - case 2: // NOTES YOU JUST PRESSED - if (upP || rightP || downP || leftP) - noteCheck(upP, daNote); - case 3: - if (upP || rightP || downP || leftP) - noteCheck(rightP, daNote); - case 1: - if (upP || rightP || downP || leftP) - noteCheck(downP, daNote); - case 0: - if (upP || rightP || downP || leftP) - noteCheck(leftP, daNote); + if (controlArray[coolNote.noteData]) + goodNoteHit(coolNote); + else + { + var inIgnoreList:Bool = false; + for (shit in 0...ignoreList.length) + { + if (controlArray[ignoreList[shit]]) + inIgnoreList = true; + } + if (!inIgnoreList) + badNoteCheck(); + } } - + /* + if (controlArray[daNote.noteData]) + goodNoteHit(daNote); + */ + // trace(daNote.noteData); + /* + switch (daNote.noteData) + { + case 2: // NOTES YOU JUST PRESSED + if (upP || rightP || downP || leftP) + noteCheck(upP, daNote); + case 3: + if (upP || rightP || downP || leftP) + noteCheck(rightP, daNote); + case 1: + if (upP || rightP || downP || leftP) + noteCheck(downP, daNote); + case 0: + if (upP || rightP || downP || leftP) + noteCheck(leftP, daNote); + } + */ if (daNote.wasGoodHit) { daNote.kill(); @@ -1423,30 +1450,6 @@ class PlayState extends MusicBeatState var downP = controls.DOWN_P; var leftP = controls.LEFT_P; - var gamepad = FlxG.gamepads.lastActive; - if (gamepad != null) - { - if (gamepad.anyJustPressed(["DPAD_LEFT", "LEFT_STICK_DIGITAL_LEFT", X])) - { - leftP = true; - } - - if (gamepad.anyJustPressed(["DPAD_RIGHT", "LEFT_STICK_DIGITAL_RIGHT", B])) - { - rightP = true; - } - - if (gamepad.anyJustPressed(['DPAD_UP', "LEFT_STICK_DIGITAL_UP", Y])) - { - upP = true; - } - - if (gamepad.anyJustPressed(["DPAD_DOWN", "LEFT_STICK_DIGITAL_DOWN", A])) - { - downP = true; - } - } - if (leftP) noteMiss(0); if (upP) From be725e9b8ad152d55ee7eb7cafe281b9be5daf9a Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 17 Jan 2021 21:36:23 -0500 Subject: [PATCH 48/86] tweaking??? --- CHANGELOG.md | 1 + source/PlayState.hx | 33 +++++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 601265c13..528f51949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Removed APE ### Fixed +- Maybe fixed double notes / jump notes. Need to tweak it for balance, but should open things up for cooler charts in the future. - Old Verison popup screen weirdness ([Thanks to gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/155)) - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) - Screen wipe being cut off in the limo/mom stage. Should fill the whole screen now. diff --git a/source/PlayState.hx b/source/PlayState.hx index d108c8960..f5f4f506b 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1280,21 +1280,34 @@ class PlayState extends MusicBeatState if (perfectMode) noteCheck(true, daNote); - for (coolNote in possibleNotes) + // Jump notes + if (possibleNotes.length >= 2) { - if (controlArray[coolNote.noteData]) - goodNoteHit(coolNote); - else + if (possibleNotes[0].strumTime == possibleNotes[1].strumTime) { - var inIgnoreList:Bool = false; - for (shit in 0...ignoreList.length) + for (coolNote in possibleNotes) { - if (controlArray[ignoreList[shit]]) - inIgnoreList = true; + if (controlArray[coolNote.noteData]) + goodNoteHit(coolNote); + else + { + var inIgnoreList:Bool = false; + for (shit in 0...ignoreList.length) + { + if (controlArray[ignoreList[shit]]) + inIgnoreList = true; + } + if (!inIgnoreList) + badNoteCheck(); + } } - if (!inIgnoreList) - badNoteCheck(); } + else + noteCheck(controlArray[daNote.noteData], daNote); + } + else // regular notes? + { + noteCheck(controlArray[daNote.noteData], daNote); } /* if (controlArray[daNote.noteData]) From 48b1cab70584b7441dbd9f48c2a814481d84f297 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 19 Jan 2021 21:09:47 -0500 Subject: [PATCH 49/86] charts and a bunch of christmas stuff --- source/Character.hx | 42 +++++++++++++++++++++++ source/ChartingState.hx | 12 +++---- source/FreeplayState.hx | 2 +- source/PlayState.hx | 76 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 124 insertions(+), 8 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index b078778e6..eb85b3438 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -61,6 +61,37 @@ class Character extends FlxSprite playAnim('danceRight'); + case 'gf-christmas': + tex = FlxAtlasFrames.fromSparrow('assets/images/christmas/gfChristmas.png', 'assets/images/christmas/gfChristmas.xml'); + frames = tex; + animation.addByPrefix('cheer', 'GF Cheer', 24, false); + animation.addByPrefix('singLEFT', 'GF left note', 24, false); + animation.addByPrefix('singRIGHT', 'GF Right Note', 24, false); + animation.addByPrefix('singUP', 'GF Up Note', 24, false); + animation.addByPrefix('singDOWN', 'GF Down Note', 24, false); + 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'); + addOffset('sad', -2, -2); + addOffset('danceLeft', 0, -9); + addOffset('danceRight', 0, -9); + + addOffset("singUP", 0, 4); + addOffset("singRIGHT", 0, -20); + addOffset("singLEFT", 0, -19); + addOffset("singDOWN", 0, -20); + addOffset('hairBlow', 45, -8); + addOffset('hairFall', 0, -9); + + addOffset('scared', -2, -17); + + playAnim('danceRight'); + case 'gf-car': tex = FlxAtlasFrames.fromSparrow('assets/images/gfCar.png', 'assets/images/gfCar.xml'); frames = tex; @@ -392,6 +423,17 @@ class Character extends FlxSprite playAnim('danceLeft'); } + case 'gf-christmas': + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } + case 'gf-car': if (!animation.curAnim.name.startsWith('hair')) { diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 62ed05591..48b693298 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -114,11 +114,11 @@ class ChartingState extends MusicBeatState else { _song = { - song: 'Monster', + song: 'Test', notes: [], - bpm: 95, + bpm: 150, sections: 0, - needsVoices: false, + needsVoices: true, player1: 'bf', player2: 'dad', sectionLengths: [], @@ -180,8 +180,8 @@ class ChartingState extends MusicBeatState typingShit = UI_songTitle; var check_voices = new FlxUICheckBox(10, 25, null, null, "Has voice track", 100); - check_voices.checked = true; - _song.needsVoices = check_voices.checked; + check_voices.checked = _song.needsVoices; + // _song.needsVoices = check_voices.checked; check_voices.callback = function() { _song.needsVoices = check_voices.checked; @@ -360,7 +360,7 @@ class ChartingState extends MusicBeatState FlxG.sound.playMusic('assets/music/' + daSong + "_Inst" + TitleState.soundExt, 0.6); - // WONT WORK FOR TUTORIAL! REDO LATER + // WONT WORK FOR TUTORIAL OR TEST SONG!!! REDO LATER vocals = new FlxSound().loadEmbedded("assets/music/" + daSong + "_Voices" + TitleState.soundExt); FlxG.sound.list.add(vocals); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 95dcd494b..424a7d581 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -70,7 +70,7 @@ class FreeplayState extends MusicBeatState { songs.push('Cocoa'); songs.push('Eggnog'); - // songs.push('Milf'); + songs.push('Winter-Horrorland'); } // LOAD MUSIC diff --git a/source/PlayState.hx b/source/PlayState.hx index f5f4f506b..775d2c15a 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -93,6 +93,9 @@ class PlayState extends MusicBeatState var grpLimoDancers:FlxTypedGroup; var fastCar:FlxSprite; + var upperBoppers:FlxSprite; + var bottomBoppers:FlxSprite; + var talking:Bool = true; var songScore:Int = 0; var scoreTxt:FlxText; @@ -247,6 +250,54 @@ class PlayState extends MusicBeatState fastCar = new FlxSprite(-300, 160).loadGraphic('assets/images/limo/fastCarLol.png'); // add(limo); } + else if (SONG.song.toLowerCase() == 'cocoa' || SONG.song.toLowerCase() == 'eggnog') + { + curStage = 'mall'; + + var bg:FlxSprite = new FlxSprite(-1000, -400).loadGraphic('assets/images/christmas/bgWalls.png'); + bg.antialiasing = true; + bg.scrollFactor.set(0.2, 0.2); + bg.active = false; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); + + upperBoppers = new FlxSprite(-130, 40); + upperBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/upperBop.png', 'assets/images/christmas/upperBop.xml'); + upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false); + upperBoppers.antialiasing = true; + upperBoppers.scrollFactor.set(0.33, 0.33); + upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.7)); + upperBoppers.updateHitbox(); + add(upperBoppers); + + var bgEscalator:FlxSprite = new FlxSprite(-1000, -430).loadGraphic('assets/images/christmas/bgEscalator.png'); + bgEscalator.antialiasing = true; + bgEscalator.scrollFactor.set(0.3, 0.3); + bgEscalator.active = false; + bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.8)); + bgEscalator.updateHitbox(); + add(bgEscalator); + + var fgSnow:FlxSprite = new FlxSprite(-400, 700).loadGraphic('assets/images/christmas/fgSnow.png'); + fgSnow.active = false; + fgSnow.antialiasing = true; + add(fgSnow); + + var tree:FlxSprite = new FlxSprite(300, -250).loadGraphic('assets/images/christmas/christmasTree.png'); + tree.antialiasing = true; + tree.scrollFactor.set(0.85, 0.85); + add(tree); + + bottomBoppers = new FlxSprite(-280, 220); + bottomBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/bottomBop.png', 'assets/images/christmas/bottomBop.xml'); + bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false); + bottomBoppers.antialiasing = true; + bottomBoppers.scrollFactor.set(0.9, 0.9); + bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 0.9)); + bottomBoppers.updateHitbox(); + add(bottomBoppers); + } else { curStage = 'stage'; @@ -278,6 +329,14 @@ class PlayState extends MusicBeatState var gfVersion:String = 'gf'; + switch (curStage) + { + case 'limo': + gfVersion = 'gf-car'; + case 'mall': + gfVersion = 'gf-christmas'; + } + if (curStage == 'limo') gfVersion = 'gf-car'; @@ -315,6 +374,8 @@ class PlayState extends MusicBeatState case 'pico': camPos.x += 600; dad.y += 300; + case 'parents-christmas': + dad.x -= 500; } boyfriend = new Boyfriend(770, 450, SONG.player1); @@ -1302,8 +1363,17 @@ class PlayState extends MusicBeatState } } } - else + else if (possibleNotes[0].noteData == possibleNotes[1].noteData) + { noteCheck(controlArray[daNote.noteData], daNote); + } + else + { + for (coolNote in possibleNotes) + { + noteCheck(controlArray[coolNote.noteData], coolNote); + } + } } else // regular notes? { @@ -1700,6 +1770,10 @@ class PlayState extends MusicBeatState switch (curStage) { + case 'mall': + upperBoppers.animation.play('bop', true); + bottomBoppers.animation.play('bop', true); + case 'limo': grpLimoDancers.forEach(function(dancer:BackgroundDancer) { From d20573b76cffb076e1633d3e2b776469f0bbbc96 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 19 Jan 2021 21:44:09 -0500 Subject: [PATCH 50/86] more christmas stuff --- source/Character.hx | 31 ++++++++++++++++++++++++++++++- source/ChartingState.hx | 4 +--- source/HealthIcon.hx | 1 + source/PlayState.hx | 2 +- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index eb85b3438..f5dc9f1fe 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -271,6 +271,33 @@ class Character extends FlxSprite addOffset('deathConfirm', 37, 69); addOffset('scared', -4); + flipX = true; + + case 'bf-christmas': + var tex = FlxAtlasFrames.fromSparrow('assets/images/christmas/bfChristmas.png', 'assets/images/christmas/bfChristmas.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); + + 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); + flipX = true; case 'bf-car': var tex = FlxAtlasFrames.fromSparrow('assets/images/bfCar.png', 'assets/images/bfCar.xml'); @@ -345,7 +372,7 @@ class Character extends FlxSprite flipX = !flipX; // Doesn't flip for BF, since his are already in the right place??? - if (character != 'bf' && character != 'bf-car') + if (character != 'bf' && character != 'bf-car' && character != 'bf-christmas') { // var animArray var oldRight = animation.getByName('singRIGHT').frames; @@ -410,6 +437,8 @@ class Character extends FlxSprite playAnim('idle'); case 'bf': playAnim('idle'); + case 'bf-christmas': + playAnim('idle'); case 'bf-car': playAnim('idle'); case 'gf': diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 48b693298..75fc9e254 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -225,9 +225,7 @@ class ChartingState extends MusicBeatState stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; - var characters:Array = [ - "bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom', 'mom-car', 'bf-car', 'parents-christmas', 'monster-christmas' - ]; + var characters:Array = CoolUtil.coolTextFile('assets/data/characterList.txt'); for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) { diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index e519e6974..eb6db8a06 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -12,6 +12,7 @@ class HealthIcon extends FlxSprite antialiasing = true; animation.add('bf', [0, 1], 0, false, isPlayer); animation.add('bf-car', [0, 1], 0, false, isPlayer); + animation.add('bf-christmas', [0, 1], 0, false, isPlayer); animation.add('spooky', [2, 3], 0, false, isPlayer); animation.add('pico', [4, 5], 0, false, isPlayer); animation.add('mom', [6, 7], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index 775d2c15a..6808e45de 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -289,7 +289,7 @@ class PlayState extends MusicBeatState tree.scrollFactor.set(0.85, 0.85); add(tree); - bottomBoppers = new FlxSprite(-280, 220); + bottomBoppers = new FlxSprite(-300, 220); bottomBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/bottomBop.png', 'assets/images/christmas/bottomBop.xml'); bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false); bottomBoppers.antialiasing = true; From 7894b6e6f29f2d5cf91df0e8a9492004f0a5b2dc Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 19 Jan 2021 22:58:07 -0500 Subject: [PATCH 51/86] fix eggnog normal woops! --- source/PlayState.hx | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 6808e45de..21e9ef60c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -254,7 +254,9 @@ class PlayState extends MusicBeatState { curStage = 'mall'; - var bg:FlxSprite = new FlxSprite(-1000, -400).loadGraphic('assets/images/christmas/bgWalls.png'); + defaultCamZoom = 0.80; + + var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic('assets/images/christmas/bgWalls.png'); bg.antialiasing = true; bg.scrollFactor.set(0.2, 0.2); bg.active = false; @@ -262,41 +264,41 @@ class PlayState extends MusicBeatState bg.updateHitbox(); add(bg); - upperBoppers = new FlxSprite(-130, 40); + upperBoppers = new FlxSprite(-240, -90); upperBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/upperBop.png', 'assets/images/christmas/upperBop.xml'); upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false); upperBoppers.antialiasing = true; upperBoppers.scrollFactor.set(0.33, 0.33); - upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.7)); + upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); upperBoppers.updateHitbox(); add(upperBoppers); - var bgEscalator:FlxSprite = new FlxSprite(-1000, -430).loadGraphic('assets/images/christmas/bgEscalator.png'); + var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic('assets/images/christmas/bgEscalator.png'); bgEscalator.antialiasing = true; bgEscalator.scrollFactor.set(0.3, 0.3); bgEscalator.active = false; - bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.8)); + bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); bgEscalator.updateHitbox(); add(bgEscalator); - var fgSnow:FlxSprite = new FlxSprite(-400, 700).loadGraphic('assets/images/christmas/fgSnow.png'); - fgSnow.active = false; - fgSnow.antialiasing = true; - add(fgSnow); - - var tree:FlxSprite = new FlxSprite(300, -250).loadGraphic('assets/images/christmas/christmasTree.png'); + var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic('assets/images/christmas/christmasTree.png'); tree.antialiasing = true; - tree.scrollFactor.set(0.85, 0.85); + tree.scrollFactor.set(0.40, 0.40); add(tree); - bottomBoppers = new FlxSprite(-300, 220); + bottomBoppers = new FlxSprite(-300, 140); bottomBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/bottomBop.png', 'assets/images/christmas/bottomBop.xml'); bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false); bottomBoppers.antialiasing = true; bottomBoppers.scrollFactor.set(0.9, 0.9); - bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 0.9)); + bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1)); bottomBoppers.updateHitbox(); add(bottomBoppers); + + var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic('assets/images/christmas/fgSnow.png'); + fgSnow.active = false; + fgSnow.antialiasing = true; + add(fgSnow); } else { @@ -392,6 +394,10 @@ class PlayState extends MusicBeatState resetFastCar(); add(fastCar); } + case 'mall': + { + boyfriend.x += 200; + } } var doof:DialogueBox = new DialogueBox(false, dialogue); @@ -933,9 +939,12 @@ class PlayState extends MusicBeatState { camFollow.setPosition(boyfriend.getMidpoint().x - 100, boyfriend.getMidpoint().y - 100); - if (curStage == 'limo') + switch (curStage) { - camFollow.x = boyfriend.getMidpoint().x - 300; + case 'limo': + camFollow.x = boyfriend.getMidpoint().x - 300; + case 'mall': + camFollow.y = boyfriend.getMidpoint().y - 200; } if (SONG.song.toLowerCase() == 'tutorial') From 0c892f4b32921e1fe40a76917fbb5d0736222b1a Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 19 Jan 2021 23:29:18 -0500 Subject: [PATCH 52/86] santa lol --- source/PlayState.hx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/PlayState.hx b/source/PlayState.hx index 21e9ef60c..e56c7fc22 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -95,6 +95,7 @@ class PlayState extends MusicBeatState var upperBoppers:FlxSprite; var bottomBoppers:FlxSprite; + var santa:FlxSprite; var talking:Bool = true; var songScore:Int = 0; @@ -299,6 +300,12 @@ class PlayState extends MusicBeatState fgSnow.active = false; fgSnow.antialiasing = true; add(fgSnow); + + santa = new FlxSprite(-840, 150); + santa.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/santa.png', 'assets/images/christmas/santa.xml'); + santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false); + santa.antialiasing = true; + add(santa); } else { @@ -1782,6 +1789,7 @@ class PlayState extends MusicBeatState case 'mall': upperBoppers.animation.play('bop', true); bottomBoppers.animation.play('bop', true); + santa.animation.play('idle', true); case 'limo': grpLimoDancers.forEach(function(dancer:BackgroundDancer) From 96fcaea0ba3f07ff3a6ae682881a35cf5bf858be Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 01:38:39 -0500 Subject: [PATCH 53/86] monster christmas --- CHANGELOG.md | 1 + source/Character.hx | 33 ++++++++++++++++++--------------- source/HealthIcon.hx | 5 +++-- source/PlayState.hx | 31 +++++++++++++++++++++++++++---- 4 files changed, 49 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528f51949..2f6b353f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Old Verison popup screen weirdness ([Thanks to gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/155)) - Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) - Screen wipe being cut off in the limo/mom stage. Should fill the whole screen now. +- Boyfriend animations on hold notes, and pressing on repeating notes should behave differently ## [0.2.5] - 2020-12-27 ### Added diff --git a/source/Character.hx b/source/Character.hx index f5dc9f1fe..e0453d14d 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -183,7 +183,7 @@ class Character extends FlxSprite case 'monster': tex = FlxAtlasFrames.fromSparrow('assets/images/Monster_Assets.png', 'assets/images/Monster_Assets.xml'); frames = tex; - animation.addByPrefix('idle', 'monster idle', 24); + animation.addByPrefix('idle', 'monster idle', 24, false); animation.addByPrefix('singUP', 'monster up note', 24, false); animation.addByPrefix('singDOWN', 'monster down', 24, false); animation.addByPrefix('singLEFT', 'Monster left note', 24, false); @@ -195,6 +195,21 @@ class Character extends FlxSprite addOffset("singLEFT", -30); addOffset("singDOWN", -30, -40); playAnim('idle'); + case 'monster-christmas': + tex = FlxAtlasFrames.fromSparrow('assets/images/christmas/monsterChristmas.png', 'assets/images/christmas/monsterChristmas.xml'); + frames = tex; + animation.addByPrefix('idle', 'monster idle', 24, false); + animation.addByPrefix('singUP', 'monster up note', 24, false); + animation.addByPrefix('singDOWN', 'monster down', 24, false); + animation.addByPrefix('singLEFT', 'Monster left note', 24, false); + animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); + + addOffset('idle'); + addOffset("singUP", -20, 50); + addOffset("singRIGHT", -51); + addOffset("singLEFT", -30); + addOffset("singDOWN", -40, -94); + playAnim('idle'); case 'pico': tex = FlxAtlasFrames.fromSparrow('assets/images/Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); frames = tex; @@ -347,20 +362,6 @@ class Character extends FlxSprite addOffset("singRIGHT-alt", -1, -24); addOffset("singLEFT-alt", -30, 15); addOffset("singDOWN-alt", -30, -27); - case 'monster-christmas': - frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/Monster_Assets_Christmas.png', - 'assets/images/christmas/Monster_Assets_Christmas.xml'); - animation.addByPrefix('idle', 'monster idle', 24, false); - animation.addByPrefix('singUP', 'monster up note', 24, false); - animation.addByPrefix('singDOWN', 'monster down', 24, false); - animation.addByPrefix('singLEFT', 'Monster left note', 24, false); - animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); - - addOffset('idle'); - addOffset("singUP", -20, 50); - addOffset("singRIGHT", -51); - addOffset("singLEFT", -30); - addOffset("singDOWN", -30, -40); } antialiasing = true; @@ -487,6 +488,8 @@ class Character extends FlxSprite playAnim('idle'); case 'monster': playAnim('idle'); + case 'monster-christmas': + playAnim('idle'); case 'pico': playAnim('idle'); } diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index eb6db8a06..d11650c4d 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -22,8 +22,9 @@ class HealthIcon extends FlxSprite animation.add('dad', [12, 13], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); - animation.add('parents-christmas', [0, 1], 0, false, isPlayer); - animation.add('monster', [0], 0, false, isPlayer); + animation.add('parents-christmas', [17], 0, false, isPlayer); + animation.add('monster', [19, 20], 0, false, isPlayer); + animation.add('monster-christmas', [19, 20], 0, false, isPlayer); animation.play(char); scrollFactor.set(); } diff --git a/source/PlayState.hx b/source/PlayState.hx index e56c7fc22..06ae6998b 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -307,6 +307,25 @@ class PlayState extends MusicBeatState santa.antialiasing = true; add(santa); } + else if (SONG.song.toLowerCase() == 'winter-horrorland') + { + var bg:FlxSprite = new FlxSprite(-600, -400).loadGraphic('assets/images/christmas/evilBG.png'); + bg.antialiasing = true; + bg.scrollFactor.set(0.2, 0.2); + bg.active = false; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); + + var evilTree:FlxSprite = new FlxSprite(300, -500).loadGraphic('assets/images/christmas/evilTree.png'); + evilTree.antialiasing = true; + evilTree.scrollFactor.set(0.4, 0.4); + add(evilTree); + + var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic("assets/images/christmas/evilSnow.png"); + evilSnow.antialiasing = true; + add(evilSnow); + } else { curStage = 'stage'; @@ -378,6 +397,8 @@ class PlayState extends MusicBeatState dad.y += 200; case "monster": dad.y += 100; + case 'monster-christmas': + dad.y += 130; case 'dad': camPos.x += 400; case 'pico': @@ -1587,13 +1608,13 @@ class PlayState extends MusicBeatState switch (note.noteData) { case 2: - boyfriend.playAnim('singUP'); + boyfriend.playAnim('singUP', true); case 3: - boyfriend.playAnim('singRIGHT'); + boyfriend.playAnim('singRIGHT', true); case 1: - boyfriend.playAnim('singDOWN'); + boyfriend.playAnim('singDOWN', true); case 0: - boyfriend.playAnim('singLEFT'); + boyfriend.playAnim('singLEFT', true); } playerStrums.forEach(function(spr:FlxSprite) @@ -1772,7 +1793,9 @@ class PlayState extends MusicBeatState } if (!boyfriend.animation.curAnim.name.startsWith("sing")) + { boyfriend.playAnim('idle'); + } if (totalBeats % 8 == 7 && curSong == 'Bopeebo') { From 44d8c8309f79f7274390cd1207a66d7eed9c69ff Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 04:03:49 -0500 Subject: [PATCH 54/86] scripted thingie --- source/PlayState.hx | 78 ++++++++++++++++++++++++++++++++-------- source/StoryMenuState.hx | 2 +- 2 files changed, 64 insertions(+), 16 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 06ae6998b..a1d0aa8a3 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -309,7 +309,8 @@ class PlayState extends MusicBeatState } else if (SONG.song.toLowerCase() == 'winter-horrorland') { - var bg:FlxSprite = new FlxSprite(-600, -400).loadGraphic('assets/images/christmas/evilBG.png'); + curStage = 'mallEvil'; + var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic('assets/images/christmas/evilBG.png'); bg.antialiasing = true; bg.scrollFactor.set(0.2, 0.2); bg.active = false; @@ -317,9 +318,9 @@ class PlayState extends MusicBeatState bg.updateHitbox(); add(bg); - var evilTree:FlxSprite = new FlxSprite(300, -500).loadGraphic('assets/images/christmas/evilTree.png'); + var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic('assets/images/christmas/evilTree.png'); evilTree.antialiasing = true; - evilTree.scrollFactor.set(0.4, 0.4); + evilTree.scrollFactor.set(0.2, 0.2); add(evilTree); var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic("assets/images/christmas/evilSnow.png"); @@ -363,6 +364,8 @@ class PlayState extends MusicBeatState gfVersion = 'gf-car'; case 'mall': gfVersion = 'gf-christmas'; + case 'mallEvil': + gfVersion = 'gf-christmas'; } if (curStage == 'limo') @@ -444,8 +447,6 @@ class PlayState extends MusicBeatState playerStrums = new FlxTypedGroup(); - startingSong = true; - // startCountdown(); generateSong(SONG.song); @@ -490,15 +491,6 @@ class PlayState extends MusicBeatState iconP2.y = healthBar.y - (iconP2.height / 2); add(iconP2); - if (isStoryMode) - { - // TEMP for now, later get rid of startCountdown() - // add(doof); - startCountdown(); - } - else - startCountdown(); - strumLineNotes.cameras = [camHUD]; notes.cameras = [camHUD]; healthBar.cameras = [camHUD]; @@ -513,6 +505,46 @@ class PlayState extends MusicBeatState // UI_camera.zoom = 1; // cameras = [FlxG.cameras.list[1]]; + startingSong = true; + + if (isStoryMode) + { + switch (curSong.toLowerCase()) + { + case "winter-horrorland": + var blackScreen:FlxSprite = new FlxSprite(0, 0).makeGraphic(Std.int(FlxG.width * 2), Std.int(FlxG.height * 2), FlxColor.BLACK); + add(blackScreen); + blackScreen.scrollFactor.set(); + + new FlxTimer().start(1, function(tmr:FlxTimer) + { + remove(blackScreen); + FlxG.sound.play('assets/sounds/Lights_Turn_On' + TitleState.soundExt); + camFollow.y = -2050; + camFollow.x += 200; + FlxG.camera.focusOn(camFollow.getPosition()); + FlxG.camera.zoom = 1.5; + + new FlxTimer().start(0.8, function(tmr:FlxTimer) + { + remove(blackScreen); + FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, 2.5, { + ease: FlxEase.quadInOut, + onComplete: function(twn:FlxTween) + { + startCountdown(); + } + }); + }); + }); + default: + startCountdown(); + } + } + else + { + startCountdown(); + } #if lime trace("IT'S LIME"); @@ -1141,12 +1173,16 @@ class PlayState extends MusicBeatState } keyShit(); + + if (FlxG.keys.justPressed.ONE) + endSong(); } function endSong():Void { canPause = false; - FlxG.sound.music = new FlxSound(); + FlxG.sound.music.volume = 0; + vocals.volume = 0; if (SONG.validScore) { #if !switch @@ -1191,8 +1227,20 @@ class PlayState extends MusicBeatState trace('LOADING NEXT SONG'); trace(PlayState.storyPlaylist[0].toLowerCase() + difficulty); + if (SONG.song.toLowerCase() == 'eggnog') + { + var blackShit:FlxSprite = new FlxSprite(-FlxG.width * FlxG.camera.zoom, + -FlxG.height * FlxG.camera.zoom).makeGraphic(FlxG.width * 3, FlxG.height * 3, FlxColor.BLACK); + blackShit.scrollFactor.set(); + add(blackShit); + camHUD.visible = false; + + FlxG.sound.play('assets/sounds/Lights_Shut_off' + TitleState.soundExt); + } + PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]); FlxG.sound.music.stop(); + FlxG.switchState(new PlayState()); } } diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index ad6aefa8b..419a8fc2d 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -19,7 +19,7 @@ class StoryMenuState extends MusicBeatState var scoreText:FlxText; var weekData:Array = [ - ['Tutorial'], + ['Cocoa', 'Eggnog', 'Winter-Horrorland'], ['Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South'], ['Pico', 'Philly', "Blammed"], From 55b5f56624e19a3ff3379dbab570b8b16a81c782 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 04:11:55 -0500 Subject: [PATCH 55/86] scripted type beat --- source/TitleState.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/TitleState.hx b/source/TitleState.hx index 73bbb7534..3da97be7a 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -106,9 +106,9 @@ class TitleState extends MusicBeatState diamond.destroyOnNoUse = false; FlxTransitionableState.defaultTransIn = new TransitionData(FADE, FlxColor.BLACK, 1, new FlxPoint(0, -1), {asset: diamond, width: 32, height: 32}, - new FlxRect(-200, 0, FlxG.width * 1.4, FlxG.height)); + new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4)); FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 0.7, new FlxPoint(0, 1), - {asset: diamond, width: 32, height: 32}, new FlxRect(-200, 0, FlxG.width * 1.4, FlxG.height)); + {asset: diamond, width: 32, height: 32}, new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4)); transIn = FlxTransitionableState.defaultTransIn; transOut = FlxTransitionableState.defaultTransOut; From a92739402c97d12964fb6b7126f468d311619493 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 05:31:43 -0500 Subject: [PATCH 56/86] CHRISTMAS UPDATE --- CHANGELOG.md | 3 ++- Project.xml | 2 +- source/MenuCharacter.hx | 2 ++ source/MenuItem.hx | 1 + source/PlayState.hx | 28 ++++++++++++++++------------ source/StoryMenuState.hx | 10 ++++++---- 6 files changed, 28 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f6b353f2..b0381fd36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ 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.6] - 2021-01-20 ### Added +- 3 NEW CHRISTMAS SONGS. 2 BY KAWAISPRITE, 1 BY BASSETFILMS!!!!! BF WITH DRIP! SANTA HANGIN OUT! - Enemy icons change when they you are winning a lot ([Thanks to pahaze for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/138)) - Holding CTRL in charting editor places notes on both sides - Q and E changes sustain lengths in note editor diff --git a/Project.xml b/Project.xml index f621d06ba..94233103a 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index a621409a0..f40d8d412 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -23,6 +23,8 @@ class MenuCharacter extends FlxSprite animation.addByPrefix('spooky', "spooky dance idle BLACK LINES", 24); animation.addByPrefix('pico', "Pico Idle Dance", 24); animation.addByPrefix('mom', "Mom Idle BLACK LINES", 24); + animation.addByPrefix('parents-christmas', "Parent Christmas Idle", 24); + // Parent Christmas Idle animation.play(character); updateHitbox(); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index e35e26a1f..1429303ff 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -24,6 +24,7 @@ class MenuItem extends FlxSpriteGroup week.animation.addByPrefix('week2', "week2 select", 24); week.animation.addByPrefix('week3', "Week 3 press", 24); week.animation.addByPrefix('week4', "Week 4 press", 24); + week.animation.addByPrefix('week5', "week 5", 24); add(week); week.animation.play('week' + weekNum); diff --git a/source/PlayState.hx b/source/PlayState.hx index a1d0aa8a3..d849157e5 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -329,6 +329,7 @@ class PlayState extends MusicBeatState } else { + defaultCamZoom = 0.9; curStage = 'stage'; var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic('assets/images/stageback.png'); // bg.setGraphicSize(Std.int(bg.width * 2.5)); @@ -418,17 +419,18 @@ class PlayState extends MusicBeatState switch (curStage) { case 'limo': - { - boyfriend.y -= 220; - boyfriend.x += 260; + boyfriend.y -= 220; + boyfriend.x += 260; + + resetFastCar(); + add(fastCar); - resetFastCar(); - add(fastCar); - } case 'mall': - { - boyfriend.x += 200; - } + boyfriend.x += 200; + + case 'mallEvil': + boyfriend.x += 320; + dad.y -= 80; } var doof:DialogueBox = new DialogueBox(false, dialogue); @@ -515,8 +517,9 @@ class PlayState extends MusicBeatState var blackScreen:FlxSprite = new FlxSprite(0, 0).makeGraphic(Std.int(FlxG.width * 2), Std.int(FlxG.height * 2), FlxColor.BLACK); add(blackScreen); blackScreen.scrollFactor.set(); + camHUD.visible = false; - new FlxTimer().start(1, function(tmr:FlxTimer) + new FlxTimer().start(0.1, function(tmr:FlxTimer) { remove(blackScreen); FlxG.sound.play('assets/sounds/Lights_Turn_On' + TitleState.soundExt); @@ -527,6 +530,7 @@ class PlayState extends MusicBeatState new FlxTimer().start(0.8, function(tmr:FlxTimer) { + camHUD.visible = true; remove(blackScreen); FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, 2.5, { ease: FlxEase.quadInOut, @@ -1174,8 +1178,8 @@ class PlayState extends MusicBeatState keyShit(); - if (FlxG.keys.justPressed.ONE) - endSong(); + // if (FlxG.keys.justPressed.ONE) + // endSong(); } function endSong():Void diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 419a8fc2d..eb902ada4 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -19,22 +19,24 @@ class StoryMenuState extends MusicBeatState var scoreText:FlxText; var weekData:Array = [ - ['Cocoa', 'Eggnog', 'Winter-Horrorland'], + ['Tutorial'], ['Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South'], ['Pico', 'Philly', "Blammed"], - ['Satin-Panties', "High", "Milf"] + ['Satin-Panties', "High", "Milf"], + ['Cocoa', 'Eggnog', 'Winter-Horrorland'] ]; var curDifficulty:Int = 1; - public static var weekUnlocked:Array = [true, true, true, true, true]; + public static var weekUnlocked:Array = [true, true, true, true, true, true]; var weekCharacters:Array = [ ['dad', 'bf', 'gf'], ['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf'], ['pico', 'bf', 'gf'], - ['mom', 'bf', 'gf'] + ['mom', 'bf', 'gf'], + ['parents-christmas', 'bf', 'gf'] ]; var curWeek:Int = 0; From f1d9c06882e24ef36cb23ccb54d42dcd666c280b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 06:14:38 -0500 Subject: [PATCH 57/86] menu fix maybe oops --- source/StoryMenuState.hx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index eb902ada4..242cb1472 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -135,6 +135,10 @@ class StoryMenuState extends MusicBeatState weekCharacterThing.y += 170; weekCharacterThing.flipX = true; weekCharacterThing.x -= 40; + case 'parents-christmas': + weekCharacterThing.x -= 600; + weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.9)); + weekCharacterThing.updateHitbox(); } grpWeekCharacters.add(weekCharacterThing); @@ -368,6 +372,14 @@ class StoryMenuState extends MusicBeatState grpWeekCharacters.members[2].animation.play(weekCharacters[curWeek][2]); txtTracklist.text = "Tracks\n"; + switch (grpWeekCharacters.members[0].animation.curAnim.name) + { + case 'parents-christmas': + grpWeekCharacters.members[0].offset.x = 400; + default: + grpWeekCharacters.members[0].offset.x = 100; + } + var stringThing:Array = weekData[curWeek]; for (i in stringThing) From 3382e4e97443aa48d4fe16c650beb1a571623525 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 06:53:20 -0500 Subject: [PATCH 58/86] mod guide in progress --- Modding.md | 10 ++++++++++ source/StoryMenuState.hx | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Modding.md diff --git a/Modding.md b/Modding.md new file mode 100644 index 000000000..aed0e778a --- /dev/null +++ b/Modding.md @@ -0,0 +1,10 @@ +# QUICK AND DIRTY MOD GUIDE + +With the 0.2.6 update, I added a bit of a slightly nicer mod support backend. + +It's POLYMOD, which is made by Lars Doucet: https://github.com/larsiusprime/polymod + +You may have noticed that there's a new folder in the assets. MODS. Within it you will see 2 files. modList.txt, and a folder called introMod. +modList.txt will load any folder into the game. Put the folder you want to load into a new line in modList.txt, and reboot the game. + +Now you may be wondering, what do I put in the folder? Well later down it'll get a bit more complicated, especially as I'll make the IN-GAME mod loader nicer. \ No newline at end of file diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 242cb1472..3331a54c5 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -375,9 +375,13 @@ class StoryMenuState extends MusicBeatState switch (grpWeekCharacters.members[0].animation.curAnim.name) { case 'parents-christmas': - grpWeekCharacters.members[0].offset.x = 400; + grpWeekCharacters.members[0].offset.x = 250; + grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 0.97)); + default: grpWeekCharacters.members[0].offset.x = 100; + grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 1)); + // grpWeekCharacters.members[0].updateHitbox(); } var stringThing:Array = weekData[curWeek]; From 589378b6bc9415d90445d10fa65c25918c3c4d1c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 20 Jan 2021 07:19:48 -0500 Subject: [PATCH 59/86] woops! --- Modding.md | 3 +++ source/ChartingState.hx | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Modding.md b/Modding.md index aed0e778a..4b52fd8c5 100644 --- a/Modding.md +++ b/Modding.md @@ -1,3 +1,6 @@ +# RIGHT NOW THE MODS FOLDER DOES NOT WORK ENTIRELY JUST YET!!! +## THIS IS WORK IN PROGRESS!!! + # QUICK AND DIRTY MOD GUIDE With the 0.2.6 update, I added a bit of a slightly nicer mod support backend. diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 75fc9e254..63e19ab69 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -664,10 +664,13 @@ class ChartingState extends MusicBeatState function changeNoteSustain(value:Float):Void { - if (curSelectedNote[2] != null) + if (curSelectedNote != null) { - curSelectedNote[2] += value; - curSelectedNote[2] = Math.max(curSelectedNote[2], 0); + if (curSelectedNote[2] != null) + { + curSelectedNote[2] += value; + curSelectedNote[2] = Math.max(curSelectedNote[2], 0); + } } updateNoteUI(); @@ -796,7 +799,8 @@ class ChartingState extends MusicBeatState function updateNoteUI():Void { - stepperSusLength.value = curSelectedNote[2]; + if (curSelectedNote != null) + stepperSusLength.value = curSelectedNote[2]; } function updateGrid():Void From ac9eebe8ad96bbd6c77ccf085205e4cfe01baa4a Mon Sep 17 00:00:00 2001 From: Scott-GH Date: Wed, 20 Jan 2021 15:51:42 -0800 Subject: [PATCH 60/86] Fixed issue with boyfriend resetting animating too early --- source/Character.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Character.hx b/source/Character.hx index e0453d14d..88c6e9515 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -393,7 +393,7 @@ class Character extends FlxSprite override function update(elapsed:Float) { - if (curCharacter != 'bf') + if (curCharacter != 'bf' && curCharacter != 'bf-christmas' && curCharacter != 'bf-car') { if (animation.curAnim.name.startsWith('sing')) { From 0a0fa93d26883505c6c1cbf7517f042b70a5227f Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 22 Jan 2021 01:50:12 -0500 Subject: [PATCH 61/86] weed --- CHANGELOG.md | 4 ++++ source/Character.hx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0381fd36..582ca8db4 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 +- Idle animation bug with BF christmas and BF hair blow sprites ([Thanks to Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/237)) + ## [0.2.6] - 2021-01-20 ### Added - 3 NEW CHRISTMAS SONGS. 2 BY KAWAISPRITE, 1 BY BASSETFILMS!!!!! BF WITH DRIP! SANTA HANGIN OUT! diff --git a/source/Character.hx b/source/Character.hx index e0453d14d..85aa08bca 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -393,7 +393,7 @@ class Character extends FlxSprite override function update(elapsed:Float) { - if (curCharacter != 'bf') + if (!curCharacter.startsWith('bf')) { if (animation.curAnim.name.startsWith('sing')) { From 623b2aa0cd5a6e763f9629f483088011f0c7eb74 Mon Sep 17 00:00:00 2001 From: regulad <52430642+regulad@users.noreply.github.com> Date: Sat, 23 Jan 2021 15:39:04 -0500 Subject: [PATCH 62/86] Basic PR/Issue templates Closes #243 --- .github/ISSUE_TEMPLATE/bug.md | 30 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/enhancement.md | 10 +++++++ .github/ISSUE_TEMPLATE/question.md | 10 +++++++ .github/PULL_REQUEST_TEMPLATE/bug.md | 12 ++++++++ .github/PULL_REQUEST_TEMPLATE/enhancement.md | 12 ++++++++ 5 files changed, 74 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/enhancement.md create mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/bug.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/enhancement.md diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 000000000..c09cee277 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,30 @@ +--- +name: Bug Report +about: Report a bug or critical performance issue +title: 'Bug Report: ' +labels: bug +--- + +# Please check for duplicates or similar issues, as well performing simple troubleshooting steps (such as clearing cookies, clearing AppData, trying another browser) before submitting an issue. + +## Where are you playing the game? + +### Web +- [ ] [Newgrounds](https://www.newgrounds.com/portal/view/770371) +- [ ] [Itch.io](https://ninja-muffin24.itch.io/funkin) + +#### If you are using a web build, what browser are you using? +- [ ] Chrome, or a Chromium based broswer (Edge, Opera, etc.) +- [ ] Firefox, or a Gecko based broswer +- [ ] Safari +- [ ] Other, please specify: + +### Local +- [ ] Windows x86 +- [ ] Windows x86_64 +- [ ] Linux +- [ ] macOS + +## Have you identified any steps to reproduce the bug? If so, please describe them below. Use images if possible. + +## Please describe your issue. Provide extensive detail and images if possibe. diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 000000000..c86b1a39a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,10 @@ +--- +name: Enhancement +about: Suggest a new feature +title: 'Enhancement: ' +labels: enhancement +--- + +# Please check for duplicates or similar issues before creating this issue. + +## What is your suggestion, and why should it be implemented? diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 000000000..15f86824b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,10 @@ +--- +name: Question +about: Ask a general question +title: 'Question: ' +labels: question +--- + +# Please check for duplicates or similar issues before asking your question. + +## What is your question? diff --git a/.github/PULL_REQUEST_TEMPLATE/bug.md b/.github/PULL_REQUEST_TEMPLATE/bug.md new file mode 100644 index 000000000..70d795633 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/bug.md @@ -0,0 +1,12 @@ +--- +name: Bug Fix +about: Fix a bug or critical performance issue +title: 'Bug Fix: ' +labels: bug +--- + +# Please check for duplicates or similar PRs before creating this issue. + +## Does this PR close any issue(s)? If so, link them below. + +## Breifly describe the issue(s) fixed. diff --git a/.github/PULL_REQUEST_TEMPLATE/enhancement.md b/.github/PULL_REQUEST_TEMPLATE/enhancement.md new file mode 100644 index 000000000..6af15f1b6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/enhancement.md @@ -0,0 +1,12 @@ +--- +name: Enhancement +about: Add a new feature +title: 'Enhancement: ' +labels: enhancement +--- + +# Please check for duplicates or similar PRs before creating this issue. + +## Does this PR close any issue(s)? If so, link them below. + +## What do your change(s) add, and why should they be implemented? From 3dafb4f93975be3369a943fc45bb8982815c4471 Mon Sep 17 00:00:00 2001 From: regulad Date: Sat, 23 Jan 2021 15:42:24 -0500 Subject: [PATCH 63/86] Forgot this! --- .github/ISSUE_TEMPLATE/bug.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index c09cee277..9eb93945f 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -25,6 +25,8 @@ labels: bug - [ ] Linux - [ ] macOS +## What version of the game are you using? Look in the bottom left corner of the main menu. + ## Have you identified any steps to reproduce the bug? If so, please describe them below. Use images if possible. ## Please describe your issue. Provide extensive detail and images if possibe. From 19f77fec9754f2367fdfbdeb8fc9fdc2a8c64096 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 24 Jan 2021 22:42:51 -0500 Subject: [PATCH 64/86] so much win --- Project.xml | 3 +- .../introMod/_append/data/introText.txt | 1 + example_mods/modList.txt | 1 + example_mods/readme.txt | 2 + source/Character.hx | 55 +++++++++++-------- source/ChartingState.hx | 7 +-- source/FreeplayState.hx | 7 +++ source/HealthIcon.hx | 1 + source/PlayState.hx | 28 ++++++++++ source/TitleState.hx | 8 ++- 10 files changed, 82 insertions(+), 31 deletions(-) create mode 100644 example_mods/introMod/_append/data/introText.txt create mode 100644 example_mods/modList.txt create mode 100644 example_mods/readme.txt diff --git a/Project.xml b/Project.xml index 94233103a..3dfcb6b99 100644 --- a/Project.xml +++ b/Project.xml @@ -42,7 +42,8 @@ - + + diff --git a/example_mods/introMod/_append/data/introText.txt b/example_mods/introMod/_append/data/introText.txt new file mode 100644 index 000000000..45e0c08ab --- /dev/null +++ b/example_mods/introMod/_append/data/introText.txt @@ -0,0 +1 @@ +swagshit--moneymoney \ No newline at end of file diff --git a/example_mods/modList.txt b/example_mods/modList.txt new file mode 100644 index 000000000..3e2492595 --- /dev/null +++ b/example_mods/modList.txt @@ -0,0 +1 @@ +introMod \ No newline at end of file diff --git a/example_mods/readme.txt b/example_mods/readme.txt new file mode 100644 index 000000000..f8d8f6e7e --- /dev/null +++ b/example_mods/readme.txt @@ -0,0 +1,2 @@ +THIS MOD FOLDER DOES NOT ENTIRELY WORK JUST YET!!! +DONT EXPECT MUCH OUT OF IT RIGHT NOW!!! \ No newline at end of file diff --git a/source/Character.hx b/source/Character.hx index 85aa08bca..eb3d09299 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -337,6 +337,37 @@ class Character extends FlxSprite addOffset("singLEFTmiss", 12, 24); addOffset("singDOWNmiss", -11, -19); + flipX = true; + case 'bf-pixel': + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/bfPixel.png', 'assets/images/weeb/bfPixel.xml'); + animation.addByPrefix('idle', 'BF IDLE', 24, false); + animation.addByPrefix('singUP', 'BF UP NOTE', 24, false); + animation.addByPrefix('singLEFT', 'BF LEFT NOTE', 24, false); + animation.addByPrefix('singRIGHT', 'BF RIGHT NOTE', 24, false); + animation.addByPrefix('singDOWN', 'BF DOWN NOTE', 24, false); + animation.addByPrefix('singUPmiss', 'BF UP MISS', 24, false); + animation.addByPrefix('singLEFTmiss', 'BF LEFT MISS', 24, false); + animation.addByPrefix('singRIGHTmiss', 'BF RIGHT MISS', 24, false); + animation.addByPrefix('singDOWNmiss', 'BF DOWN MISS', 24, false); + + addOffset('idle'); + addOffset("singUP"); + addOffset("singRIGHT"); + addOffset("singLEFT"); + addOffset("singDOWN"); + addOffset("singUPmiss"); + addOffset("singRIGHTmiss"); + addOffset("singLEFTmiss"); + addOffset("singDOWNmiss"); + + setGraphicSize(Std.int(width * 6)); + updateHitbox(); + + width -= 100; + height -= 100; + + antialiasing = false; + flipX = true; case 'parents-christmas': frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/mom_dad_christmas_assets.png', @@ -364,8 +395,6 @@ class Character extends FlxSprite addOffset("singDOWN-alt", -30, -27); } - antialiasing = true; - playAnim('singUP'); if (isPlayer) @@ -373,7 +402,7 @@ class Character extends FlxSprite flipX = !flipX; // Doesn't flip for BF, since his are already in the right place??? - if (character != 'bf' && character != 'bf-car' && character != 'bf-christmas') + if (!curCharacter.startsWith('bf')) { // var animArray var oldRight = animation.getByName('singRIGHT').frames; @@ -432,16 +461,6 @@ class Character extends FlxSprite { switch (curCharacter) { - case 'mom': - playAnim('idle'); - case 'mom-car': - playAnim('idle'); - case 'bf': - playAnim('idle'); - case 'bf-christmas': - playAnim('idle'); - case 'bf-car': - playAnim('idle'); case 'gf': if (!animation.curAnim.name.startsWith('hair')) { @@ -482,15 +501,7 @@ class Character extends FlxSprite playAnim('danceRight'); else playAnim('danceLeft'); - case 'dad': - playAnim('idle'); - case 'parents-christmas': - playAnim('idle'); - case 'monster': - playAnim('idle'); - case 'monster-christmas': - playAnim('idle'); - case 'pico': + default: playAnim('idle'); } } diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 63e19ab69..4ed3dd909 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -221,17 +221,12 @@ class ChartingState extends MusicBeatState stepperSpeed.value = _song.speed; stepperSpeed.name = 'song_speed'; - var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 1, 1, 1, 250, 0); + var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 1, 1, 1, 339, 0); stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; var characters:Array = CoolUtil.coolTextFile('assets/data/characterList.txt'); - for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) - { - characters.push(i); - } - var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { _song.player1 = characters[Std.parseInt(character)]; diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 424a7d581..b44ef6d6f 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -73,6 +73,13 @@ class FreeplayState extends MusicBeatState songs.push('Winter-Horrorland'); } + if (StoryMenuState.weekUnlocked[6] || isDebug) + { + songs.push('Senpai'); + songs.push('Thorns'); + // songs.push('Winter-Horrorland'); + } + // LOAD MUSIC // LOAD CHARACTERS diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index d11650c4d..87d9cac2a 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -13,6 +13,7 @@ class HealthIcon extends FlxSprite animation.add('bf', [0, 1], 0, false, isPlayer); animation.add('bf-car', [0, 1], 0, false, isPlayer); animation.add('bf-christmas', [0, 1], 0, false, isPlayer); + animation.add('bf-pixel', [0, 1], 0, false, isPlayer); animation.add('spooky', [2, 3], 0, false, isPlayer); animation.add('pico', [4, 5], 0, false, isPlayer); animation.add('mom', [6, 7], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index d849157e5..64c4c6375 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -327,6 +327,31 @@ class PlayState extends MusicBeatState evilSnow.antialiasing = true; add(evilSnow); } + else if (SONG.song.toLowerCase() == 'senpai') + { + curStage = 'school'; + + var bgSky = new FlxSprite().loadGraphic('assets/images/weeb/weebSky.png'); + bgSky.scrollFactor.set(0.1, 0.1); + add(bgSky); + + var bgSchool:FlxSprite = new FlxSprite(-200).loadGraphic('assets/images/weeb/weebSchool.png'); + bgSchool.scrollFactor.set(0.6, 0.6); + add(bgSchool); + + var bgStreet:FlxSprite = new FlxSprite(-200).loadGraphic('assets/images/weeb/weebStreet.png'); + add(bgStreet); + + var widShit = Std.int(bgSky.width * 6); + + bgSky.setGraphicSize(widShit); + bgSchool.setGraphicSize(widShit); + bgStreet.setGraphicSize(widShit); + + bgSky.updateHitbox(); + bgSchool.updateHitbox(); + bgStreet.updateHitbox(); + } else { defaultCamZoom = 0.9; @@ -431,6 +456,9 @@ class PlayState extends MusicBeatState case 'mallEvil': boyfriend.x += 320; dad.y -= 80; + case 'school': + boyfriend.x += 100; + boyfriend.y += 100; } var doof:DialogueBox = new DialogueBox(false, dialogue); diff --git a/source/TitleState.hx b/source/TitleState.hx index 3da97be7a..cbdb2a005 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -22,7 +22,7 @@ import flixel.util.FlxColor; import flixel.util.FlxTimer; import io.newgrounds.NG; import lime.app.Application; -import lime.utils.Assets; +import openfl.Assets; import polymod.Polymod; using StringTools; @@ -44,7 +44,7 @@ class TitleState extends MusicBeatState override public function create():Void { - Polymod.init({modRoot: "assets/mods", dirs: CoolUtil.coolTextFile('assets/mods/modList.txt')}); + Polymod.init({modRoot: "mods", dirs: ['introMod']}); #if (!web) TitleState.soundExt = '.ogg'; @@ -398,6 +398,10 @@ class TitleState extends MusicBeatState FlxG.camera.flash(FlxColor.WHITE, 4); remove(credGroup); skippedIntro = true; + + var image = Assets.getBitmapData('assets/images/alphabet.png'); + var money = new FlxSprite(0, 0, image); + add(money); } } } From 97787932882e9216134621e5fa60a0d47fc8cbba Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 25 Jan 2021 04:18:44 -0500 Subject: [PATCH 65/86] buncho dumbshti lol!!! --- source/Character.hx | 26 ++++++ source/Note.hx | 70 +++++++++++---- source/PlayState.hx | 201 +++++++++++++++++++++++++++++++++----------- 3 files changed, 231 insertions(+), 66 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index eb3d09299..2a95a869a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -105,6 +105,22 @@ class Character extends FlxSprite playAnim('danceRight'); + case 'gf-pixel': + tex = FlxAtlasFrames.fromSparrow('assets/images/weeb/gfPixel.png', 'assets/images/weeb/gfPixel.xml'); + frames = tex; + animation.addByIndices('singUP', 'GF IDLE', [2], "", 24, false); + animation.addByIndices('danceLeft', 'GF IDLE', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); + animation.addByIndices('danceRight', 'GF IDLE', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); + + addOffset('danceLeft', 0); + addOffset('danceRight', 0); + + playAnim('danceRight'); + + setGraphicSize(Std.int(width * PlayState.daPixelZoom)); + updateHitbox(); + antialiasing = false; + case 'dad': // DAD ANIMATION LOADING CODE tex = FlxAtlasFrames.fromSparrow('assets/images/DADDY_DEAREST.png', 'assets/images/DADDY_DEAREST.xml'); @@ -493,6 +509,16 @@ class Character extends FlxSprite else playAnim('danceLeft'); } + case 'gf-pixel': + if (!animation.curAnim.name.startsWith('hair')) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } case 'spooky': danced = !danced; diff --git a/source/Note.hx b/source/Note.hx index adbe6d984..ca57a64f2 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -2,7 +2,9 @@ package; import flixel.FlxSprite; import flixel.graphics.frames.FlxAtlasFrames; +import flixel.math.FlxMath; import flixel.util.FlxColor; +import polymod.format.ParseRules.TargetSignatureElement; class Note extends FlxSprite { @@ -43,26 +45,58 @@ class Note extends FlxSprite this.noteData = noteData; - var tex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); - frames = tex; - animation.addByPrefix('greenScroll', 'green0'); - animation.addByPrefix('redScroll', 'red0'); - animation.addByPrefix('blueScroll', 'blue0'); - animation.addByPrefix('purpleScroll', 'purple0'); + var daStage:String = PlayState.curStage; - animation.addByPrefix('purpleholdend', 'pruple end hold'); - animation.addByPrefix('greenholdend', 'green hold end'); - animation.addByPrefix('redholdend', 'red hold end'); - animation.addByPrefix('blueholdend', 'blue hold end'); + switch (daStage) + { + case 'school': + loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17); - animation.addByPrefix('purplehold', 'purple hold piece'); - animation.addByPrefix('greenhold', 'green hold piece'); - animation.addByPrefix('redhold', 'red hold piece'); - animation.addByPrefix('bluehold', 'blue hold piece'); + animation.add('greenScroll', [6]); + animation.add('redScroll', [7]); + animation.add('blueScroll', [5]); + animation.add('purpleScroll', [4]); - setGraphicSize(Std.int(width * 0.7)); - updateHitbox(); - antialiasing = true; + if (isSustainNote) + { + loadGraphic('assets/images/weeb/pixelUI/arrowEnds.png', 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(); + + default: + frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); + + animation.addByPrefix('greenScroll', 'green0'); + animation.addByPrefix('redScroll', 'red0'); + animation.addByPrefix('blueScroll', 'blue0'); + animation.addByPrefix('purpleScroll', 'purple0'); + + animation.addByPrefix('purpleholdend', 'pruple end hold'); + animation.addByPrefix('greenholdend', 'green hold end'); + animation.addByPrefix('redholdend', 'red hold end'); + animation.addByPrefix('blueholdend', 'blue hold end'); + + animation.addByPrefix('purplehold', 'purple hold piece'); + animation.addByPrefix('greenhold', 'green hold piece'); + animation.addByPrefix('redhold', 'red hold piece'); + animation.addByPrefix('bluehold', 'blue hold piece'); + + setGraphicSize(Std.int(width * 0.7)); + updateHitbox(); + antialiasing = true; + } switch (noteData) { @@ -120,7 +154,7 @@ class Note extends FlxSprite } prevNote.offset.y = -19; - prevNote.scale.y *= (2.25 * PlayState.SONG.speed); + prevNote.scale.y *= (2.25 * FlxMath.roundDecimal(PlayState.SONG.speed, 1)); // prevNote.setGraphicSize(); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index 64c4c6375..be71c95a7 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -36,7 +36,6 @@ 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; @@ -97,6 +96,8 @@ class PlayState extends MusicBeatState var bottomBoppers:FlxSprite; var santa:FlxSprite; + var bgGirls:FlxSprite; + var talking:Bool = true; var songScore:Int = 0; var scoreTxt:FlxText; @@ -105,6 +106,9 @@ class PlayState extends MusicBeatState var defaultCamZoom:Float = 1.05; + // how big to stretch the pixel art assets + public static var daPixelZoom:Float = 6; + override public function create() { // var gameCam:FlxCamera = FlxG.camera; @@ -121,7 +125,7 @@ class PlayState extends MusicBeatState persistentDraw = true; if (SONG == null) - SONG = Song.loadFromJson(curLevel); + SONG = Song.loadFromJson('tutorial'); Conductor.changeBPM(SONG.bpm); @@ -340,6 +344,7 @@ class PlayState extends MusicBeatState add(bgSchool); var bgStreet:FlxSprite = new FlxSprite(-200).loadGraphic('assets/images/weeb/weebStreet.png'); + bgStreet.scrollFactor.set(0.95, 0.95); add(bgStreet); var widShit = Std.int(bgSky.width * 6); @@ -392,6 +397,8 @@ class PlayState extends MusicBeatState gfVersion = 'gf-christmas'; case 'mallEvil': gfVersion = 'gf-christmas'; + case 'school': + gfVersion = 'gf-pixel'; } if (curStage == 'limo') @@ -399,7 +406,6 @@ class PlayState extends MusicBeatState gf = new Character(400, 130, gfVersion); gf.scrollFactor.set(0.95, 0.95); - gf.antialiasing = true; add(gf); // Shitty layering but whatev it works LOL @@ -459,6 +465,8 @@ class PlayState extends MusicBeatState case 'school': boyfriend.x += 100; boyfriend.y += 100; + gf.x += 100; + gf.y += 200; } var doof:DialogueBox = new DialogueBox(false, dialogue); @@ -569,22 +577,49 @@ class PlayState extends MusicBeatState }); }); }); + case 'senpai': + schoolIntro(); default: startCountdown(); } } else { - startCountdown(); + switch (curSong.toLowerCase()) + { + case 'senpai': + schoolIntro(); + default: + startCountdown(); + } } - #if lime - trace("IT'S LIME"); - #end - super.create(); } + function schoolIntro():Void + { + var black:FlxSprite = new FlxSprite(-100, -100).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK); + black.scrollFactor.set(); + add(black); + + new FlxTimer().start(0.3, function(tmr:FlxTimer) + { + black.alpha -= 0.15; + if (!startedCountdown) + startCountdown(); + + if (black.alpha > 0) + { + tmr.reset(0.3); + } + else + { + remove(black); + } + }); + } + var startTimer:FlxTimer; var perfectMode:Bool = false; @@ -606,13 +641,35 @@ class PlayState extends MusicBeatState gf.dance(); boyfriend.playAnim('idle'); + var introAssets:Map> = new Map>(); + introAssets.set('default', ['ready.png', "set.png", "go.png"]); + introAssets.set('school', [ + 'weeb/pixelUI/ready-pixel.png', + 'weeb/pixelUI/set-pixel.png', + 'weeb/pixelUI/date-pixel.png' + ]); + + var introAlts:Array = introAssets.get('default'); + + for (value in introAssets.keys()) + { + if (value == curStage) + introAlts = introAssets.get(value); + } + switch (swagCounter) + { case 0: FlxG.sound.play('assets/sounds/intro3' + TitleState.soundExt, 0.6); case 1: - var ready:FlxSprite = new FlxSprite().loadGraphic('assets/images/ready.png'); + var ready:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[0]); ready.scrollFactor.set(); + ready.updateHitbox(); + + if (curStage == 'school') + ready.setGraphicSize(Std.int(ready.width * daPixelZoom)); + ready.screenCenter(); add(ready); FlxTween.tween(ready, {y: ready.y += 100, alpha: 0}, Conductor.crochet / 1000, { @@ -624,8 +681,12 @@ class PlayState extends MusicBeatState }); FlxG.sound.play('assets/sounds/intro2' + TitleState.soundExt, 0.6); case 2: - var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/set.png'); + var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[1]); set.scrollFactor.set(); + + if (curStage == 'school') + set.setGraphicSize(Std.int(set.width * daPixelZoom)); + set.screenCenter(); add(set); FlxTween.tween(set, {y: set.y += 100, alpha: 0}, Conductor.crochet / 1000, { @@ -637,8 +698,14 @@ class PlayState extends MusicBeatState }); FlxG.sound.play('assets/sounds/intro1' + TitleState.soundExt, 0.6); case 3: - var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/go.png'); + var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[2]); go.scrollFactor.set(); + + if (curStage == 'school') + go.setGraphicSize(Std.int(go.width * daPixelZoom)); + + go.updateHitbox(); + go.screenCenter(); add(go); FlxTween.tween(go, {y: go.y += 100, alpha: 0}, Conductor.crochet / 1000, { @@ -780,19 +847,83 @@ class PlayState extends MusicBeatState { for (i in 0...4) { - FlxG.log.add(i); + // FlxG.log.add(i); var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y); - var arrTex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); - babyArrow.frames = arrTex; - babyArrow.animation.addByPrefix('green', 'arrowUP'); - babyArrow.animation.addByPrefix('blue', 'arrowDOWN'); - babyArrow.animation.addByPrefix('purple', 'arrowLEFT'); - babyArrow.animation.addByPrefix('red', 'arrowRIGHT'); - babyArrow.scrollFactor.set(); - babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7)); + switch (curStage) + { + case 'school': + babyArrow.loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17); + babyArrow.animation.add('green', [6]); + babyArrow.animation.add('red', [7]); + babyArrow.animation.add('blue', [5]); + babyArrow.animation.add('purplel', [4]); + + babyArrow.setGraphicSize(Std.int(babyArrow.width * daPixelZoom)); + babyArrow.updateHitbox(); + babyArrow.antialiasing = false; + + switch (Math.abs(i)) + { + case 2: + babyArrow.x += Note.swagWidth * 2; + babyArrow.animation.add('static', [2]); + babyArrow.animation.add('pressed', [6, 10], 12, false); + babyArrow.animation.add('confirm', [14, 18], 12, false); + case 3: + babyArrow.x += Note.swagWidth * 3; + 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: + babyArrow.frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); + babyArrow.animation.addByPrefix('green', 'arrowUP'); + babyArrow.animation.addByPrefix('blue', 'arrowDOWN'); + babyArrow.animation.addByPrefix('purple', 'arrowLEFT'); + babyArrow.animation.addByPrefix('red', 'arrowRIGHT'); + + babyArrow.antialiasing = true; + babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7)); + + switch (Math.abs(i)) + { + case 2: + babyArrow.x += Note.swagWidth * 2; + babyArrow.animation.addByPrefix('static', 'arrowUP'); + babyArrow.animation.addByPrefix('pressed', 'up press', 24, false); + babyArrow.animation.addByPrefix('confirm', 'up confirm', 24, false); + case 3: + babyArrow.x += Note.swagWidth * 3; + 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); + } + } + babyArrow.updateHitbox(); - babyArrow.antialiasing = true; + babyArrow.scrollFactor.set(); babyArrow.y -= 10; babyArrow.alpha = 0; @@ -805,30 +936,6 @@ class PlayState extends MusicBeatState playerStrums.add(babyArrow); } - switch (Math.abs(i)) - { - case 2: - babyArrow.x += Note.swagWidth * 2; - babyArrow.animation.addByPrefix('static', 'arrowUP'); - babyArrow.animation.addByPrefix('pressed', 'up press', 24, false); - babyArrow.animation.addByPrefix('confirm', 'up confirm', 24, false); - case 3: - babyArrow.x += Note.swagWidth * 3; - 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); - } - babyArrow.animation.play('static'); babyArrow.x += 50; babyArrow.x += ((FlxG.width / 2) * player); @@ -1069,7 +1176,6 @@ class PlayState extends MusicBeatState gfSpeed = 1; case 163: // FlxG.sound.music.stop(); - // curLevel = 'Bopeebo'; // FlxG.switchState(new TitleState()); } } @@ -1081,7 +1187,6 @@ class PlayState extends MusicBeatState case 128, 129, 130: vocals.volume = 0; // FlxG.sound.music.stop(); - // curLevel = 'Fresh'; // FlxG.switchState(new PlayState()); } } @@ -1591,7 +1696,7 @@ class PlayState extends MusicBeatState spr.animation.play('static'); } - if (spr.animation.curAnim.name == 'confirm') + if (spr.animation.curAnim.name == 'confirm' && curStage != 'school') { spr.centerOffsets(); spr.offset.x -= 13; From 2233242f64db2edbe156f6ed719939c233f1a022 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 25 Jan 2021 05:04:31 -0500 Subject: [PATCH 66/86] weedeewfwdsfadf --- CHANGELOG.md | 2 + Project.xml | 2 +- source/BackgroundGirls.hx | 29 +++++++++++++ source/CoolUtil.hx | 10 +++++ source/PlayState.hx | 89 +++++++++++++++++++++++++++++++-------- 5 files changed, 114 insertions(+), 18 deletions(-) create mode 100644 source/BackgroundGirls.hx diff --git a/CHANGELOG.md b/CHANGELOG.md index 582ca8db4..d1f3b7224 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 +- Removed the default HaxeFlixel pause screen when the game window loses focus, can get screenshots of the game easier hehehe ### Fixed - Idle animation bug with BF christmas and BF hair blow sprites ([Thanks to Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/237)) diff --git a/Project.xml b/Project.xml index 3dfcb6b99..b5bf7197f 100644 --- a/Project.xml +++ b/Project.xml @@ -102,7 +102,7 @@ - + diff --git a/source/BackgroundGirls.hx b/source/BackgroundGirls.hx new file mode 100644 index 000000000..c15e88e10 --- /dev/null +++ b/source/BackgroundGirls.hx @@ -0,0 +1,29 @@ +package; + +import flixel.FlxSprite; +import flixel.graphics.frames.FlxAtlasFrames; + +class BackgroundGirls extends FlxSprite +{ + public function new(x:Float, y:Float) + { + super(x, y); + + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/bgFreaks.png', 'assets/images/weeb/bgFreaks.xml'); + animation.addByIndices('danceLeft', 'BG girls group', CoolUtil.numberArray(14), "", 24, false); + animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false); + animation.play('danceLeft'); + } + + var danceDir:Bool = false; + + public function dance():Void + { + danceDir = !danceDir; + + if (danceDir) + animation.play('danceRight', true); + else + animation.play('danceLeft', true); + } +} diff --git a/source/CoolUtil.hx b/source/CoolUtil.hx index 6c2755195..f49eeb071 100644 --- a/source/CoolUtil.hx +++ b/source/CoolUtil.hx @@ -17,4 +17,14 @@ class CoolUtil return daList; } + + public static function numberArray(max:Int, ?min = 0):Array + { + var dumbArray:Array = []; + for (i in min...max) + { + dumbArray.push(i); + } + return dumbArray; + } } diff --git a/source/PlayState.hx b/source/PlayState.hx index be71c95a7..e314fed55 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -96,7 +96,7 @@ class PlayState extends MusicBeatState var bottomBoppers:FlxSprite; var santa:FlxSprite; - var bgGirls:FlxSprite; + var bgGirls:BackgroundGirls; var talking:Bool = true; var songScore:Int = 0; @@ -335,27 +335,50 @@ class PlayState extends MusicBeatState { curStage = 'school'; + // defaultCamZoom = 0.9; + var bgSky = new FlxSprite().loadGraphic('assets/images/weeb/weebSky.png'); bgSky.scrollFactor.set(0.1, 0.1); add(bgSky); - var bgSchool:FlxSprite = new FlxSprite(-200).loadGraphic('assets/images/weeb/weebSchool.png'); + var repositionShit = -200; + + var bgSchool:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebSchool.png'); bgSchool.scrollFactor.set(0.6, 0.6); add(bgSchool); - var bgStreet:FlxSprite = new FlxSprite(-200).loadGraphic('assets/images/weeb/weebStreet.png'); + var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebStreet.png'); bgStreet.scrollFactor.set(0.95, 0.95); add(bgStreet); + var bgTrees:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebTreesBack.png'); + bgTrees.scrollFactor.set(0.85, 0.85); + add(bgTrees); + + var fgTrees:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebTrees.png'); + fgTrees.scrollFactor.set(0.9, 0.9); + add(fgTrees); + var widShit = Std.int(bgSky.width * 6); bgSky.setGraphicSize(widShit); bgSchool.setGraphicSize(widShit); bgStreet.setGraphicSize(widShit); + bgTrees.setGraphicSize(widShit); + fgTrees.setGraphicSize(widShit); + fgTrees.updateHitbox(); bgSky.updateHitbox(); bgSchool.updateHitbox(); bgStreet.updateHitbox(); + bgTrees.updateHitbox(); + + bgGirls = new BackgroundGirls(-100, 120); + bgGirls.scrollFactor.set(0.9, 0.9); + + bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); + bgGirls.updateHitbox(); + add(bgGirls); } else { @@ -463,8 +486,8 @@ class PlayState extends MusicBeatState boyfriend.x += 320; dad.y -= 80; case 'school': - boyfriend.x += 100; - boyfriend.y += 100; + boyfriend.x += 170; + boyfriend.y += 120; gf.x += 100; gf.y += 200; } @@ -1433,29 +1456,49 @@ class PlayState extends MusicBeatState else if (combo > 4) daRating = 'bad'; */ - rating.loadGraphic('assets/images/' + daRating + ".png"); + + var pixelShitPart1:String = ""; + var pixelShitPart2:String = ''; + + if (curStage == 'school') + { + pixelShitPart1 = 'weeb/pixelUI/'; + pixelShitPart2 = '-pixel'; + } + + rating.loadGraphic('assets/images/' + pixelShitPart1 + daRating + pixelShitPart2 + ".png"); rating.screenCenter(); rating.x = coolText.x - 40; rating.y -= 60; rating.acceleration.y = 550; rating.velocity.y -= FlxG.random.int(140, 175); - rating.setGraphicSize(Std.int(rating.width * 0.7)); - rating.updateHitbox(); - rating.antialiasing = true; rating.velocity.x -= FlxG.random.int(0, 10); - var comboSpr:FlxSprite = new FlxSprite().loadGraphic('assets/images/combo.png'); + var comboSpr:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + pixelShitPart1 + 'combo' + pixelShitPart2 + '.png'); comboSpr.screenCenter(); comboSpr.x = coolText.x; comboSpr.acceleration.y = 600; - comboSpr.antialiasing = true; comboSpr.velocity.y -= 150; - comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); - comboSpr.updateHitbox(); + comboSpr.velocity.x += FlxG.random.int(1, 10); - // add(comboSpr); add(rating); + if (curStage != 'school') + { + rating.setGraphicSize(Std.int(rating.width * 0.7)); + rating.antialiasing = true; + comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); + comboSpr.antialiasing = true; + } + else + { + rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7)); + comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7)); + } + + comboSpr.updateHitbox(); + rating.updateHitbox(); + var seperatedScore:Array = []; seperatedScore.push(Math.floor(combo / 100)); @@ -1465,13 +1508,22 @@ class PlayState extends MusicBeatState var daLoop:Int = 0; for (i in seperatedScore) { - var numScore:FlxSprite = new FlxSprite().loadGraphic('assets/images/num' + Std.int(i) + '.png'); + var numScore:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2 + '.png'); numScore.screenCenter(); numScore.x = coolText.x + (43 * daLoop) - 90; numScore.y += 80; - numScore.antialiasing = true; - numScore.setGraphicSize(Std.int(numScore.width * 0.5)); + + if (curStage != 'school') + { + numScore.antialiasing = true; + numScore.setGraphicSize(Std.int(numScore.width * 0.5)); + } + else + { + numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom)); + } numScore.updateHitbox(); + numScore.acceleration.y = FlxG.random.int(200, 300); numScore.velocity.y -= FlxG.random.int(140, 160); numScore.velocity.x = FlxG.random.float(-5, 5); @@ -1994,6 +2046,9 @@ class PlayState extends MusicBeatState switch (curStage) { + case 'school': + bgGirls.dance(); + case 'mall': upperBoppers.animation.play('bop', true); bottomBoppers.animation.play('bop', true); From c7c80c85fcee6b50ccfc81d14248cf4e120933aa Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 25 Jan 2021 06:07:45 -0500 Subject: [PATCH 67/86] SENPAI IN THE STREETS --- source/Character.hx | 19 +++++++++++++++++++ source/HealthIcon.hx | 1 + source/PlayState.hx | 18 ++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 2a95a869a..236544734 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -385,6 +385,25 @@ class Character extends FlxSprite antialiasing = false; flipX = true; + case 'senpai': + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpai.png', 'assets/images/weeb/senpai.xml'); + animation.addByPrefix('idle', 'Senpai Idle', 24, false); + animation.addByPrefix('singUP', 'SENPAI UP NOTE', 24, false); + animation.addByPrefix('singLEFT', 'SENPAI LEFT NOTE', 24, false); + animation.addByPrefix('singRIGHT', 'SENPAI RIGHT NOTE', 24, false); + animation.addByPrefix('singDOWN', 'SENPAI DOWN NOTE', 24, false); + + addOffset('idle'); + addOffset("singUP", 5, 37); + addOffset("singRIGHT"); + addOffset("singLEFT", 40); + addOffset("singDOWN", 14); + + setGraphicSize(Std.int(width * 6)); + updateHitbox(); + + antialiasing = false; + case 'parents-christmas': frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/mom_dad_christmas_assets.png', 'assets/images/christmas/mom_dad_christmas_assets.xml'); diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 87d9cac2a..14fc69ee7 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -21,6 +21,7 @@ class HealthIcon extends FlxSprite animation.add('tankman', [8, 9], 0, false, isPlayer); animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); + animation.add('senpai', [12, 13], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); animation.add('parents-christmas', [17], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index e314fed55..736d644ff 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -464,6 +464,9 @@ class PlayState extends MusicBeatState dad.y += 300; case 'parents-christmas': dad.x -= 500; + case 'senpai': + dad.x += 150; + dad.y += 300; } boyfriend = new Boyfriend(770, 450, SONG.player1); @@ -1147,9 +1150,18 @@ class PlayState extends MusicBeatState { camFollow.setPosition(dad.getMidpoint().x + 150, dad.getMidpoint().y - 100); // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); + + switch (dad.curCharacter) + { + case 'mom': + camFollow.y = dad.getMidpoint().y; + case 'senpai': + camFollow.y = dad.getMidpoint().y - 430; + camFollow.x = dad.getMidpoint().x - 100; + } + if (dad.curCharacter == 'mom') - camFollow.y = dad.getMidpoint().y; - vocals.volume = 1; + vocals.volume = 1; if (SONG.song.toLowerCase() == 'tutorial') { @@ -1167,6 +1179,8 @@ class PlayState extends MusicBeatState camFollow.x = boyfriend.getMidpoint().x - 300; case 'mall': camFollow.y = boyfriend.getMidpoint().y - 200; + case 'school': + camFollow.x = boyfriend.getMidpoint().x - 200; } if (SONG.song.toLowerCase() == 'tutorial') From d10f3cda105f7fd05880070cf31181fc02dc6b05 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 25 Jan 2021 15:56:42 -0500 Subject: [PATCH 68/86] intro date shit --- source/PlayState.hx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 736d644ff..dd13b6b94 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -676,18 +676,22 @@ class PlayState extends MusicBeatState ]); var introAlts:Array = introAssets.get('default'); + var altSuffix:String = ""; for (value in introAssets.keys()) { if (value == curStage) + { introAlts = introAssets.get(value); + altSuffix = '-pixel'; + } } switch (swagCounter) { case 0: - FlxG.sound.play('assets/sounds/intro3' + TitleState.soundExt, 0.6); + FlxG.sound.play('assets/sounds/intro3' + altSuffix + TitleState.soundExt, 0.6); case 1: var ready:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[0]); ready.scrollFactor.set(); @@ -705,7 +709,7 @@ class PlayState extends MusicBeatState ready.destroy(); } }); - FlxG.sound.play('assets/sounds/intro2' + TitleState.soundExt, 0.6); + FlxG.sound.play('assets/sounds/intro2' + altSuffix + TitleState.soundExt, 0.6); case 2: var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[1]); set.scrollFactor.set(); @@ -722,7 +726,7 @@ class PlayState extends MusicBeatState set.destroy(); } }); - FlxG.sound.play('assets/sounds/intro1' + TitleState.soundExt, 0.6); + FlxG.sound.play('assets/sounds/intro1' + altSuffix + TitleState.soundExt, 0.6); case 3: var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[2]); go.scrollFactor.set(); @@ -741,7 +745,7 @@ class PlayState extends MusicBeatState go.destroy(); } }); - FlxG.sound.play('assets/sounds/introGo' + TitleState.soundExt, 0.6); + FlxG.sound.play('assets/sounds/introGo' + altSuffix + TitleState.soundExt, 0.6); case 4: } From 908182e5c61c6dff00e1c7e04099818121801dea Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 27 Jan 2021 00:32:33 -0500 Subject: [PATCH 69/86] update readme for haxe discord shit lolol --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fbe77d794..772878f13 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,19 @@ This game was made with love to Newgrounds and it's community. Extra love to Tom ## Build instructions +THESE INSTRUCTIONS ARE FOR COMPILING THE GAME'S SOURCE CODE!!! + +IF YOU WANT TO JUST DOWNLOAD AND INSTALL AND PLAY THE GAME NORMALLY, GO TO ITCH.IO TO DOWNLOAD THE GAME FOR PC, MAC, AND LINUX!! + +https://ninja-muffin24.itch.io/friday-night-funkin + + ### Installing shit First you need to install Haxe and HaxeFlixel. I'm too lazy to write and keep updated with that setup (which is pretty simple). The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documentation/getting-started/) -That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe Discord server: https://discord.gg/5ybrNNWx9S +That should give you HaxeFlixel and all of it's setup and shit. If you run into issues INSTALLING FLIXEL, ask them in the #flixel channel in the Haxe Discord server: https://discord.gg/5ybrNNWx9S Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. From e8720332ece533a66e14dd2b25afe33cd25178e8 Mon Sep 17 00:00:00 2001 From: PKPenguin321 Date: Wed, 27 Jan 2021 00:58:58 -0800 Subject: [PATCH 70/86] controls.txt and options UI very scuffed, OptionsMenu.hx is now mostly copied from FreeplayState.hx with no actual functionality currently it reads lines off of controls.txt and displays them on Options menu which is now accessible from main menu controls.txt has control functions prefixed with "set", IE "setUP", then the corresponding key on the following line IE "W" --- source/MainMenuState.hx | 2 +- source/OptionsMenu.hx | 76 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index e1a1db228..02e40438e 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -22,7 +22,7 @@ class MainMenuState extends MusicBeatState var menuItems:FlxTypedGroup; #if !switch - var optionShit:Array = ['story mode', 'freeplay', 'donate']; + var optionShit:Array = ['story mode', 'freeplay', 'donate', 'options']; #else var optionShit:Array = ['story mode', 'freeplay']; #end diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 9e9f35408..d4d188d16 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -1,14 +1,29 @@ package; +import flash.text.TextField; import flixel.FlxG; import flixel.FlxSprite; +import flixel.addons.display.FlxGridOverlay; +import flixel.group.FlxGroup.FlxTypedGroup; +import flixel.math.FlxMath; +import flixel.text.FlxText; import flixel.util.FlxColor; - +import lime.utils.Assets; + class OptionsMenu extends MusicBeatState { + + var selector:FlxText; + var curSelected:Int = 0; + + var controlsStrings:Array = []; + + private var grpControls:FlxTypedGroup; + override function create() { var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png'); + controlsStrings = CoolUtil.coolTextFile('assets/data/controls.txt'); menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); @@ -16,14 +31,69 @@ class OptionsMenu extends MusicBeatState menuBG.antialiasing = true; add(menuBG); + grpControls = new FlxTypedGroup(); + add(grpControls); + + for (i in 0...controlsStrings.length) + { + if(controlsStrings[i].indexOf('set') != -1){ + var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, controlsStrings[i].substring(3)+': '+controlsStrings[i+1], true, false); + controlLabel.isMenuItem = true; + controlLabel.targetY = i; + grpControls.add(controlLabel); + } + // DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !! + } + super.create(); } override function update(elapsed:Float) { + super.update(elapsed); + if (controls.BACK) FlxG.switchState(new MainMenuState()); - - super.update(elapsed); + if(controls.UP_P) + changeSelection(-1); + if(controls.DOWN_P) + changeSelection(1); + } + + function changeSelection(change:Int = 0) + { + #if !switch + NGio.logEvent('Fresh'); + #end + + FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4); + + curSelected += change; + + if (curSelected < 0) + curSelected = controlsStrings.length - 1; + if (curSelected >= controlsStrings.length) + curSelected = 0; + + // selector.y = (70 * curSelected) + 30; + + var bullShit:Int = 0; + + for (item in grpControls.members) + { + item.targetY = bullShit - curSelected; + bullShit++; + + item.alpha = 0.6; + // item.setGraphicSize(Std.int(item.width * 0.8)); + + if (item.targetY == 0) + { + item.alpha = 1; + // item.setGraphicSize(Std.int(item.width)); + } + } + } + } From 22b03ee42007df162d8858da79b65f085d8ce46b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 28 Jan 2021 01:54:21 -0500 Subject: [PATCH 71/86] bullshit --- CHANGELOG.md | 2 ++ README.md | 1 + source/FreeplayState.hx | 1 + source/PlayState.hx | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f3b7224..8920cd610 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] +### Added +- Rebindable controls ([Thanks to PKPenguin321 for the menu backbone work](https://github.com/ninjamuffin99/Funkin/pull/288)) ### Changed - Removed the default HaxeFlixel pause screen when the game window loses focus, can get screenshots of the game easier hehehe ### Fixed diff --git a/README.md b/README.md index 772878f13..313b075d4 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ IF YOU WANT TO JUST DOWNLOAD AND INSTALL AND PLAY THE GAME NORMALLY, GO TO ITCH. https://ninja-muffin24.itch.io/friday-night-funkin +IF YOU WANT TO COMPILE THE GAME YOURSELF, CONTINUE READING!!! ### Installing shit diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index b44ef6d6f..32373c354 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -76,6 +76,7 @@ class FreeplayState extends MusicBeatState if (StoryMenuState.weekUnlocked[6] || isDebug) { songs.push('Senpai'); + songs.push('Roses'); songs.push('Thorns'); // songs.push('Winter-Horrorland'); } diff --git a/source/PlayState.hx b/source/PlayState.hx index dd13b6b94..41732f1b8 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -331,7 +331,7 @@ class PlayState extends MusicBeatState evilSnow.antialiasing = true; add(evilSnow); } - else if (SONG.song.toLowerCase() == 'senpai') + else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses') { curStage = 'school'; From c531aad3f62ca7fc53a782d2adb7646cdd72ffd8 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 30 Jan 2021 06:27:11 -0500 Subject: [PATCH 72/86] senpai and roses on easy --- source/OptionsMenu.hx | 115 ++++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 43 deletions(-) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index d4d188d16..299944af7 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -1,25 +1,26 @@ package; +import Controls.Control; import flash.text.TextField; import flixel.FlxG; import flixel.FlxSprite; import flixel.addons.display.FlxGridOverlay; import flixel.group.FlxGroup.FlxTypedGroup; +import flixel.input.keyboard.FlxKey; import flixel.math.FlxMath; import flixel.text.FlxText; import flixel.util.FlxColor; import lime.utils.Assets; - + class OptionsMenu extends MusicBeatState { - var selector:FlxText; var curSelected:Int = 0; var controlsStrings:Array = []; private var grpControls:FlxTypedGroup; - + override function create() { var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png'); @@ -33,11 +34,12 @@ class OptionsMenu extends MusicBeatState grpControls = new FlxTypedGroup(); add(grpControls); - + for (i in 0...controlsStrings.length) { - if(controlsStrings[i].indexOf('set') != -1){ - var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, controlsStrings[i].substring(3)+': '+controlsStrings[i+1], true, false); + if (controlsStrings[i].indexOf('set') != -1) + { + var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, controlsStrings[i].substring(3) + ': ' + controlsStrings[i + 1], true, false); controlLabel.isMenuItem = true; controlLabel.targetY = i; grpControls.add(controlLabel); @@ -52,48 +54,75 @@ class OptionsMenu extends MusicBeatState { super.update(elapsed); - if (controls.BACK) - FlxG.switchState(new MainMenuState()); - if(controls.UP_P) - changeSelection(-1); - if(controls.DOWN_P) - changeSelection(1); - + if (controls.ACCEPT) + { + changeBinding(); + } + + if (isSettingControl) + waitingInput(); + else + { + if (controls.BACK) + FlxG.switchState(new MainMenuState()); + if (controls.UP_P) + changeSelection(-1); + if (controls.DOWN_P) + changeSelection(1); + } + } + + function waitingInput():Void + { + if (FlxG.keys.getIsDown().length > 0) + { + PlayerSettings.player1.controls.replaceBinding(Control.LEFT, Keys, FlxG.keys.getIsDown()[0].ID, null); + } + // PlayerSettings.player1.controls.replaceBinding(Control) + } + + var isSettingControl:Bool = false; + + function changeBinding():Void + { + if (!isSettingControl) + { + isSettingControl = true; + } } function changeSelection(change:Int = 0) + { + #if !switch + NGio.logEvent('Fresh'); + #end + + FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4); + + curSelected += change; + + if (curSelected < 0) + curSelected = grpControls.length - 1; + if (curSelected >= grpControls.length) + curSelected = 0; + + // selector.y = (70 * curSelected) + 30; + + var bullShit:Int = 0; + + for (item in grpControls.members) { - #if !switch - NGio.logEvent('Fresh'); - #end - - FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4); - - curSelected += change; - - if (curSelected < 0) - curSelected = controlsStrings.length - 1; - if (curSelected >= controlsStrings.length) - curSelected = 0; - - // selector.y = (70 * curSelected) + 30; - - var bullShit:Int = 0; - - for (item in grpControls.members) + item.targetY = bullShit - curSelected; + bullShit++; + + item.alpha = 0.6; + // item.setGraphicSize(Std.int(item.width * 0.8)); + + if (item.targetY == 0) { - item.targetY = bullShit - curSelected; - bullShit++; - - item.alpha = 0.6; - // item.setGraphicSize(Std.int(item.width * 0.8)); - - if (item.targetY == 0) - { - item.alpha = 1; - // item.setGraphicSize(Std.int(item.width)); - } + item.alpha = 1; + // item.setGraphicSize(Std.int(item.width)); } } - + } } From 224d8ea0296a465b5d2a5bcfb6d5c81830f8784b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 30 Jan 2021 07:16:51 -0500 Subject: [PATCH 73/86] game over in progress --- source/Character.hx | 17 +++++++++++++++++ source/GameOverSubstate.hx | 21 ++++++++++++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 236544734..4e3ca03e1 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -385,6 +385,23 @@ class Character extends FlxSprite antialiasing = false; flipX = true; + case 'bf-pixel-dead': + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/bfPixelsDEAD.png', 'assets/images/weeb/bfPixelsDEAD.xml'); + animation.addByPrefix('singUP', "BF Dies pixel", 24, false); + animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false); + animation.addByPrefix('deathLoop', "Retry Loop", 24, true); + animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); + animation.play('firstDeath'); + addOffset('firstDeath'); + addOffset('deathLoop'); + addOffset('deathConfirm'); + + // pixel bullshit + setGraphicSize(Std.int(width * 6)); + updateHitbox(); + antialiasing = false; + flipX = true; + case 'senpai': frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpai.png', 'assets/images/weeb/senpai.xml'); animation.addByPrefix('idle', 'Senpai Idle', 24, false); diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 54df50cdd..6a40b591f 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -12,21 +12,32 @@ class GameOverSubstate extends MusicBeatSubstate var bf:Boyfriend; var camFollow:FlxObject; - // var + var stageSuffix:String = ""; public function new(x:Float, y:Float) { + var daStage = PlayState.curStage; + var daBf:String = ''; + switch (daStage) + { + case 'school': + stageSuffix = '-pixel'; + daBf = 'bf-pixel-dead'; + default: + daBf = 'bf'; + } + super(); Conductor.songPosition = 0; - bf = new Boyfriend(x, y); + bf = new Boyfriend(x, y, daBf); add(bf); camFollow = new FlxObject(bf.getGraphicMidpoint().x, bf.getGraphicMidpoint().y, 1, 1); add(camFollow); - FlxG.sound.play('assets/sounds/fnf_loss_sfx' + TitleState.soundExt); + FlxG.sound.play('assets/sounds/fnf_loss_sfx' + stageSuffix + TitleState.soundExt); Conductor.changeBPM(100); // FlxG.camera.followLerp = 1; @@ -63,7 +74,7 @@ class GameOverSubstate extends MusicBeatSubstate if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished) { - FlxG.sound.playMusic('assets/music/gameOver' + TitleState.soundExt); + FlxG.sound.playMusic('assets/music/gameOver' + stageSuffix + TitleState.soundExt); } if (FlxG.sound.music.playing) @@ -88,7 +99,7 @@ class GameOverSubstate extends MusicBeatSubstate isEnding = true; bf.playAnim('deathConfirm', true); FlxG.sound.music.stop(); - FlxG.sound.play('assets/music/gameOverEnd' + TitleState.soundExt); + FlxG.sound.play('assets/music/gameOverEnd' + stageSuffix + TitleState.soundExt); new FlxTimer().start(0.7, function(tmr:FlxTimer) { FlxG.camera.fade(FlxColor.BLACK, 2, false, function() From dac509b5a4f4e8171cdc25fda6935189b47cc968 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 30 Jan 2021 23:54:28 -0800 Subject: [PATCH 74/86] removed discord link lolol oops! --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index fbe77d794..b2a9a26a0 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,6 @@ This game was made with love to Newgrounds and it's community. Extra love to Tom First you need to install Haxe and HaxeFlixel. I'm too lazy to write and keep updated with that setup (which is pretty simple). The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documentation/getting-started/) -That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe Discord server: https://discord.gg/5ybrNNWx9S - Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. ``` From 5ad361ecaa1928d36396762f50cd2c4a4e4fbdfb Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 31 Jan 2021 09:17:56 -0500 Subject: [PATCH 75/86] leaves lol! --- source/Character.hx | 7 ++++--- source/PlayState.hx | 46 +++++++++++++++++++++++++++++--------------- source/TitleState.hx | 4 ---- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 4e3ca03e1..63430fa4c 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -392,10 +392,11 @@ class Character extends FlxSprite animation.addByPrefix('deathLoop', "Retry Loop", 24, true); animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); animation.play('firstDeath'); - addOffset('firstDeath'); - addOffset('deathLoop'); - addOffset('deathConfirm'); + addOffset('firstDeath'); + addOffset('deathLoop', -37); + addOffset('deathConfirm', -37); + playAnim('firstDeath'); // pixel bullshit setGraphicSize(Std.int(width * 6)); updateHitbox(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 41732f1b8..3c3f1df7a 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -331,7 +331,7 @@ class PlayState extends MusicBeatState evilSnow.antialiasing = true; add(evilSnow); } - else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses') + else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses' || SONG.song.toLowerCase() == 'thorns') { curStage = 'school'; @@ -343,37 +343,50 @@ class PlayState extends MusicBeatState var repositionShit = -200; - var bgSchool:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebSchool.png'); - bgSchool.scrollFactor.set(0.6, 0.6); + var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic('assets/images/weeb/weebSchool.png'); + bgSchool.scrollFactor.set(0.6, 0.90); add(bgSchool); var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebStreet.png'); bgStreet.scrollFactor.set(0.95, 0.95); add(bgStreet); - var bgTrees:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebTreesBack.png'); + var fgTrees:FlxSprite = new FlxSprite(repositionShit + 170, 130).loadGraphic('assets/images/weeb/weebTreesBack.png'); + fgTrees.scrollFactor.set(0.9, 0.9); + add(fgTrees); + + var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800); + var treetex = FlxAtlasFrames.fromSpriteSheetPacker('assets/images/weeb/weebTrees.png', 'assets/images/weeb/weebTrees.txt'); + bgTrees.frames = treetex; + bgTrees.animation.add('treeLoop', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], 12); + bgTrees.animation.play('treeLoop'); bgTrees.scrollFactor.set(0.85, 0.85); add(bgTrees); - var fgTrees:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebTrees.png'); - fgTrees.scrollFactor.set(0.9, 0.9); - add(fgTrees); + var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); + treeLeaves.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/petals.png', 'assets/images/weeb/petals.xml'); + treeLeaves.animation.addByPrefix('leaves', 'PETALS ALL', 24, true); + treeLeaves.animation.play('leaves'); + treeLeaves.scrollFactor.set(0.85, 0.85); + add(treeLeaves); var widShit = Std.int(bgSky.width * 6); bgSky.setGraphicSize(widShit); bgSchool.setGraphicSize(widShit); bgStreet.setGraphicSize(widShit); - bgTrees.setGraphicSize(widShit); - fgTrees.setGraphicSize(widShit); + bgTrees.setGraphicSize(Std.int(widShit * 1.4)); + fgTrees.setGraphicSize(Std.int(widShit * 0.8)); + treeLeaves.setGraphicSize(widShit); fgTrees.updateHitbox(); bgSky.updateHitbox(); bgSchool.updateHitbox(); bgStreet.updateHitbox(); bgTrees.updateHitbox(); + treeLeaves.updateHitbox(); - bgGirls = new BackgroundGirls(-100, 120); + bgGirls = new BackgroundGirls(-100, 190); bgGirls.scrollFactor.set(0.9, 0.9); bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); @@ -466,7 +479,8 @@ class PlayState extends MusicBeatState dad.x -= 500; case 'senpai': dad.x += 150; - dad.y += 300; + dad.y += 360; + camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); } boyfriend = new Boyfriend(770, 450, SONG.player1); @@ -489,10 +503,10 @@ class PlayState extends MusicBeatState boyfriend.x += 320; dad.y -= 80; case 'school': - boyfriend.x += 170; - boyfriend.y += 120; - gf.x += 100; - gf.y += 200; + boyfriend.x += 200; + boyfriend.y += 220; + gf.x += 180; + gf.y += 300; } var doof:DialogueBox = new DialogueBox(false, dialogue); @@ -525,6 +539,7 @@ class PlayState extends MusicBeatState FlxG.camera.follow(camFollow, LOCKON, 0.04); // FlxG.camera.setScrollBounds(0, FlxG.width, 0, FlxG.height); FlxG.camera.zoom = defaultCamZoom; + FlxG.camera.focusOn(camFollow.getPosition()); FlxG.worldBounds.set(0, 0, FlxG.width, FlxG.height); @@ -1185,6 +1200,7 @@ class PlayState extends MusicBeatState camFollow.y = boyfriend.getMidpoint().y - 200; case 'school': camFollow.x = boyfriend.getMidpoint().x - 200; + camFollow.y = boyfriend.getMidpoint().y - 200; } if (SONG.song.toLowerCase() == 'tutorial') diff --git a/source/TitleState.hx b/source/TitleState.hx index cbdb2a005..53452e45c 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -398,10 +398,6 @@ class TitleState extends MusicBeatState FlxG.camera.flash(FlxColor.WHITE, 4); remove(credGroup); skippedIntro = true; - - var image = Assets.getBitmapData('assets/images/alphabet.png'); - var money = new FlxSprite(0, 0, image); - add(money); } } } From 5d0363ae968d818df39f763cf3746cdd2e830bc1 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 31 Jan 2021 21:43:09 -0500 Subject: [PATCH 76/86] call me senpai --- CHANGELOG.md | 1 + source/HealthIcon.hx | 4 ++-- source/PlayState.hx | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8920cd610..56d2b0e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Rebindable controls ([Thanks to PKPenguin321 for the menu backbone work](https://github.com/ninjamuffin99/Funkin/pull/288)) ### Changed +- Made it so you lose sliiiightly more health when you miss a note. - Removed the default HaxeFlixel pause screen when the game window loses focus, can get screenshots of the game easier hehehe ### Fixed - Idle animation bug with BF christmas and BF hair blow sprites ([Thanks to Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/237)) diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 14fc69ee7..c6f0f5da2 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -13,7 +13,7 @@ class HealthIcon extends FlxSprite animation.add('bf', [0, 1], 0, false, isPlayer); animation.add('bf-car', [0, 1], 0, false, isPlayer); animation.add('bf-christmas', [0, 1], 0, false, isPlayer); - animation.add('bf-pixel', [0, 1], 0, false, isPlayer); + animation.add('bf-pixel', [21, 21], 0, false, isPlayer); animation.add('spooky', [2, 3], 0, false, isPlayer); animation.add('pico', [4, 5], 0, false, isPlayer); animation.add('mom', [6, 7], 0, false, isPlayer); @@ -21,7 +21,7 @@ class HealthIcon extends FlxSprite animation.add('tankman', [8, 9], 0, false, isPlayer); animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); - animation.add('senpai', [12, 13], 0, false, isPlayer); + animation.add('senpai', [22, 22], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); animation.add('parents-christmas', [17], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index 3c3f1df7a..6a336ec9c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1352,7 +1352,7 @@ class PlayState extends MusicBeatState { if (daNote.tooLate || !daNote.wasGoodHit) { - health -= 0.045; + health -= 0.0475; vocals.volume = 0; } @@ -1797,7 +1797,7 @@ class PlayState extends MusicBeatState { if (!boyfriend.stunned) { - health -= 0.035; + health -= 0.04; if (combo > 5) { gf.playAnim('sad'); From 13ae7d65b6719a7d360b2cbe864ddeacc2c33e7e Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 1 Feb 2021 01:50:30 -0500 Subject: [PATCH 77/86] FONT AND BULLSHIT --- Project.xml | 9 ++-- source/DialogueBox.hx | 110 +++++++++++++++++++++++++++++++++++++++--- source/PlayState.hx | 25 +++++++--- 3 files changed, 127 insertions(+), 17 deletions(-) diff --git a/Project.xml b/Project.xml index b5bf7197f..80c962c90 100644 --- a/Project.xml +++ b/Project.xml @@ -54,9 +54,12 @@ - - - + + diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 17f3d616d..9be4fd482 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -2,38 +2,99 @@ package; import flixel.FlxG; import flixel.FlxSprite; +import flixel.addons.text.FlxTypeText; import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxSpriteGroup; import flixel.input.FlxKeyManager; +import flixel.text.FlxText; +import flixel.util.FlxTimer; + +using StringTools; class DialogueBox extends FlxSpriteGroup { var box:FlxSprite; + var curCharacter:String = ''; + var dialogue:Alphabet; var dialogueList:Array = []; + // SECOND DIALOGUE FOR THE PIXEL SHIT INSTEAD??? + var swagDialogue:FlxTypeText; + + var dropText:FlxText; + public var finishThing:Void->Void; + var portraitLeft:FlxSprite; + var portraitRight:FlxSprite; + public function new(talkingRight:Bool = true, ?dialogueList:Array) { super(); - box = new FlxSprite(40); - box.frames = FlxAtlasFrames.fromSparrow('assets/images/speech_bubble_talking.png', 'assets/images/speech_bubble_talking.xml'); - box.animation.addByPrefix('normalOpen', 'Speech Bubble Normal Open', 24, false); - box.animation.addByPrefix('normal', 'speech bubble normal', 24); + var bgFade:FlxSprite = new FlxSprite(-200, -200).makeGraphic(Std.int(FlxG.width * 1.3), Std.int(FlxG.height * 1.3), 0xFFB3DFd8); + bgFade.scrollFactor.set(); + bgFade.alpha = 0; + add(bgFade); + + new FlxTimer().start(0.83, function(tmr:FlxTimer) + { + bgFade.alpha += (1 / 5) * 0.7; + if (bgFade.alpha > 0.7) + bgFade.alpha = 0.7; + }, 5); + + portraitLeft = new FlxSprite(-20, 40); + portraitLeft.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpaiPortrait.png', 'assets/images/weeb/senpaiPortrait.xml'); + portraitLeft.animation.addByPrefix('enter', 'Senpai Portrait Enter', 24, false); + portraitLeft.setGraphicSize(Std.int(portraitLeft.width * PlayState.daPixelZoom * 0.9)); + portraitLeft.updateHitbox(); + portraitLeft.scrollFactor.set(); + add(portraitLeft); + portraitLeft.visible = false; + + portraitRight = new FlxSprite(0, 40); + portraitRight.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/bfPortrait.png', 'assets/images/weeb/bfPortrait.xml'); + portraitRight.animation.addByPrefix('enter', 'Boyfriend portrait enter', 24, false); + portraitRight.setGraphicSize(Std.int(portraitRight.width * PlayState.daPixelZoom * 0.9)); + portraitRight.updateHitbox(); + portraitRight.scrollFactor.set(); + add(portraitRight); + portraitRight.visible = false; + + box = new FlxSprite(-20, 45); + box.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/pixelUI/dialogueBox-pixel.png', 'assets/images/weeb/pixelUI/dialogueBox-pixel.xml'); + box.animation.addByPrefix('normalOpen', 'Text Box Appear', 24, false); + box.animation.addByIndices('normal', 'Text Box Appear', [4], "", 24); box.animation.play('normalOpen'); + box.setGraphicSize(Std.int(box.width * PlayState.daPixelZoom * 0.9)); + box.updateHitbox(); add(box); + box.screenCenter(X); + portraitLeft.screenCenter(X); + if (!talkingRight) { box.flipX = true; } + dropText = new FlxText(242, 502, Std.int(FlxG.width * 0.6), "", 32); + dropText.font = 'Pixel Arial 11 Bold'; + dropText.color = 0xFFD89494; + add(dropText); + + swagDialogue = new FlxTypeText(240, 500, Std.int(FlxG.width * 0.6), "", 32); + swagDialogue.font = 'Pixel Arial 11 Bold'; + swagDialogue.color = 0xFF3F2021; + swagDialogue.sounds = [FlxG.sound.load('assets/sounds/pixelText' + TitleState.soundExt, 0.6)]; + add(swagDialogue); + dialogue = new Alphabet(0, 80, "", false, true); // dialogue.x = 90; - add(dialogue); + // add(dialogue); this.dialogueList = dialogueList; } @@ -43,6 +104,8 @@ class DialogueBox extends FlxSpriteGroup override function update(elapsed:Float) { + dropText.text = swagDialogue.text; + if (box.animation.curAnim != null) { if (box.animation.curAnim.name == 'normalOpen' && box.animation.curAnim.finished) @@ -79,8 +142,39 @@ class DialogueBox extends FlxSpriteGroup function startDialogue():Void { - var theDialog:Alphabet = new Alphabet(0, 70, dialogueList[0], false, true); - dialogue = theDialog; - add(theDialog); + cleanDialog(); + + // var theDialog:Alphabet = new Alphabet(0, 70, dialogueList[0], false, true); + // dialogue = theDialog; + // add(theDialog); + + // swagDialogue.text = ; + swagDialogue.resetText(dialogueList[0]); + swagDialogue.start(0.02, true); + + switch (curCharacter) + { + case 'dad': + portraitRight.visible = false; + if (!portraitLeft.visible) + { + portraitLeft.visible = true; + portraitLeft.animation.play('enter'); + } + case 'bf': + portraitLeft.visible = false; + if (!portraitRight.visible) + { + portraitRight.visible = true; + portraitRight.animation.play('enter'); + } + } + } + + function cleanDialog():Void + { + var splitName:Array = dialogueList[0].split(":"); + curCharacter = splitName[1]; + dialogueList[0] = dialogueList[0].substr(splitName[1].length + 2).trim(); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index 6a336ec9c..8eb75aa4e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -148,6 +148,12 @@ class PlayState extends MusicBeatState "If you can beat me here...", "Only then I will even CONSIDER letting you\ndate my daughter!" ]; + case 'senpai': + dialogue = [ + ':dad:Ah, a new fair maiden has come in search of true love!', + ":dad:A serenade between gentlemen shall decide where her beautiful heart shall reside.", + ":bf:Beep bo bop" + ]; } if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') @@ -511,7 +517,7 @@ class PlayState extends MusicBeatState var doof:DialogueBox = new DialogueBox(false, dialogue); // doof.x += 70; - doof.y = FlxG.height * 0.5; + // doof.y = FlxG.height * 0.5; doof.scrollFactor.set(); doof.finishThing = startCountdown; @@ -619,7 +625,9 @@ class PlayState extends MusicBeatState }); }); case 'senpai': - schoolIntro(); + schoolIntro(doof); + case 'roses': + schoolIntro(doof); default: startCountdown(); } @@ -629,7 +637,7 @@ class PlayState extends MusicBeatState switch (curSong.toLowerCase()) { case 'senpai': - schoolIntro(); + schoolIntro(doof); default: startCountdown(); } @@ -638,7 +646,7 @@ class PlayState extends MusicBeatState super.create(); } - function schoolIntro():Void + function schoolIntro(?dialogueBox:DialogueBox):Void { var black:FlxSprite = new FlxSprite(-100, -100).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK); black.scrollFactor.set(); @@ -647,8 +655,6 @@ class PlayState extends MusicBeatState new FlxTimer().start(0.3, function(tmr:FlxTimer) { black.alpha -= 0.15; - if (!startedCountdown) - startCountdown(); if (black.alpha > 0) { @@ -656,6 +662,13 @@ class PlayState extends MusicBeatState } else { + if (dialogueBox != null) + { + add(dialogueBox); + } + else + startCountdown(); + remove(black); } }); From f306e603bed47608deb3742a89d15ae950d95365 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 1 Feb 2021 05:52:10 -0500 Subject: [PATCH 78/86] aligned pixel arrows --- source/DialogueBox.hx | 5 +++++ source/Note.hx | 3 +++ source/PlayState.hx | 10 +++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 9be4fd482..e8681e72e 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -30,6 +30,8 @@ class DialogueBox extends FlxSpriteGroup var portraitLeft:FlxSprite; var portraitRight:FlxSprite; + var handSelect:FlxSprite; + public function new(talkingRight:Bool = true, ?dialogueList:Array) { super(); @@ -73,6 +75,9 @@ class DialogueBox extends FlxSpriteGroup box.updateHitbox(); add(box); + handSelect = new FlxSprite(FlxG.width * 0.9, FlxG.height * 0.9).loadGraphic('assets/images/weeb/pixelUI/hand_textbox.png'); + add(handSelect); + box.screenCenter(X); portraitLeft.screenCenter(X); diff --git a/source/Note.hx b/source/Note.hx index ca57a64f2..cad64c1c0 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -139,6 +139,9 @@ class Note extends FlxSprite x -= width / 2; + if (PlayState.curStage == 'school') + x += 30; + if (prevNote.isSustainNote) { switch (prevNote.noteData) diff --git a/source/PlayState.hx b/source/PlayState.hx index 8eb75aa4e..d260ff2c4 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -149,11 +149,9 @@ class PlayState extends MusicBeatState "Only then I will even CONSIDER letting you\ndate my daughter!" ]; case 'senpai': - dialogue = [ - ':dad:Ah, a new fair maiden has come in search of true love!', - ":dad:A serenade between gentlemen shall decide where her beautiful heart shall reside.", - ":bf:Beep bo bop" - ]; + dialogue = CoolUtil.coolTextFile('assets/data/senpai/senpaiDialogue.txt'); + case 'roses': + dialogue = CoolUtil.coolTextFile('assets/data/roses/rosesDialogue.txt'); } if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') @@ -638,6 +636,8 @@ class PlayState extends MusicBeatState { case 'senpai': schoolIntro(doof); + case 'roses': + schoolIntro(doof); default: startCountdown(); } From c66eb94ccf9d2fc27807e37741dd10cd027176b6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 00:48:22 -0500 Subject: [PATCH 79/86] THORNS AND EVIL MAN --- source/Character.hx | 21 ++++++ source/DialogueBox.hx | 35 +++++++-- source/HealthIcon.hx | 1 + source/Note.hx | 30 +++++++- source/PlayState.hx | 158 +++++++++++++++++++++++++++++++++++++---- source/WiggleEffect.hx | 133 ++++++++++++++++++++++++++++++++++ 6 files changed, 361 insertions(+), 17 deletions(-) create mode 100644 source/WiggleEffect.hx diff --git a/source/Character.hx b/source/Character.hx index 63430fa4c..aa4b63d2b 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -422,6 +422,27 @@ class Character extends FlxSprite antialiasing = false; + case 'spirit': + frames = FlxAtlasFrames.fromSpriteSheetPacker('assets/images/weeb/spirit.png', 'assets/images/weeb/spirit.txt'); + animation.addByPrefix('idle', "idle spirit_", 24, false); + animation.addByPrefix('singUP', "up_", 24, false); + animation.addByPrefix('singRIGHT', "right_", 24, false); + animation.addByPrefix('singLEFT', "left_", 24, false); + animation.addByPrefix('singDOWN', "spirit down_", 24, false); + + addOffset('idle', -220, -280); + addOffset('singUP', -220, -240); + addOffset("singRIGHT", -220, -280); + addOffset("singLEFT", -200, -280); + addOffset("singDOWN", 170, 110); + + setGraphicSize(Std.int(width * 6)); + updateHitbox(); + + playAnim('idle'); + + antialiasing = false; + case 'parents-christmas': frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/mom_dad_christmas_assets.png', 'assets/images/christmas/mom_dad_christmas_assets.xml'); diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index e8681e72e..2dbd53e2d 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -31,12 +31,16 @@ class DialogueBox extends FlxSpriteGroup var portraitRight:FlxSprite; var handSelect:FlxSprite; + var bgFade:FlxSprite; public function new(talkingRight:Bool = true, ?dialogueList:Array) { super(); - var bgFade:FlxSprite = new FlxSprite(-200, -200).makeGraphic(Std.int(FlxG.width * 1.3), Std.int(FlxG.height * 1.3), 0xFFB3DFd8); + FlxG.sound.playMusic('assets/music/Lunchbox' + TitleState.soundExt, 0); + FlxG.sound.music.fadeIn(1, 0, 0.8); + + bgFade = new FlxSprite(-200, -200).makeGraphic(Std.int(FlxG.width * 1.3), Std.int(FlxG.height * 1.3), 0xFFB3DFd8); bgFade.scrollFactor.set(); bgFade.alpha = 0; add(bgFade); @@ -130,10 +134,31 @@ class DialogueBox extends FlxSpriteGroup { remove(dialogue); + FlxG.sound.play('assets/sounds/clickText' + TitleState.soundExt, 0.8); + if (dialogueList[1] == null) { - finishThing(); - kill(); + if (!isEnding) + { + isEnding = true; + FlxG.sound.music.fadeOut(2.2, 0); + + new FlxTimer().start(0.2, function(tmr:FlxTimer) + { + box.alpha -= 1 / 5; + bgFade.alpha -= 1 / 5 * 0.7; + portraitLeft.visible = false; + portraitRight.visible = false; + swagDialogue.alpha -= 1 / 5; + dropText.alpha = swagDialogue.alpha; + }, 5); + + new FlxTimer().start(1.2, function(tmr:FlxTimer) + { + finishThing(); + kill(); + }); + } } else { @@ -145,6 +170,8 @@ class DialogueBox extends FlxSpriteGroup super.update(elapsed); } + var isEnding:Bool = false; + function startDialogue():Void { cleanDialog(); @@ -155,7 +182,7 @@ class DialogueBox extends FlxSpriteGroup // swagDialogue.text = ; swagDialogue.resetText(dialogueList[0]); - swagDialogue.start(0.02, true); + swagDialogue.start(0.04, true); switch (curCharacter) { diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index c6f0f5da2..c5cbee60d 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -22,6 +22,7 @@ class HealthIcon extends FlxSprite animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); animation.add('senpai', [22, 22], 0, false, isPlayer); + animation.add('spirit', [23, 23], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); animation.add('parents-christmas', [17], 0, false, isPlayer); diff --git a/source/Note.hx b/source/Note.hx index cad64c1c0..32e1b5c18 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -6,6 +6,8 @@ import flixel.math.FlxMath; import flixel.util.FlxColor; import polymod.format.ParseRules.TargetSignatureElement; +using StringTools; + class Note extends FlxSprite { public var strumTime:Float = 0; @@ -75,6 +77,32 @@ class Note extends FlxSprite setGraphicSize(Std.int(width * PlayState.daPixelZoom)); updateHitbox(); + case 'schoolEvil': // COPY PASTED CUZ I AM LAZY + loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17); + + animation.add('greenScroll', [6]); + animation.add('redScroll', [7]); + animation.add('blueScroll', [5]); + animation.add('purpleScroll', [4]); + + if (isSustainNote) + { + loadGraphic('assets/images/weeb/pixelUI/arrowEnds.png', 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(); + default: frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); @@ -139,7 +167,7 @@ class Note extends FlxSprite x -= width / 2; - if (PlayState.curStage == 'school') + if (PlayState.curStage.startsWith('school')) x += 30; if (prevNote.isSustainNote) diff --git a/source/PlayState.hx b/source/PlayState.hx index d260ff2c4..b669a034a 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2,6 +2,7 @@ package; import Section.SwagSection; import Song.SwagSong; +import WiggleEffect.WiggleEffectType; import flixel.FlxBasic; import flixel.FlxCamera; import flixel.FlxG; @@ -11,6 +12,10 @@ import flixel.FlxSprite; import flixel.FlxState; import flixel.FlxSubState; import flixel.addons.display.FlxGridOverlay; +import flixel.addons.effects.FlxTrail; +import flixel.addons.effects.FlxTrailArea; +import flixel.addons.effects.chainable.FlxEffectSprite; +import flixel.addons.effects.chainable.FlxWaveEffect; import flixel.graphics.atlas.FlxAtlas; import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup.FlxTypedGroup; @@ -30,6 +35,7 @@ import flixel.util.FlxTimer; import haxe.Json; import lime.utils.Assets; import openfl.display.BlendMode; +import openfl.display.StageQuality; import openfl.filters.ShaderFilter; using StringTools; @@ -97,6 +103,7 @@ class PlayState extends MusicBeatState var santa:FlxSprite; var bgGirls:BackgroundGirls; + var wiggleShit:WiggleEffect = new WiggleEffect(); var talking:Bool = true; var songScore:Int = 0; @@ -335,7 +342,7 @@ class PlayState extends MusicBeatState evilSnow.antialiasing = true; add(evilSnow); } - else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses' || SONG.song.toLowerCase() == 'thorns') + else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses') { curStage = 'school'; @@ -397,6 +404,68 @@ class PlayState extends MusicBeatState bgGirls.updateHitbox(); add(bgGirls); } + else if (SONG.song.toLowerCase() == 'thorns') + { + curStage = 'schoolEvil'; + + var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2); + var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2); + + var posX = 400; + var posY = 200; + + var bg:FlxSprite = new FlxSprite(posX, posY); + bg.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/animatedEvilSchool.png', 'assets/images/weeb/animatedEvilSchool.xml'); + bg.animation.addByPrefix('idle', 'background 2', 24); + bg.animation.play('idle'); + bg.scrollFactor.set(0.8, 0.9); + bg.scale.set(6, 6); + add(bg); + + /* + var bg:FlxSprite = new FlxSprite(posX, posY).loadGraphic('assets/images/weeb/evilSchoolBG.png'); + bg.scale.set(6, 6); + // bg.setGraphicSize(Std.int(bg.width * 6)); + // bg.updateHitbox(); + add(bg); + + var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic('assets/images/weeb/evilSchoolFG.png'); + fg.scale.set(6, 6); + // fg.setGraphicSize(Std.int(fg.width * 6)); + // fg.updateHitbox(); + add(fg); + + wiggleShit.effectType = WiggleEffectType.DREAMY; + wiggleShit.waveAmplitude = 0.01; + wiggleShit.waveFrequency = 60; + wiggleShit.waveSpeed = 0.8; + */ + + // bg.shader = wiggleShit.shader; + // fg.shader = wiggleShit.shader; + + /* + var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]); + var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]); + + // Using scale since setGraphicSize() doesnt work??? + waveSprite.scale.set(6, 6); + waveSpriteFG.scale.set(6, 6); + waveSprite.setPosition(posX, posY); + waveSpriteFG.setPosition(posX, posY); + + waveSprite.scrollFactor.set(0.7, 0.8); + waveSpriteFG.scrollFactor.set(0.9, 0.8); + + // waveSprite.setGraphicSize(Std.int(waveSprite.width * 6)); + // waveSprite.updateHitbox(); + // waveSpriteFG.setGraphicSize(Std.int(fg.width * 6)); + // waveSpriteFG.updateHitbox(); + + add(waveSprite); + add(waveSpriteFG); + */ + } else { defaultCamZoom = 0.9; @@ -439,6 +508,8 @@ class PlayState extends MusicBeatState gfVersion = 'gf-christmas'; case 'school': gfVersion = 'gf-pixel'; + case 'schoolEvil': + gfVersion = 'gf-pixel'; } if (curStage == 'limo') @@ -446,14 +517,12 @@ class PlayState extends MusicBeatState gf = new Character(400, 130, gfVersion); gf.scrollFactor.set(0.95, 0.95); - add(gf); // Shitty layering but whatev it works LOL if (curStage == 'limo') add(limo); dad = new Character(100, 100, SONG.player2); - add(dad); var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y); @@ -485,10 +554,13 @@ class PlayState extends MusicBeatState dad.x += 150; dad.y += 360; camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); + case 'spirit': + dad.x -= 150; + dad.y += 100; + camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); } boyfriend = new Boyfriend(770, 450, SONG.player1); - add(boyfriend); // REPOSITIONING PER STAGE switch (curStage) @@ -507,12 +579,29 @@ class PlayState extends MusicBeatState boyfriend.x += 320; dad.y -= 80; case 'school': + boyfriend.x += 200; + boyfriend.y += 220; + gf.x += 180; + gf.y += 300; + case 'schoolEvil': + // trailArea.scrollFactor.set(); + + var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); + // evilTrail.changeValuesEnabled(false, false, false, false); + // evilTrail.changeGraphic() + add(evilTrail); + // evilTrail.scrollFactor.set(1.1, 1.1); + boyfriend.x += 200; boyfriend.y += 220; gf.x += 180; gf.y += 300; } + add(gf); + add(dad); + add(boyfriend); + var doof:DialogueBox = new DialogueBox(false, dialogue); // doof.x += 70; // doof.y = FlxG.height * 0.5; @@ -702,6 +791,11 @@ class PlayState extends MusicBeatState 'weeb/pixelUI/set-pixel.png', 'weeb/pixelUI/date-pixel.png' ]); + introAssets.set('schoolEvil', [ + 'weeb/pixelUI/ready-pixel.png', + 'weeb/pixelUI/set-pixel.png', + 'weeb/pixelUI/date-pixel.png' + ]); var introAlts:Array = introAssets.get('default'); var altSuffix:String = ""; @@ -725,7 +819,7 @@ class PlayState extends MusicBeatState ready.scrollFactor.set(); ready.updateHitbox(); - if (curStage == 'school') + if (curStage.startsWith('school')) ready.setGraphicSize(Std.int(ready.width * daPixelZoom)); ready.screenCenter(); @@ -742,7 +836,7 @@ class PlayState extends MusicBeatState var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[1]); set.scrollFactor.set(); - if (curStage == 'school') + if (curStage.startsWith('school')) set.setGraphicSize(Std.int(set.width * daPixelZoom)); set.screenCenter(); @@ -759,7 +853,7 @@ class PlayState extends MusicBeatState var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[2]); go.scrollFactor.set(); - if (curStage == 'school') + if (curStage.startsWith('school')) go.setGraphicSize(Std.int(go.width * daPixelZoom)); go.updateHitbox(); @@ -945,6 +1039,43 @@ class PlayState extends MusicBeatState babyArrow.animation.add('confirm', [12, 16], 24, false); } + case 'schoolEvil': + // ALL THIS IS COPY PASTED CUZ IM LAZY + + babyArrow.loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17); + babyArrow.animation.add('green', [6]); + babyArrow.animation.add('red', [7]); + babyArrow.animation.add('blue', [5]); + babyArrow.animation.add('purplel', [4]); + + babyArrow.setGraphicSize(Std.int(babyArrow.width * daPixelZoom)); + babyArrow.updateHitbox(); + babyArrow.antialiasing = false; + + switch (Math.abs(i)) + { + case 2: + babyArrow.x += Note.swagWidth * 2; + babyArrow.animation.add('static', [2]); + babyArrow.animation.add('pressed', [6, 10], 12, false); + babyArrow.animation.add('confirm', [14, 18], 12, false); + case 3: + babyArrow.x += Note.swagWidth * 3; + 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: babyArrow.frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); babyArrow.animation.addByPrefix('green', 'arrowUP'); @@ -1082,7 +1213,6 @@ class PlayState extends MusicBeatState trainFrameTiming = 0; } } - // phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed; } @@ -1214,6 +1344,9 @@ class PlayState extends MusicBeatState case 'school': camFollow.x = boyfriend.getMidpoint().x - 200; camFollow.y = boyfriend.getMidpoint().y - 200; + case 'schoolEvil': + camFollow.x = boyfriend.getMidpoint().x - 200; + camFollow.y = boyfriend.getMidpoint().y - 200; } if (SONG.song.toLowerCase() == 'tutorial') @@ -1507,7 +1640,7 @@ class PlayState extends MusicBeatState var pixelShitPart1:String = ""; var pixelShitPart2:String = ''; - if (curStage == 'school') + if (curStage.startsWith('school')) { pixelShitPart1 = 'weeb/pixelUI/'; pixelShitPart2 = '-pixel'; @@ -1530,7 +1663,7 @@ class PlayState extends MusicBeatState comboSpr.velocity.x += FlxG.random.int(1, 10); add(rating); - if (curStage != 'school') + if (!curStage.startsWith('school')) { rating.setGraphicSize(Std.int(rating.width * 0.7)); rating.antialiasing = true; @@ -1560,7 +1693,7 @@ class PlayState extends MusicBeatState numScore.x = coolText.x + (43 * daLoop) - 90; numScore.y += 80; - if (curStage != 'school') + if (!curStage.startsWith('school')) { numScore.antialiasing = true; numScore.setGraphicSize(Std.int(numScore.width * 0.5)); @@ -1795,7 +1928,7 @@ class PlayState extends MusicBeatState spr.animation.play('static'); } - if (spr.animation.curAnim.name == 'confirm' && curStage != 'school') + if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) { spr.centerOffsets(); spr.offset.x -= 13; @@ -2029,6 +2162,7 @@ class PlayState extends MusicBeatState override function beatHit() { + wiggleShit.update(Conductor.crochet); super.beatHit(); if (generatedMusic) diff --git a/source/WiggleEffect.hx b/source/WiggleEffect.hx new file mode 100644 index 000000000..ac2bd3bbf --- /dev/null +++ b/source/WiggleEffect.hx @@ -0,0 +1,133 @@ +package; + +// STOLEN FROM HAXEFLIXEL DEMO LOL +import flixel.system.FlxAssets.FlxShader; + +enum WiggleEffectType +{ + DREAMY; + WAVY; + HEAT_WAVE_HORIZONTAL; + HEAT_WAVE_VERTICAL; + FLAG; +} + +class WiggleEffect +{ + public var shader(default, null):WiggleShader = new WiggleShader(); + public var effectType(default, set):WiggleEffectType = DREAMY; + public var waveSpeed(default, set):Float = 0; + public var waveFrequency(default, set):Float = 0; + public var waveAmplitude(default, set):Float = 0; + + public function new():Void + { + shader.uTime.value = [0]; + } + + public function update(elapsed:Float):Void + { + shader.uTime.value[0] += elapsed; + } + + function set_effectType(v:WiggleEffectType):WiggleEffectType + { + effectType = v; + shader.effectType.value = [WiggleEffectType.getConstructors().indexOf(Std.string(v))]; + return v; + } + + function set_waveSpeed(v:Float):Float + { + waveSpeed = v; + shader.uSpeed.value = [waveSpeed]; + return v; + } + + function set_waveFrequency(v:Float):Float + { + waveFrequency = v; + shader.uFrequency.value = [waveFrequency]; + return v; + } + + function set_waveAmplitude(v:Float):Float + { + waveAmplitude = v; + shader.uWaveAmplitude.value = [waveAmplitude]; + return v; + } +} + +class WiggleShader extends FlxShader +{ + @:glFragmentSource(' + #pragma header + //uniform float tx, ty; // x,y waves phase + uniform float uTime; + + const int EFFECT_TYPE_DREAMY = 0; + const int EFFECT_TYPE_WAVY = 1; + const int EFFECT_TYPE_HEAT_WAVE_HORIZONTAL = 2; + const int EFFECT_TYPE_HEAT_WAVE_VERTICAL = 3; + const int EFFECT_TYPE_FLAG = 4; + + uniform int effectType; + + /** + * How fast the waves move over time + */ + uniform float uSpeed; + + /** + * Number of waves over time + */ + uniform float uFrequency; + + /** + * How much the pixels are going to stretch over the waves + */ + uniform float uWaveAmplitude; + + vec2 sineWave(vec2 pt) + { + float x = 0.0; + float y = 0.0; + + if (effectType == EFFECT_TYPE_DREAMY) + { + float offsetX = sin(pt.y * uFrequency + uTime * uSpeed) * uWaveAmplitude; + pt.x += offsetX; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving + } + else if (effectType == EFFECT_TYPE_WAVY) + { + float offsetY = sin(pt.x * uFrequency + uTime * uSpeed) * uWaveAmplitude; + pt.y += offsetY; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving + } + else if (effectType == EFFECT_TYPE_HEAT_WAVE_HORIZONTAL) + { + x = sin(pt.x * uFrequency + uTime * uSpeed) * uWaveAmplitude; + } + else if (effectType == EFFECT_TYPE_HEAT_WAVE_VERTICAL) + { + y = sin(pt.y * uFrequency + uTime * uSpeed) * uWaveAmplitude; + } + else if (effectType == EFFECT_TYPE_FLAG) + { + y = sin(pt.y * uFrequency + 10.0 * pt.x + uTime * uSpeed) * uWaveAmplitude; + x = sin(pt.x * uFrequency + 5.0 * pt.y + uTime * uSpeed) * uWaveAmplitude; + } + + return vec2(pt.x + x, pt.y + y); + } + + void main() + { + vec2 uv = sineWave(openfl_TextureCoordv); + gl_FragColor = texture2D(bitmap, uv); + }') + public function new() + { + super(); + } +} From 385097941c1a41f220f995bd7dcab8e53afca75f Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 02:20:14 -0500 Subject: [PATCH 80/86] idk campaign menu shit --- source/MainMenuState.hx | 2 +- source/MenuCharacter.hx | 1 + source/MenuItem.hx | 1 + source/StoryMenuState.hx | 51 +++++++++++++++++++++++++++++++++------- 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 02e40438e..e1a1db228 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -22,7 +22,7 @@ class MainMenuState extends MusicBeatState var menuItems:FlxTypedGroup; #if !switch - var optionShit:Array = ['story mode', 'freeplay', 'donate', 'options']; + var optionShit:Array = ['story mode', 'freeplay', 'donate']; #else var optionShit:Array = ['story mode', 'freeplay']; #end diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index f40d8d412..c8d50134d 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -24,6 +24,7 @@ class MenuCharacter extends FlxSprite animation.addByPrefix('pico', "Pico Idle Dance", 24); animation.addByPrefix('mom', "Mom Idle BLACK LINES", 24); animation.addByPrefix('parents-christmas', "Parent Christmas Idle", 24); + animation.addByPrefix('senpai', "SENPAI idle Black Lines", 24); // Parent Christmas Idle animation.play(character); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 1429303ff..431e8ac77 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -25,6 +25,7 @@ class MenuItem extends FlxSpriteGroup week.animation.addByPrefix('week3', "Week 3 press", 24); week.animation.addByPrefix('week4', "Week 4 press", 24); week.animation.addByPrefix('week5', "week 5", 24); + week.animation.addByPrefix('week6', "Week 6", 24); add(week); week.animation.play('week' + weekNum); diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 3331a54c5..d5787c526 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -24,11 +24,12 @@ class StoryMenuState extends MusicBeatState ['Spookeez', 'South'], ['Pico', 'Philly', "Blammed"], ['Satin-Panties', "High", "Milf"], - ['Cocoa', 'Eggnog', 'Winter-Horrorland'] + ['Cocoa', 'Eggnog', 'Winter-Horrorland'], + ['Senpai', 'Roses', 'Thorns'] ]; var curDifficulty:Int = 1; - public static var weekUnlocked:Array = [true, true, true, true, true, true]; + public static var weekUnlocked:Array = [true, true, true, true, true, true, true]; var weekCharacters:Array = [ ['dad', 'bf', 'gf'], @@ -36,8 +37,22 @@ class StoryMenuState extends MusicBeatState ['spooky', 'bf', 'gf'], ['pico', 'bf', 'gf'], ['mom', 'bf', 'gf'], - ['parents-christmas', 'bf', 'gf'] + ['parents-christmas', 'bf', 'gf'], + ['senpai', 'bf', 'gf'] ]; + + var weekNames:Array = [ + "", + "Daddy Dearest", + "Spooky Month", + "PICO", + "MOMMY MUST MURDER", + "RED SNOW", + "hating simulator ft. moawling" + ]; + + var txtWeekTitle:FlxText; + var curWeek:Int = 0; var txtTracklist:FlxText; @@ -65,6 +80,10 @@ class StoryMenuState extends MusicBeatState scoreText = new FlxText(10, 10, 0, "SCORE: 49324858", 36); scoreText.setFormat("VCR OSD Mono", 32); + txtWeekTitle = new FlxText(FlxG.width * 0.7, 10, 0, "", 32); + txtWeekTitle.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, RIGHT); + txtWeekTitle.alpha = 0.7; + var rankText:FlxText = new FlxText(0, 10); rankText.text = 'RANK: GREAT'; rankText.setFormat("assets/fonts/vcr.ttf", 32); @@ -132,11 +151,8 @@ class StoryMenuState extends MusicBeatState weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.5)); weekCharacterThing.updateHitbox(); case 'pico': - weekCharacterThing.y += 170; weekCharacterThing.flipX = true; - weekCharacterThing.x -= 40; case 'parents-christmas': - weekCharacterThing.x -= 600; weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.9)); weekCharacterThing.updateHitbox(); } @@ -185,6 +201,7 @@ class StoryMenuState extends MusicBeatState add(txtTracklist); // add(rankText); add(scoreText); + add(txtWeekTitle); updateText(); @@ -199,6 +216,10 @@ class StoryMenuState extends MusicBeatState lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.5)); scoreText.text = "WEEK SCORE:" + lerpScore; + + txtWeekTitle.text = weekNames[curWeek].toUpperCase(); + txtWeekTitle.x = FlxG.width - (txtWeekTitle.width + 10); + // FlxG.watch.addQuick('font', scoreText.font); difficultySelectors.visible = weekUnlocked[curWeek]; @@ -375,11 +396,23 @@ class StoryMenuState extends MusicBeatState switch (grpWeekCharacters.members[0].animation.curAnim.name) { case 'parents-christmas': - grpWeekCharacters.members[0].offset.x = 250; - grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 0.97)); + grpWeekCharacters.members[0].offset.set(200, 200); + grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 0.99)); + + case 'senpai': + grpWeekCharacters.members[0].offset.set(130, 0); + grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 1.4)); + + case 'mom': + grpWeekCharacters.members[0].offset.set(100, 200); + grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 1)); + + case 'dad': + grpWeekCharacters.members[0].offset.set(120, 200); + grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 1)); default: - grpWeekCharacters.members[0].offset.x = 100; + grpWeekCharacters.members[0].offset.set(100, 100); grpWeekCharacters.members[0].setGraphicSize(Std.int(grpWeekCharacters.members[0].width * 1)); // grpWeekCharacters.members[0].updateHitbox(); } From 60c4367896b42a637cac05b16544e2a857972a42 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 02:35:35 -0500 Subject: [PATCH 81/86] lil dating sim things --- source/DialogueBox.hx | 2 +- source/PlayState.hx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 2dbd53e2d..f8dbfe647 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -130,7 +130,7 @@ class DialogueBox extends FlxSpriteGroup dialogueStarted = true; } - if (FlxG.keys.justPressed.SPACE) + if (FlxG.keys.justPressed.ANY) { remove(dialogue); diff --git a/source/PlayState.hx b/source/PlayState.hx index b669a034a..94e397790 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -116,6 +116,8 @@ class PlayState extends MusicBeatState // how big to stretch the pixel art assets public static var daPixelZoom:Float = 6; + var inCutscene:Bool = false; + override public function create() { // var gameCam:FlxCamera = FlxG.camera; @@ -753,6 +755,7 @@ class PlayState extends MusicBeatState { if (dialogueBox != null) { + inCutscene = true; add(dialogueBox); } else @@ -768,6 +771,8 @@ class PlayState extends MusicBeatState function startCountdown():Void { + inCutscene = false; + generateStaticArrows(0); generateStaticArrows(1); @@ -1512,7 +1517,8 @@ class PlayState extends MusicBeatState }); } - keyShit(); + if (!inCutscene) + keyShit(); // if (FlxG.keys.justPressed.ONE) // endSong(); From cddb67d984c3805cef2739dd61990ac6f3034bb2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 03:24:34 -0500 Subject: [PATCH 82/86] background girls --- source/BackgroundGirls.hx | 10 ++++++++++ source/Character.hx | 18 ++++++++++++++++++ source/HealthIcon.hx | 1 + source/PlayState.hx | 10 ++++++++++ 4 files changed, 39 insertions(+) diff --git a/source/BackgroundGirls.hx b/source/BackgroundGirls.hx index c15e88e10..57739fbea 100644 --- a/source/BackgroundGirls.hx +++ b/source/BackgroundGirls.hx @@ -9,14 +9,24 @@ class BackgroundGirls extends FlxSprite { super(x, y); + // BG fangirls dissuaded frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/bgFreaks.png', 'assets/images/weeb/bgFreaks.xml'); + animation.addByIndices('danceLeft', 'BG girls group', CoolUtil.numberArray(14), "", 24, false); animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false); + animation.play('danceLeft'); } var danceDir:Bool = false; + public function getScared():Void + { + animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false); + animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false); + dance(); + } + public function dance():Void { danceDir = !danceDir; diff --git a/source/Character.hx b/source/Character.hx index aa4b63d2b..cb0ef26f0 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -420,6 +420,24 @@ class Character extends FlxSprite setGraphicSize(Std.int(width * 6)); updateHitbox(); + antialiasing = false; + case 'senpai-angry': + frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpai.png', 'assets/images/weeb/senpai.xml'); + animation.addByPrefix('idle', 'Angry Senpai Idle', 24, false); + animation.addByPrefix('singUP', 'Angry Senpai UP NOTE', 24, false); + animation.addByPrefix('singLEFT', 'Angry Senpai LEFT NOTE', 24, false); + animation.addByPrefix('singRIGHT', 'Angry Senpai RIGHT NOTE', 24, false); + animation.addByPrefix('singDOWN', 'Angry Senpai DOWN NOTE', 24, false); + + addOffset('idle'); + addOffset("singUP", 5, 37); + addOffset("singRIGHT"); + addOffset("singLEFT", 40); + addOffset("singDOWN", 14); + + setGraphicSize(Std.int(width * 6)); + updateHitbox(); + antialiasing = false; case 'spirit': diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index c5cbee60d..b9810e95c 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -22,6 +22,7 @@ class HealthIcon extends FlxSprite animation.add('face', [10, 11], 0, false, isPlayer); animation.add('dad', [12, 13], 0, false, isPlayer); animation.add('senpai', [22, 22], 0, false, isPlayer); + animation.add('senpai-angry', [22, 22], 0, false, isPlayer); animation.add('spirit', [23, 23], 0, false, isPlayer); animation.add('bf-old', [14, 15], 0, false, isPlayer); animation.add('gf', [16], 0, false, isPlayer); diff --git a/source/PlayState.hx b/source/PlayState.hx index 94e397790..7693f6dcb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -402,6 +402,9 @@ class PlayState extends MusicBeatState bgGirls = new BackgroundGirls(-100, 190); bgGirls.scrollFactor.set(0.9, 0.9); + if (SONG.song.toLowerCase() == 'roses') + bgGirls.getScared(); + bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); bgGirls.updateHitbox(); add(bgGirls); @@ -556,6 +559,10 @@ class PlayState extends MusicBeatState dad.x += 150; dad.y += 360; camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); + case 'senpai-angry': + dad.x += 150; + dad.y += 360; + camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); case 'spirit': dad.x -= 150; dad.y += 100; @@ -1325,6 +1332,9 @@ class PlayState extends MusicBeatState case 'senpai': camFollow.y = dad.getMidpoint().y - 430; camFollow.x = dad.getMidpoint().x - 100; + case 'senpai-angry': + camFollow.y = dad.getMidpoint().y - 430; + camFollow.x = dad.getMidpoint().x - 100; } if (dad.curCharacter == 'mom') From 518ee235d19878fd9e4363bdcc1d24c0c365c5ce Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 04:13:28 -0500 Subject: [PATCH 83/86] section shit --- source/Character.hx | 18 +++++++++++++++--- source/PlayState.hx | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index cb0ef26f0..821c92898 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -251,8 +251,6 @@ class Character extends FlxSprite animation.addByPrefix('singUPmiss', 'pico Up note miss', 24); animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); - playAnim('idle'); - addOffset('idle'); addOffset("singUP", -29, 27); addOffset("singRIGHT", -68, -7); @@ -302,6 +300,8 @@ class Character extends FlxSprite addOffset('deathConfirm', 37, 69); addOffset('scared', -4); + playAnim('idle'); + flipX = true; case 'bf-christmas': @@ -329,6 +329,8 @@ class Character extends FlxSprite addOffset("singDOWNmiss", -11, -19); addOffset("hey", 7, 4); + playAnim('idle'); + flipX = true; case 'bf-car': var tex = FlxAtlasFrames.fromSparrow('assets/images/bfCar.png', 'assets/images/bfCar.xml'); @@ -352,6 +354,7 @@ class Character extends FlxSprite addOffset("singRIGHTmiss", -30, 21); addOffset("singLEFTmiss", 12, 24); addOffset("singDOWNmiss", -11, -19); + playAnim('idle'); flipX = true; case 'bf-pixel': @@ -379,6 +382,8 @@ class Character extends FlxSprite setGraphicSize(Std.int(width * 6)); updateHitbox(); + playAnim('idle'); + width -= 100; height -= 100; @@ -417,6 +422,8 @@ class Character extends FlxSprite addOffset("singLEFT", 40); addOffset("singDOWN", 14); + playAnim('idle'); + setGraphicSize(Std.int(width * 6)); updateHitbox(); @@ -434,6 +441,7 @@ class Character extends FlxSprite addOffset("singRIGHT"); addOffset("singLEFT", 40); addOffset("singDOWN", 14); + playAnim('idle'); setGraphicSize(Std.int(width * 6)); updateHitbox(); @@ -485,9 +493,11 @@ class Character extends FlxSprite addOffset("singRIGHT-alt", -1, -24); addOffset("singLEFT-alt", -30, 15); addOffset("singDOWN-alt", -30, -27); + + playAnim('idle'); } - playAnim('singUP'); + dance(); if (isPlayer) { @@ -618,6 +628,8 @@ class Character extends FlxSprite { offset.set(daOffset[0], daOffset[1]); } + else + offset.set(0, 0); if (curCharacter == 'gf') { diff --git a/source/PlayState.hx b/source/PlayState.hx index 7693f6dcb..a65f9da6e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -16,6 +16,7 @@ import flixel.addons.effects.FlxTrail; import flixel.addons.effects.FlxTrailArea; import flixel.addons.effects.chainable.FlxEffectSprite; import flixel.addons.effects.chainable.FlxWaveEffect; +import flixel.addons.transition.FlxTransitionableState; import flixel.graphics.atlas.FlxAtlas; import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup.FlxTypedGroup; @@ -64,6 +65,9 @@ class PlayState extends MusicBeatState private var curSection:Int = 0; private var camFollow:FlxObject; + + private static var prevCamFollow:FlxObject; + private var strumLineNotes:FlxTypedGroup; private var playerStrums:FlxTypedGroup; @@ -403,7 +407,9 @@ class PlayState extends MusicBeatState bgGirls.scrollFactor.set(0.9, 0.9); if (SONG.song.toLowerCase() == 'roses') + { bgGirls.getScared(); + } bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); bgGirls.updateHitbox(); @@ -636,6 +642,13 @@ class PlayState extends MusicBeatState camFollow = new FlxObject(0, 0, 1, 1); camFollow.setPosition(camPos.x, camPos.y); + + if (prevCamFollow != null) + { + camFollow = prevCamFollow; + prevCamFollow = null; + } + add(camFollow); FlxG.camera.follow(camFollow, LOCKON, 0.04); @@ -750,6 +763,9 @@ class PlayState extends MusicBeatState black.scrollFactor.set(); add(black); + if (isStoryMode && SONG.song.toLowerCase() == 'roses') + remove(black); + new FlxTimer().start(0.3, function(tmr:FlxTimer) { black.alpha -= 0.15; @@ -1530,8 +1546,10 @@ class PlayState extends MusicBeatState if (!inCutscene) keyShit(); - // if (FlxG.keys.justPressed.ONE) - // endSong(); + #if debug + if (FlxG.keys.justPressed.ONE) + endSong(); + #end } function endSong():Void @@ -1594,10 +1612,20 @@ class PlayState extends MusicBeatState FlxG.sound.play('assets/sounds/Lights_Shut_off' + TitleState.soundExt); } + if (SONG.song.toLowerCase() == 'senpai') + { + transIn = null; + transOut = null; + prevCamFollow = camFollow; + } + PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]); FlxG.sound.music.stop(); FlxG.switchState(new PlayState()); + + transIn = FlxTransitionableState.defaultTransIn; + transOut = FlxTransitionableState.defaultTransOut; } } else From b0af2f66807c169d1af740944f318b0f087eb110 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 04:54:36 -0500 Subject: [PATCH 84/86] IM PISSED IM MAD BUT WE CLOSE --- source/DialogueBox.hx | 57 +++++++++++++++++++++++++++++++++++++------ source/PlayState.hx | 7 ++++++ 2 files changed, 57 insertions(+), 7 deletions(-) diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index f8dbfe647..62c1cb1f5 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -7,6 +7,7 @@ import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxSpriteGroup; import flixel.input.FlxKeyManager; import flixel.text.FlxText; +import flixel.util.FlxColor; import flixel.util.FlxTimer; using StringTools; @@ -37,8 +38,15 @@ class DialogueBox extends FlxSpriteGroup { super(); - FlxG.sound.playMusic('assets/music/Lunchbox' + TitleState.soundExt, 0); - FlxG.sound.music.fadeIn(1, 0, 0.8); + switch (PlayState.SONG.song.toLowerCase()) + { + case 'senpai': + FlxG.sound.playMusic('assets/music/Lunchbox' + TitleState.soundExt, 0); + FlxG.sound.music.fadeIn(1, 0, 0.8); + case 'thorns': + FlxG.sound.playMusic('assets/music/LunchboxScary' + TitleState.soundExt, 0); + FlxG.sound.music.fadeIn(1, 0, 0.8); + } bgFade = new FlxSprite(-200, -200).makeGraphic(Std.int(FlxG.width * 1.3), Std.int(FlxG.height * 1.3), 0xFFB3DFd8); bgFade.scrollFactor.set(); @@ -71,9 +79,32 @@ class DialogueBox extends FlxSpriteGroup portraitRight.visible = false; box = new FlxSprite(-20, 45); - box.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/pixelUI/dialogueBox-pixel.png', 'assets/images/weeb/pixelUI/dialogueBox-pixel.xml'); - box.animation.addByPrefix('normalOpen', 'Text Box Appear', 24, false); - box.animation.addByIndices('normal', 'Text Box Appear', [4], "", 24); + + switch (PlayState.SONG.song.toLowerCase()) + { + case 'senpai': + box.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/pixelUI/dialogueBox-pixel.png', + 'assets/images/weeb/pixelUI/dialogueBox-pixel.xml'); + box.animation.addByPrefix('normalOpen', 'Text Box Appear', 24, false); + box.animation.addByIndices('normal', 'Text Box Appear', [4], "", 24); + case 'roses': + FlxG.sound.play('assets/sounds/ANGRY_TEXT_BOX' + TitleState.soundExt); + + box.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/pixelUI/dialogueBox-senpaiMad.png', + 'assets/images/weeb/pixelUI/dialogueBox-senpaiMad.xml'); + box.animation.addByPrefix('normalOpen', 'SENPAI ANGRY IMPACT SPEECH', 24, false); + box.animation.addByIndices('normal', 'SENPAI ANGRY IMPACT SPEECH', [4], "", 24); + + case 'thorns': + box.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/pixelUI/dialogueBox-evil.png', 'assets/images/weeb/pixelUI/dialogueBox-evil.xml'); + box.animation.addByPrefix('normalOpen', 'Spirit Textbox spawn', 24, false); + box.animation.addByIndices('normal', 'Spirit Textbox spawn', [11], "", 24); + + var face:FlxSprite = new FlxSprite(180, 170).loadGraphic('assets/images/weeb/spiritFaceForward.png'); + face.setGraphicSize(Std.int(face.width * 6)); + add(face); + } + box.animation.play('normalOpen'); box.setGraphicSize(Std.int(box.width * PlayState.daPixelZoom * 0.9)); box.updateHitbox(); @@ -87,7 +118,7 @@ class DialogueBox extends FlxSpriteGroup if (!talkingRight) { - box.flipX = true; + // box.flipX = true; } dropText = new FlxText(242, 502, Std.int(FlxG.width * 0.6), "", 32); @@ -113,6 +144,16 @@ class DialogueBox extends FlxSpriteGroup override function update(elapsed:Float) { + // HARD CODING CUZ IM STUPDI + if (PlayState.SONG.song.toLowerCase() == 'roses') + portraitLeft.visible = false; + if (PlayState.SONG.song.toLowerCase() == 'thorns') + { + portraitLeft.color = FlxColor.BLACK; + swagDialogue.color = FlxColor.WHITE; + dropText.color = FlxColor.BLACK; + } + dropText.text = swagDialogue.text; if (box.animation.curAnim != null) @@ -141,7 +182,9 @@ class DialogueBox extends FlxSpriteGroup if (!isEnding) { isEnding = true; - FlxG.sound.music.fadeOut(2.2, 0); + + if (PlayState.SONG.song.toLowerCase() == 'senpai' || PlayState.SONG.song.toLowerCase() == 'thorns') + FlxG.sound.music.fadeOut(2.2, 0); new FlxTimer().start(0.2, function(tmr:FlxTimer) { diff --git a/source/PlayState.hx b/source/PlayState.hx index a65f9da6e..1e27b93d9 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -165,6 +165,8 @@ class PlayState extends MusicBeatState dialogue = CoolUtil.coolTextFile('assets/data/senpai/senpaiDialogue.txt'); case 'roses': dialogue = CoolUtil.coolTextFile('assets/data/roses/rosesDialogue.txt'); + case 'thorns': + dialogue = CoolUtil.coolTextFile('assets/data/thorns/thornsDialogue.txt'); } if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') @@ -736,6 +738,9 @@ class PlayState extends MusicBeatState case 'senpai': schoolIntro(doof); case 'roses': + FlxG.sound.play('assets/sounds/ANGRY' + TitleState.soundExt); + schoolIntro(doof); + case 'thorns': schoolIntro(doof); default: startCountdown(); @@ -749,6 +754,8 @@ class PlayState extends MusicBeatState schoolIntro(doof); case 'roses': schoolIntro(doof); + case 'thorns': + schoolIntro(doof); default: startCountdown(); } From b8b5bb888883ff5283271efaaf2acdc09306b24d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 05:46:17 -0500 Subject: [PATCH 85/86] RELEASE --- Project.xml | 2 +- source/DialogueBox.hx | 2 +- source/GameOverSubstate.hx | 3 ++ source/PlayState.hx | 61 +++++++++++++++++++++++++++++++++----- 4 files changed, 58 insertions(+), 10 deletions(-) diff --git a/Project.xml b/Project.xml index 80c962c90..498368897 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 62c1cb1f5..f9c443952 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -100,7 +100,7 @@ class DialogueBox extends FlxSpriteGroup box.animation.addByPrefix('normalOpen', 'Spirit Textbox spawn', 24, false); box.animation.addByIndices('normal', 'Spirit Textbox spawn', [11], "", 24); - var face:FlxSprite = new FlxSprite(180, 170).loadGraphic('assets/images/weeb/spiritFaceForward.png'); + var face:FlxSprite = new FlxSprite(320, 170).loadGraphic('assets/images/weeb/spiritFaceForward.png'); face.setGraphicSize(Std.int(face.width * 6)); add(face); } diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 6a40b591f..eacd66880 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -23,6 +23,9 @@ class GameOverSubstate extends MusicBeatSubstate case 'school': stageSuffix = '-pixel'; daBf = 'bf-pixel-dead'; + case 'school-evil': + stageSuffix = '-pixel'; + daBf = 'bf-pixel-dead'; default: daBf = 'bf'; } diff --git a/source/PlayState.hx b/source/PlayState.hx index 1e27b93d9..cc869e5de 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -750,12 +750,6 @@ class PlayState extends MusicBeatState { switch (curSong.toLowerCase()) { - case 'senpai': - schoolIntro(doof); - case 'roses': - schoolIntro(doof); - case 'thorns': - schoolIntro(doof); default: startCountdown(); } @@ -770,9 +764,26 @@ class PlayState extends MusicBeatState black.scrollFactor.set(); add(black); - if (isStoryMode && SONG.song.toLowerCase() == 'roses') + var red:FlxSprite = new FlxSprite(-100, -100).makeGraphic(FlxG.width * 2, FlxG.height * 2, 0xFFff1b31); + red.scrollFactor.set(); + + var senpaiEvil:FlxSprite = new FlxSprite(); + senpaiEvil.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpaiCrazy.png', 'assets/images/weeb/senpaiCrazy.xml'); + senpaiEvil.animation.addByPrefix('idle', 'Senpai Pre Explosion', 24, false); + senpaiEvil.setGraphicSize(Std.int(senpaiEvil.width * 6)); + senpaiEvil.updateHitbox(); + senpaiEvil.screenCenter(); + + if (SONG.song.toLowerCase() == 'roses' || SONG.song.toLowerCase() == 'thorns') + { remove(black); + if (SONG.song.toLowerCase() == 'thorns') + { + add(red); + } + } + new FlxTimer().start(0.3, function(tmr:FlxTimer) { black.alpha -= 0.15; @@ -786,7 +797,41 @@ class PlayState extends MusicBeatState if (dialogueBox != null) { inCutscene = true; - add(dialogueBox); + + if (SONG.song.toLowerCase() == 'thorns') + { + add(senpaiEvil); + senpaiEvil.alpha = 0; + new FlxTimer().start(0.3, function(swagTimer:FlxTimer) + { + senpaiEvil.alpha += 0.15; + if (senpaiEvil.alpha < 1) + { + swagTimer.reset(); + } + else + { + senpaiEvil.animation.play('idle'); + FlxG.sound.play('assets/sounds/Senpai_Dies' + TitleState.soundExt, 1, false, null, true, function() + { + remove(senpaiEvil); + remove(red); + FlxG.camera.fade(FlxColor.WHITE, 0.01, true, function() + { + add(dialogueBox); + }, true); + }); + new FlxTimer().start(3.2, function(deadTime:FlxTimer) + { + FlxG.camera.fade(FlxColor.WHITE, 1.6, false); + }); + } + }); + } + else + { + add(dialogueBox); + } } else startCountdown(); From 7abd7c5c2e086c4469d07566a70ffc2f84f2779d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Feb 2021 08:04:54 -0500 Subject: [PATCH 86/86] merge lol!! --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 41927c759..8b70997e2 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,6 @@ IF YOU WANT TO COMPILE THE GAME YOURSELF, CONTINUE READING!!! First you need to install Haxe and HaxeFlixel. I'm too lazy to write and keep updated with that setup (which is pretty simple). The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documentation/getting-started/) -<<<<<<< HEAD -That should give you HaxeFlixel and all of it's setup and shit. If you run into issues INSTALLING FLIXEL, ask them in the #flixel channel in the Haxe Discord server: https://discord.gg/5ybrNNWx9S - -======= ->>>>>>> b64a14af64424954a704712c977754049eb544cc Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. ```