diff --git a/CHANGELOG.md b/CHANGELOG.md index cc5d7fa84..5efcd3d6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,15 @@ 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 +- TANKMAN! 3 NEW SONGS BY KAWAISPRITE (UGH, GUNS, STRESS)! Charting help by MtH! +- Monster added into week 2, FINALLY (Charting help by MtH and ChaoticGamer!) +- Can now change song difficulty mid-game. +- Shows some song info on pause screen. +- Cute little icons onto freeplay menu ### Changed - ASSET LOADING OVERHAUL, WAY FASTER LOAD TIMES ON WEB!!! (THANKS TO GEOKURELI WOKE KING) +- Made difficulty selector on freeplay menu more apparent ### Fixed - That one random note on Bopeebo diff --git a/source/BGSprite.hx b/source/BGSprite.hx new file mode 100644 index 000000000..6af1fadd6 --- /dev/null +++ b/source/BGSprite.hx @@ -0,0 +1,19 @@ +package; + +import flixel.FlxSprite; + +class BGSprite extends FlxSprite +{ + /** + Cool lil utility thing just so that it can easy do antialiasing and scrollfactor bullshit + */ + public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1) + { + super(x, y); + + loadGraphic(Paths.image(image)); + scrollFactor.set(parX, parY); + antialiasing = true; + active = false; + } +} diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index df6807160..2e3d98c50 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -219,9 +219,6 @@ class FreeplayState extends MusicBeatState if (accepted) { var poop:String = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty); - - trace(poop); - PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase()); PlayState.isStoryMode = false; PlayState.storyDifficulty = curDifficulty; diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index e5ccbed04..c340d8ed2 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -17,7 +17,10 @@ class PauseSubState extends MusicBeatSubstate { var grpMenuShit:FlxTypedGroup; - var menuItems:Array = ['Resume', 'Restart Song', 'Exit to menu']; + var pauseOG:Array = ['Resume', 'Restart Song', 'Change Difficulty', 'Exit to menu']; + var difficultyChoices:Array = ['EASY', 'NORMAL', 'HARD', 'BACK']; + + var menuItems:Array = []; var curSelected:Int = 0; var pauseMusic:FlxSound; @@ -26,6 +29,8 @@ class PauseSubState extends MusicBeatSubstate { super(); + menuItems = pauseOG; + pauseMusic = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true); pauseMusic.volume = 0; pauseMusic.play(false, FlxG.random.int(0, Std.int(pauseMusic.length / 2))); @@ -74,6 +79,19 @@ class PauseSubState extends MusicBeatSubstate grpMenuShit = new FlxTypedGroup(); add(grpMenuShit); + regenMenu(); + + cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]]; + } + + private function regenMenu():Void + { + grpMenuShit.forEachAlive(function(thing:Alphabet) + { + grpMenuShit.remove(thing); + thing.destroy(); + }); + for (i in 0...menuItems.length) { var songText:Alphabet = new Alphabet(0, (70 * i) + 30, menuItems[i], true, false); @@ -82,9 +100,8 @@ class PauseSubState extends MusicBeatSubstate grpMenuShit.add(songText); } + curSelected = 0; changeSelection(); - - cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]]; } override function update(elapsed:Float) @@ -115,10 +132,24 @@ class PauseSubState extends MusicBeatSubstate { case "Resume": close(); + case "EASY" | 'NORMAL' | "HARD": + PlayState.SONG = Song.loadFromJson(Highscore.formatSong(PlayState.SONG.song.toLowerCase(), curSelected), + PlayState.SONG.song.toLowerCase()); + + PlayState.storyDifficulty = curSelected; + + FlxG.resetState(); + + case 'Change Difficulty': + menuItems = difficultyChoices; + regenMenu(); + case 'BACK': + menuItems = pauseOG; + regenMenu(); case "Restart Song": FlxG.resetState(); case "Exit to menu": - PlayState.deathCounter += 1; + PlayState.deathCounter = 0; FlxG.switchState(new MainMenuState()); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index ffa3e1edb..9f17da0c0 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -174,7 +174,7 @@ class PlayState extends MusicBeatState dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue')); } - switch (Song.song.toLowerCase()) + switch (SONG.song.toLowerCase()) { case 'spookeez' | 'monster' | 'south': curStage = "spooky"; @@ -469,13 +469,36 @@ class PlayState extends MusicBeatState add(waveSpriteFG); */ + case 'guns' | 'stress' | 'ugh': + // defaultCamZoom = 0.9; + curStage = 'tank'; + + var bg:BGSprite = new BGSprite('tankSky', 0, -200, 0, 0); + add(bg); + + var tankSky:BGSprite = new BGSprite('tankClouds', 0, 10, 0.1, 0.1); + add(tankSky); + + var tankMountains:BGSprite = new BGSprite('tankMountains', -100, 150, 0.2, 0.2); + add(tankMountains); + + var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 370, 0.25, 0.25); + add(tankBuildings); + + var tankRuins:BGSprite = new BGSprite('tankRuins', -200, 170, 0.35, 0.35); + add(tankRuins); + + var tankWatchtower:BGSprite = new BGSprite('tankWatchtower', 300, 50, 0.5, 0.5); + add(tankWatchtower); + + var tankGround:BGSprite = new BGSprite('tankGround', -400, -20); + add(tankGround); + default: defaultCamZoom = 0.9; curStage = 'stage'; - var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback')); - bg.antialiasing = true; - bg.scrollFactor.set(0.9, 0.9); - bg.active = false; + + var bg:BGSprite = new BGSprite('stageback', -600, -200, 0.9, 0.9); add(bg); var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));