From f1a7dbb93574e8cf557422859255a64bec97e5b3 Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Tue, 14 Sep 2021 14:28:29 -0400 Subject: [PATCH 01/42] Upgrade Haxe to latest (4.2.3). --- .github/workflows/linux.yml | 2 +- appveyor-macos.yml | 4 ++-- appveyor-windows.yml | 2 +- docs/building.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 782667bbfe0..f92db42dcc9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.1.5 + haxe-version: 4.2.3 # Runs a set of commands using the runners shell - name: script run line haha run: | diff --git a/appveyor-macos.yml b/appveyor-macos.yml index 5631ed61bb3..5712dda2aba 100644 --- a/appveyor-macos.yml +++ b/appveyor-macos.yml @@ -10,9 +10,9 @@ install: - brew install neko - brew install gnu-tar - brew install wget - - wget "https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-osx.tar.gz" + - wget "https://github.com/HaxeFoundation/haxe/releases/download/4.2.3/haxe-4.2.3-osx.tar.gz" - mkdir $HAXE_INSTALLDIR - - tar -xf haxe-4.1.5-osx.tar.gz -C $HAXE_INSTALLDIR + - tar -xf haxe-4.2.3-osx.tar.gz -C $HAXE_INSTALLDIR - export PATH=$PATH:$HAXE_INSTALLDIR/haxe_20201231082044_5e33a78aa - mkdir $HAXELIB_ROOT && haxelib setup $HAXELIB_ROOT - haxelib install lime 7.9.0 diff --git a/appveyor-windows.yml b/appveyor-windows.yml index 1ac5d6c3e71..e51dfca793c 100644 --- a/appveyor-windows.yml +++ b/appveyor-windows.yml @@ -11,7 +11,7 @@ install: # Install the neko chocolatey package (https://chocolatey.org/packages/neko) - cinst neko --version 2.3.0 -y # Install the haxe chocolatey package (https://chocolatey.org/packages/haxe) - - cinst haxe --version 4.1.5 -y + - cinst haxe --version 4.2.3 -y - RefreshEnv # Setup haxelib - mkdir "%HAXELIB_ROOT%" diff --git a/docs/building.md b/docs/building.md index 53c9928d678..b4f1333aefd 100644 --- a/docs/building.md +++ b/docs/building.md @@ -7,13 +7,13 @@ **Also also note**: To build for *Windows*, you need to be on *Windows*. To build for *Linux*, you need to be on *Linux*. Same goes for macOS. You can build for html5/browsers on any platform. ## Dependencies - 1. [Install Haxe 4.1.5](https://haxe.org/download/version/4.1.5/). You should use 4.1.5 instead of the latest version because the latest version has some problems with Friday Night Funkin': Kade Engine. + 1. [Install Haxe](https://haxe.org/download/). You should use the latest version. 2. After installing Haxe, [Install HaxeFlixel](https://haxeflixel.com/documentation/install-haxeflixel/). 3. Install `git`. - Windows: install from the [git-scm](https://git-scm.com/downloads) website. - Linux: install the `git` package: `sudo apt install git` (ubuntu), `sudo pacman -S git` (arch), etc... (you probably already have it) 4. Install and set up the necessary libraries: - - `haxelib install lime 7.9.0` + - `haxelib install lime` - `haxelib install openfl` - `haxelib install flixel` - `haxelib run lime setup` From 7a59700a037db60c5811456a441c5ab81abd957e Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Tue, 14 Sep 2021 14:40:35 -0400 Subject: [PATCH 02/42] Missed some spots. --- .github/workflows/html5.yml | 2 +- .github/workflows/windows.yml | 4 +-- .vscode/tasks.json | 48 ++++++++++++++++++++++++++++++++--- appveyor-linux.yml | 4 +-- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.github/workflows/html5.yml b/.github/workflows/html5.yml index a606a366a4b..863626f0c78 100644 --- a/.github/workflows/html5.yml +++ b/.github/workflows/html5.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.1.5 + haxe-version: 4.2.3 # Runs a set of commands using the runners shell - name: script run line haha run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a837f5116e9..64ee348ae7b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,11 +18,11 @@ jobs: - uses: actions/checkout@v2 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.1.5 + haxe-version: 4.2.3 # Runs a set of commands using the runners shell - name: script run line haha run: | - cinst haxe --version 4.1.5 -y + cinst haxe --version 4.2.3 -y RefreshEnv mkdir "%HAXELIB_ROOT%" haxelib setup "%HAXELIB_ROOT%" diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 012d4d784b8..0341aacc834 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -21,6 +21,26 @@ "isDefault": true } }, + { + "label": "Build Linux (Debug)", + "type": "lime", + "targetConfiguration": "Build Linux (Debug)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Linux (Release)", + "type": "lime", + "targetConfiguration": "Build Linux (Release)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, { "label": "Build HTML5 (Debug)", "type": "lime", @@ -42,9 +62,9 @@ } }, { - "label": "Build Linux (Debug)", + "label": "Build Windows (Neko Debug)", "type": "lime", - "targetConfiguration": "Build Linux (Debug)", + "targetConfiguration": "Build Neko (Debug)", "command": "build", "group": { "kind": "build", @@ -52,9 +72,29 @@ } }, { - "label": "Build Linux (Release)", + "label": "Build Windows (Neko Release)", "type": "lime", - "targetConfiguration": "Build Linux (Release)", + "targetConfiguration": "Build Windows (Neko Release)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Windows (Hashlink Debug)", + "type": "lime", + "targetConfiguration": "Build Hashlink (Debug)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Windows (Hashlink Release)", + "type": "lime", + "targetConfiguration": "Build Hashlink (Release)", "command": "build", "group": { "kind": "build", diff --git a/appveyor-linux.yml b/appveyor-linux.yml index 2e8404a6a49..e6819893bf0 100644 --- a/appveyor-linux.yml +++ b/appveyor-linux.yml @@ -10,9 +10,9 @@ install: - sudo add-apt-repository ppa:haxe/releases -y - sudo apt update - sudo apt install neko tar gcc-7 g++-7 gcc-7-multilib g++-7-multilib -y - - wget https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-linux64.tar.gz + - wget https://github.com/HaxeFoundation/haxe/releases/download/4.2.3/haxe-4.2.3-linux64.tar.gz - mkdir $HAXE_INSTALLDIR - - tar -xf haxe-4.1.5-linux64.tar.gz -C $HAXE_INSTALLDIR + - tar -xf haxe-4.2.3-linux64.tar.gz -C $HAXE_INSTALLDIR - export PATH=$PATH:$HAXE_INSTALLDIR/haxe_20201231082044_5e33a78aa - mkdir $HAXELIB_ROOT && haxelib setup $HAXELIB_ROOT - haxelib install lime 7.9.0 From 42863632d0da65eb864412743da67cb22d26ade2 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Oct 2021 19:54:34 -0700 Subject: [PATCH 03/42] Add flip, scale, and antialiasing to character data --- assets/preload/data/characters/bf.json | 80 ++++++++++++++++ .../preload/data/characters/senpai-angry.json | 33 +++++++ assets/preload/data/characters/senpai.json | 33 +++++++ assets/shared/images/characters/bfOffsets.txt | 14 --- .../images/characters/senpai-angryOffsets.txt | 5 - .../images/characters/senpaiOffsets.txt | 5 - source/Character.hx | 91 ++++++------------- 7 files changed, 172 insertions(+), 89 deletions(-) create mode 100644 assets/preload/data/characters/bf.json create mode 100644 assets/preload/data/characters/senpai-angry.json create mode 100644 assets/preload/data/characters/senpai.json delete mode 100644 assets/shared/images/characters/bfOffsets.txt delete mode 100644 assets/shared/images/characters/senpai-angryOffsets.txt delete mode 100644 assets/shared/images/characters/senpaiOffsets.txt diff --git a/assets/preload/data/characters/bf.json b/assets/preload/data/characters/bf.json new file mode 100644 index 00000000000..154d08e4594 --- /dev/null +++ b/assets/preload/data/characters/bf.json @@ -0,0 +1,80 @@ +{ + "name": "Boyfriend", + "asset": "characters/BOYFRIEND", + "barColor": "#31B0D1", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF idle dance", + "offsets": [-5, 0] + }, + { + "name": "singUP", + "prefix": "BF NOTE UP0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "BF NOTE LEFT0", + "offsets": [12, -6] + }, + { + "name": "singRIGHT", + "prefix": "BF NOTE RIGHT0", + "offsets": [-38, -7] + }, + { + "name": "singDOWN", + "prefix": "BF NOTE DOWN0", + "offsets": [-10, -50] + }, + { + "name": "singUPmiss", + "prefix": "BF NOTE UP MISS", + "offsets": [-29, 27] + }, + { + "name": "singLEFTmiss", + "prefix": "BF NOTE LEFT MISS", + "offsets": [12, 24] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF NOTE RIGHT MISS", + "offsets": [-30, 21] + }, + { + "name": "singDOWNmiss", + "prefix": "BF NOTE DOWN MISS", + "offsets": [-11, -19] + }, + { + "name": "hey", + "prefix": "BF HEY", + "offsets": [7, 4] + }, + { + "name": "firstDeath", + "prefix": "BF dies", + "offsets": [37, 11] + }, + { + "name": "deathLoop", + "prefix": "BF Dead Loop", + "offsets": [37, 5] + }, + { + "name": "deathConfirm", + "prefix": "BF Dead confirm", + "offsets": [37, 69] + }, + { + "name": "scared", + "prefix": "BF idle shaking", + "offsets": [-4, 0], + "looped": true + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/senpai-angry.json b/assets/preload/data/characters/senpai-angry.json new file mode 100644 index 00000000000..9e5659a6321 --- /dev/null +++ b/assets/preload/data/characters/senpai-angry.json @@ -0,0 +1,33 @@ +{ + "name": "Senpai (Angry)", + "asset": "characters/senpai", + "barColor": "#FFAA6F", + "scale": 6, + "antialiasing": false, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Angry Senpai Idle" + }, + { + "name": "singUP", + "prefix": "Angry Senpai UP NOTE", + "offsets": [5, 37] + }, + { + "name": "singLEFT", + "prefix": "Angry Senpai LEFT NOTE", + "offsets": [40, 0] + }, + { + "name": "singRIGHT", + "prefix": "Angry Senpai RIGHT NOTE" + }, + { + "name": "singDOWN", + "prefix": "Angry Senpai DOWN NOTE", + "offsets": [14, 0] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/senpai.json b/assets/preload/data/characters/senpai.json new file mode 100644 index 00000000000..0717276834e --- /dev/null +++ b/assets/preload/data/characters/senpai.json @@ -0,0 +1,33 @@ +{ + "name": "Senpai", + "asset": "characters/senpai", + "barColor": "#FFAA6F", + "scale": 6, + "antialiasing": false, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Senpai Idle" + }, + { + "name": "singUP", + "prefix": "SENPAI UP NOTE", + "offsets": [5, 37] + }, + { + "name": "singLEFT", + "prefix": "SENPAI LEFT NOTE", + "offsets": [40, 0] + }, + { + "name": "singRIGHT", + "prefix": "SENPAI RIGHT NOTE" + }, + { + "name": "singDOWN", + "prefix": "SENPAI DOWN NOTE", + "offsets": [14, 0] + } + ] +} \ No newline at end of file diff --git a/assets/shared/images/characters/bfOffsets.txt b/assets/shared/images/characters/bfOffsets.txt deleted file mode 100644 index 6ec23219082..00000000000 --- a/assets/shared/images/characters/bfOffsets.txt +++ /dev/null @@ -1,14 +0,0 @@ -idle -5 0 -singUP -29 27 -singRIGHT -38 -7 -singLEFT 12 -6 -singDOWN -10 -50 -singUPmiss -29 27 -singRIGHTmiss -30 21 -singLEFTmiss 12 24 -singDOWNmiss -11 -19 -hey 7 4 -firstDeath 37 11 -deathLoop 37 5 -deathConfirm 37 69 -scared -4 0 diff --git a/assets/shared/images/characters/senpai-angryOffsets.txt b/assets/shared/images/characters/senpai-angryOffsets.txt deleted file mode 100644 index c11825906ec..00000000000 --- a/assets/shared/images/characters/senpai-angryOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP 5 37 -singRIGHT 0 0 -singLEFT 40 0 -singDOWN 14 0 diff --git a/assets/shared/images/characters/senpaiOffsets.txt b/assets/shared/images/characters/senpaiOffsets.txt deleted file mode 100644 index c11825906ec..00000000000 --- a/assets/shared/images/characters/senpaiOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP 5 37 -singRIGHT 0 0 -singLEFT 40 0 -singDOWN 14 0 diff --git a/source/Character.hx b/source/Character.hx index 9e1a83e7390..47384c61858 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -202,37 +202,6 @@ class Character extends FlxSprite flipX = true; - case 'bf': - var tex = Paths.getSparrowAtlas('BOYFRIEND', 'shared', true); - frames = tex; - - trace(tex.frames.length); - - animation.addByPrefix('idle', 'BF idle dance', 24, false); - animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); - animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); - animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); - animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); - animation.addByPrefix('hey', 'BF HEY', 24, false); - - animation.addByPrefix('firstDeath', "BF dies", 24, false); - animation.addByPrefix('deathLoop', "BF Dead Loop", 24, false); - animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false); - - animation.addByPrefix('scared', 'BF idle shaking', 24); - - loadOffsetFile(curCharacter); - - playAnim('idle'); - - barColor = 0xFF31b0d1; - - flipX = true; - case 'bf-christmas': var tex = Paths.getSparrowAtlas('bfChristmas', 'shared', true); frames = tex; @@ -317,40 +286,6 @@ class Character extends FlxSprite barColor = 0xFF31b0d1; - case 'senpai': - frames = Paths.getSparrowAtlas('senpai', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - barColor = 0xFFffaa6f; - - playAnim('idle'); - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - antialiasing = false; - case 'senpai-angry': - frames = Paths.getSparrowAtlas('senpai', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - barColor = 0xFFffaa6f; - playAnim('idle'); - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - antialiasing = false; - case 'spirit': frames = Paths.getPackerAtlas('spirit', 'shared', true); animation.addByPrefix('idle', "idle spirit_", 24, false); @@ -453,6 +388,14 @@ class Character extends FlxSprite animOffsets[anim.name] = anim.offsets == null ? [0, 0] : anim.offsets; } + flipX = data.flipX == null ? false : data.flipX; + + setGraphicSize(Std.int(width * (data.scale == null ? 1 : data.scale))); + + updateHitbox(); + + antialiasing = data.antialiasing == null ? FlxG.save.data.antialiasing : data.antialiasing; + barColor = FlxColor.fromString(data.barColor); playAnim(data.startingAnim); @@ -621,6 +564,24 @@ typedef CharacterData = var barColor:String; var animations:Array; + + /** + * Whether this character is flipped horizontally. + * @default false + */ + var ?flipX:Bool; + + /** + * The scale of this character. + * @default 1 + */ + var ?scale:Int; + + /** + * Whether this character has antialiasing. + * @default true + */ + var ?antialiasing:Bool; } typedef AnimationData = From 2e3f85be336916c2ecaaf722410a2306ac1f1e98 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Oct 2021 20:33:01 -0700 Subject: [PATCH 04/42] Transfer most characters over to the new format --- assets/preload/data/characters/bf-car.json | 61 +++++ .../preload/data/characters/bf-christmas.json | 59 +++++ .../data/characters/bf-pixel-dead.json | 26 ++ assets/preload/data/characters/dad.json | 41 +++ assets/preload/data/characters/gf-car.json | 26 ++ .../preload/data/characters/gf-christmas.json | 70 +++++ assets/preload/data/characters/gf-pixel.json | 22 ++ assets/preload/data/characters/mom-car.json | 40 +++ assets/preload/data/characters/mom.json | 41 +++ .../data/characters/monster-christmas.json | 33 +++ assets/preload/data/characters/monster.json | 33 +++ .../data/characters/parents-christmas.json | 61 +++++ assets/preload/data/characters/pico.json | 54 ++++ .../preload/data/characters/senpai-angry.json | 6 +- assets/preload/data/characters/senpai.json | 6 +- assets/preload/data/characters/spooky.json | 42 +++ .../images/characters/bf-carOffsets.txt | 10 - .../images/characters/bf-christmasOffsets.txt | 10 - .../characters/bf-pixel-deadOffsets.txt | 3 - .../shared/images/characters/dadOffsets.txt | 6 - .../images/characters/gf-carOffsets.txt | 3 - .../images/characters/gf-christmasOffsets.txt | 11 - .../images/characters/gf-pixelOffsets.txt | 2 - .../images/characters/mom-carOffsets.txt | 6 - .../shared/images/characters/momOffsets.txt | 6 - .../characters/monster-christmasOffsets.txt | 5 - .../images/characters/monsterOffsets.txt | 5 - .../characters/parents-christmasOffsets.txt | 10 - .../shared/images/characters/picoOffsets.txt | 9 - .../images/characters/spookyOffsets.txt | 6 - source/Character.hx | 241 ------------------ 31 files changed, 617 insertions(+), 337 deletions(-) create mode 100644 assets/preload/data/characters/bf-car.json create mode 100644 assets/preload/data/characters/bf-christmas.json create mode 100644 assets/preload/data/characters/bf-pixel-dead.json create mode 100644 assets/preload/data/characters/dad.json create mode 100644 assets/preload/data/characters/gf-car.json create mode 100644 assets/preload/data/characters/gf-christmas.json create mode 100644 assets/preload/data/characters/gf-pixel.json create mode 100644 assets/preload/data/characters/mom-car.json create mode 100644 assets/preload/data/characters/mom.json create mode 100644 assets/preload/data/characters/monster-christmas.json create mode 100644 assets/preload/data/characters/monster.json create mode 100644 assets/preload/data/characters/parents-christmas.json create mode 100644 assets/preload/data/characters/pico.json create mode 100644 assets/preload/data/characters/spooky.json delete mode 100644 assets/shared/images/characters/bf-carOffsets.txt delete mode 100644 assets/shared/images/characters/bf-christmasOffsets.txt delete mode 100644 assets/shared/images/characters/bf-pixel-deadOffsets.txt delete mode 100644 assets/shared/images/characters/dadOffsets.txt delete mode 100644 assets/shared/images/characters/gf-carOffsets.txt delete mode 100644 assets/shared/images/characters/gf-christmasOffsets.txt delete mode 100644 assets/shared/images/characters/gf-pixelOffsets.txt delete mode 100644 assets/shared/images/characters/mom-carOffsets.txt delete mode 100644 assets/shared/images/characters/momOffsets.txt delete mode 100644 assets/shared/images/characters/monster-christmasOffsets.txt delete mode 100644 assets/shared/images/characters/monsterOffsets.txt delete mode 100644 assets/shared/images/characters/parents-christmasOffsets.txt delete mode 100644 assets/shared/images/characters/picoOffsets.txt delete mode 100644 assets/shared/images/characters/spookyOffsets.txt diff --git a/assets/preload/data/characters/bf-car.json b/assets/preload/data/characters/bf-car.json new file mode 100644 index 00000000000..587bfcdb4c3 --- /dev/null +++ b/assets/preload/data/characters/bf-car.json @@ -0,0 +1,61 @@ +{ + "name": "Boyfriend (Car)", + "asset": "characters/bfCar", + "barColor": "#31B0D1", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF idle dance", + "offsets": [-5, 0] + }, + { + "name": "idleHair", + "prefix": "BF idle dance", + "offsets": [-5, 0], + "frameIndices": [10, 11, 12, 13], + "looped": true + }, + { + "name": "singUP", + "prefix": "BF NOTE UP0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "BF NOTE LEFT0", + "offsets": [12, -6] + }, + { + "name": "singRIGHT", + "prefix": "BF NOTE RIGHT0", + "offsets": [-38, -7] + }, + { + "name": "singDOWN", + "prefix": "BF NOTE DOWN0", + "offsets": [-10, -50] + }, + { + "name": "singUPmiss", + "prefix": "BF NOTE UP MISS", + "offsets": [-29, 27] + }, + { + "name": "singLEFTmiss", + "prefix": "BF NOTE LEFT MISS", + "offsets": [12, 24] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF NOTE RIGHT MISS", + "offsets": [-30, 21] + }, + { + "name": "singDOWNmiss", + "prefix": "BF NOTE DOWN MISS", + "offsets": [-11, -19] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/bf-christmas.json b/assets/preload/data/characters/bf-christmas.json new file mode 100644 index 00000000000..13e6ab76302 --- /dev/null +++ b/assets/preload/data/characters/bf-christmas.json @@ -0,0 +1,59 @@ +{ + "name": "Boyfriend (Christmas)", + "asset": "characters/bfChristmas", + "barColor": "#31B0D1", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF idle dance", + "offsets": [-5, 0] + }, + { + "name": "singUP", + "prefix": "BF NOTE UP0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "BF NOTE LEFT0", + "offsets": [12, -6] + }, + { + "name": "singRIGHT", + "prefix": "BF NOTE RIGHT0", + "offsets": [-38, -7] + }, + { + "name": "singDOWN", + "prefix": "BF NOTE DOWN0", + "offsets": [-10, -50] + }, + { + "name": "singUPmiss", + "prefix": "BF NOTE UP MISS", + "offsets": [-29, 27] + }, + { + "name": "singLEFTmiss", + "prefix": "BF NOTE LEFT MISS", + "offsets": [12, 24] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF NOTE RIGHT MISS", + "offsets": [-30, 21] + }, + { + "name": "singDOWNmiss", + "prefix": "BF NOTE DOWN MISS", + "offsets": [-11, -19] + }, + { + "name": "hey", + "prefix": "BF HEY", + "offsets": [7, 4] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/bf-pixel-dead.json b/assets/preload/data/characters/bf-pixel-dead.json new file mode 100644 index 00000000000..c905c1450d4 --- /dev/null +++ b/assets/preload/data/characters/bf-pixel-dead.json @@ -0,0 +1,26 @@ +{ + "name": "Boyfriend (Pixel Day) (Game Over)", + "asset": "characters/bfPixelsDEAD", + "barColor": "#31B0D1", + "flipX": true, + "scale": 6, + "antialiasing": false, + "startingAnim": "firstDeath", + "animations": [ + { + "name": "firstDeath", + "prefix": "BF Dies pixel", + "offsets": [0, 0] + }, + { + "name": "deathLoop", + "prefix": "Retry Loop", + "offsets": [-30, -12] + }, + { + "name": "deathConfirm", + "prefix": "RETRY CONFIRM", + "offsets": [-30, -12] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/dad.json b/assets/preload/data/characters/dad.json new file mode 100644 index 00000000000..1e4fa12db20 --- /dev/null +++ b/assets/preload/data/characters/dad.json @@ -0,0 +1,41 @@ +{ + "name": "Daddy Dearest", + "asset": "characters/DADDY_DEAREST", + "barColor": "#AF66CE", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Dad idle dance", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Dad idle dance", + "offsets": [0, 0], + "frameIndices": [11, 12], + "frameRate": 12, + "looped": true + }, + { + "name": "singUP", + "prefix": "Dad Sing Note UP", + "offsets": [-6, 50] + }, + { + "name": "singLEFT", + "prefix": "Dad Sing Note LEFT", + "offsets": [-10, 10] + }, + { + "name": "singRIGHT", + "prefix": "Dad Sing Note RIGHT", + "offsets": [0, 27] + }, + { + "name": "singDOWN", + "prefix": "Dad Sing Note DOWN", + "offsets": [0, -30] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf-car.json b/assets/preload/data/characters/gf-car.json new file mode 100644 index 00000000000..5dde9d38de3 --- /dev/null +++ b/assets/preload/data/characters/gf-car.json @@ -0,0 +1,26 @@ +{ + "name": "Girlfriend (Car)", + "asset": "characters/gfCar", + "barColor": "#A5004D", + "startingAnim": "danceRight", + "animations": [ + { + "name": "danceLeft", + "prefix": "GF Dancing Beat Hair blowing CAR", + "offsets": [0, 0], + "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + }, + { + "name": "danceRight", + "prefix": "GF Dancing Beat Hair blowing CAR", + "offsets": [0, 0], + "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + }, + { + "name": "idleHair", + "prefix": "GF Dancing Beat Hair blowing CAR", + "offsets": [0, 0], + "frameIndices": [10, 11, 12, 25, 26, 27] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json new file mode 100644 index 00000000000..758f9033ff3 --- /dev/null +++ b/assets/preload/data/characters/gf-christmas.json @@ -0,0 +1,70 @@ +{ + "name": "Girlfriend (Christmas)", + "asset": "characters/gfChristmas", + "barColor": "#A5004D", + "startingAnim": "danceRight", + "animations": [ + { + "name": "singLEFT", + "prefix": "GF left note", + "offsets": [0, -19] + }, + { + "name": "singRIGHT", + "prefix": "GF Right Note", + "offsets": [0, -20] + }, + { + "name": "singUP", + "prefix": "GF Up Note", + "offsets": [0, 4] + }, + { + "name": "singDOWN", + "prefix": "GF Down Note", + "offsets": [0, -20] + }, + { + "name": "danceLeft", + "prefix": "GF Dancing Beat", + "offsets": [0, -9], + "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + }, + { + "name": "danceRight", + "prefix": "GF Dancing Beat", + "offsets": [0, -9], + "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + }, + { + "name": "cheer", + "prefix": "GF Cheer", + "offsets": [0, 0] + }, + { + "name": "hairBlow", + "prefix": "GF Dancing Beat Hair blowing", + "offsets": [45, -8], + "frameIndices": [0, 1, 2, 3], + "looped": true + }, + { + "name": "hairFall", + "prefix": "GF Dancing Beat Hair Landing", + "offsets": [0, -9], + "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "sad", + "prefix": "gf sad", + "offsets": [-2, -21], + "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + }, + { + "name": "scared", + "prefix": "GF FEAR", + "offsets": [-2, -17], + "looped": true + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf-pixel.json b/assets/preload/data/characters/gf-pixel.json new file mode 100644 index 00000000000..158071f436e --- /dev/null +++ b/assets/preload/data/characters/gf-pixel.json @@ -0,0 +1,22 @@ +{ + "name": "Girlfriend (Pixel Day)", + "asset": "characters/gfPixel", + "barColor": "#A5004D", + "scale": 6, + "antialiasing": false, + "startingAnim": "danceRight", + "animations": [ + { + "name": "danceLeft", + "prefix": "GF IDLE", + "offsets": [0, 0], + "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + }, + { + "name": "danceRight", + "prefix": "GF IDLE", + "offsets": [0, 0], + "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/mom-car.json b/assets/preload/data/characters/mom-car.json new file mode 100644 index 00000000000..efa323c2db0 --- /dev/null +++ b/assets/preload/data/characters/mom-car.json @@ -0,0 +1,40 @@ +{ + "name": "Mommy Mearest (Car)", + "asset": "characters/momCar", + "barColor": "#D8558E", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Mom Idle", + "offsets": [0, 0] + }, + { + "name": "idleHair", + "prefix": "Mom Idle", + "offsets": [0, 0], + "frameIndices": [10, 11, 12, 13], + "looped": true + }, + { + "name": "singUP", + "prefix": "Mom Up Pose", + "offsets": [14, 71] + }, + { + "name": "singLEFT", + "prefix": "Mom Left Pose", + "offsets": [250, -23] + }, + { + "name": "singRIGHT", + "prefix": "Mom Pose Left", + "offsets": [10, -60] + }, + { + "name": "singDOWN", + "prefix": "MOM DOWN POSE", + "offsets": [20, -160] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/mom.json b/assets/preload/data/characters/mom.json new file mode 100644 index 00000000000..c1e687fd274 --- /dev/null +++ b/assets/preload/data/characters/mom.json @@ -0,0 +1,41 @@ +{ + "name": "Mommy Mearest", + "asset": "characters/Mom_Assets", + "barColor": "#D8558E", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Mom Idle", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Mom Idle", + "offsets": [0, 0], + "frameIndices": [11, 12], + "frameRate": 12, + "looped": true + }, + { + "name": "singUP", + "prefix": "Mom Up Pose", + "offsets": [14, 71] + }, + { + "name": "singLEFT", + "prefix": "Mom Left Pose", + "offsets": [250, -23] + }, + { + "name": "singRIGHT", + "prefix": "Mom Pose Left", + "offsets": [10, -60] + }, + { + "name": "singDOWN", + "prefix": "MOM DOWN POSE", + "offsets": [20, -160] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/monster-christmas.json b/assets/preload/data/characters/monster-christmas.json new file mode 100644 index 00000000000..bf04e4c3934 --- /dev/null +++ b/assets/preload/data/characters/monster-christmas.json @@ -0,0 +1,33 @@ +{ + "name": "Monster (Christmas)", + "asset": "characters/monsterChristmas", + "barColor": "#F3FF6E", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "monster idle", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "monster up note", + "offsets": [-20, 50] + }, + { + "name": "singLEFT", + "prefix": "Monster left note", + "offsets": [-30, 0] + }, + { + "name": "singRIGHT", + "prefix": "Monster Right note", + "offsets": [-51, 0] + }, + { + "name": "singDOWN", + "prefix": "monster down", + "offsets": [-40, -94] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/monster.json b/assets/preload/data/characters/monster.json new file mode 100644 index 00000000000..b45f4de57ae --- /dev/null +++ b/assets/preload/data/characters/monster.json @@ -0,0 +1,33 @@ +{ + "name": "Monster", + "asset": "characters/Monster_Assets", + "barColor": "#F3FF6E", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "monster idle", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "monster up note", + "offsets": [-20, 94] + }, + { + "name": "singLEFT", + "prefix": "Monster left note", + "offsets": [-30, 20] + }, + { + "name": "singRIGHT", + "prefix": "Monster Right note", + "offsets": [-51, 30] + }, + { + "name": "singDOWN", + "prefix": "monster down", + "offsets": [-50, -80] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/parents-christmas.json b/assets/preload/data/characters/parents-christmas.json new file mode 100644 index 00000000000..98555c3f922 --- /dev/null +++ b/assets/preload/data/characters/parents-christmas.json @@ -0,0 +1,61 @@ +{ + "name": "Parents (Christmas)", + "asset": "characters/mom_dad_christmas_assets", + "barColor": "#9A00F8", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Parent Christmas Idle", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Parent Christmas Idle", + "offsets": [0, 0], + "frameIndices": [11, 12], + "frameRate": 12, + "looped": true + }, + { + "name": "singUP", + "prefix": "Parent Up Note Dad", + "offsets": [-47, 24] + }, + { + "name": "singLEFT", + "prefix": "Parent Left Note Dad", + "offsets": [-30, 16] + }, + { + "name": "singRIGHT", + "prefix": "Parent Right Note Dad", + "offsets": [-1, -23] + }, + { + "name": "singDOWN", + "prefix": "Parent Down Note Dad", + "offsets": [-31, -29] + }, + { + "name": "singUP-alt", + "prefix": "Parent Up Note Mom", + "offsets": [-47, 24] + }, + { + "name": "singLEFT-alt", + "prefix": "Parent Left Note Mom", + "offsets": [-30, 15] + }, + { + "name": "singRIGHT-alt", + "prefix": "Parent Right Note Mom", + "offsets": [-1, -24] + }, + { + "name": "singDOWN-alt", + "prefix": "Parent Down Note Mom", + "offsets": [-30, -27] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/pico.json b/assets/preload/data/characters/pico.json new file mode 100644 index 00000000000..3df92860cc3 --- /dev/null +++ b/assets/preload/data/characters/pico.json @@ -0,0 +1,54 @@ +{ + "name": "Pico", + "asset": "characters/Pico_FNF_assetss", + "barColor": "#B7D855", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Pico Idle Dance", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "pico Up note0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "Pico Note Right0", + "offsets": [65, 9] + }, + { + "name": "singRIGHT", + "prefix": "Pico NOTE LEFT0", + "offsets": [-68, -7] + }, + { + "name": "singDOWN", + "prefix": "Pico Down Note0", + "offsets": [200, -70] + }, + { + "name": "singUPmiss", + "prefix": "pico Up note miss", + "offsets": [-19, 67] + }, + { + "name": "singLEFTmiss", + "prefix": "Pico Note Right Miss", + "offsets": [62, 64] + }, + { + "name": "singRIGHTmiss", + "prefix": "Pico NOTE LEFT miss", + "offsets": [-60, 41] + }, + { + "name": "singDOWNmiss", + "prefix": "Pico Down Note MISS", + "offsets": [210, -28] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/senpai-angry.json b/assets/preload/data/characters/senpai-angry.json index 9e5659a6321..5821c135dcf 100644 --- a/assets/preload/data/characters/senpai-angry.json +++ b/assets/preload/data/characters/senpai-angry.json @@ -8,7 +8,8 @@ "animations": [ { "name": "idle", - "prefix": "Angry Senpai Idle" + "prefix": "Angry Senpai Idle", + "offsets": [0, 0] }, { "name": "singUP", @@ -22,7 +23,8 @@ }, { "name": "singRIGHT", - "prefix": "Angry Senpai RIGHT NOTE" + "prefix": "Angry Senpai RIGHT NOTE", + "offsets": [0, 0] }, { "name": "singDOWN", diff --git a/assets/preload/data/characters/senpai.json b/assets/preload/data/characters/senpai.json index 0717276834e..61b8fbeca5e 100644 --- a/assets/preload/data/characters/senpai.json +++ b/assets/preload/data/characters/senpai.json @@ -8,7 +8,8 @@ "animations": [ { "name": "idle", - "prefix": "Senpai Idle" + "prefix": "Senpai Idle", + "offsets": [0, 0] }, { "name": "singUP", @@ -22,7 +23,8 @@ }, { "name": "singRIGHT", - "prefix": "SENPAI RIGHT NOTE" + "prefix": "SENPAI RIGHT NOTE", + "offsets": [0, 0] }, { "name": "singDOWN", diff --git a/assets/preload/data/characters/spooky.json b/assets/preload/data/characters/spooky.json new file mode 100644 index 00000000000..1fa0ce70515 --- /dev/null +++ b/assets/preload/data/characters/spooky.json @@ -0,0 +1,42 @@ +{ + "name": "Skid and Pump", + "asset": "characters/spooky_kids_assets", + "barColor": "#D57E00", + "startingAnim": "danceRight", + "animations": [ + { + "name": "danceLeft", + "prefix": "spooky dance idle", + "offsets": [0, 0], + "frameIndices": [0, 2, 6], + "frameRate": 12 + }, + { + "name": "danceRight", + "prefix": "spooky dance idle", + "offsets": [0, 0], + "frameIndices": [8, 10, 12, 14], + "frameRate": 12 + }, + { + "name": "singUP", + "prefix": "spooky UP NOTE", + "offsets": [-20, 26] + }, + { + "name": "singLEFT", + "prefix": "note sing left", + "offsets": [130, -10] + }, + { + "name": "singRIGHT", + "prefix": "spooky sing right", + "offsets": [-130, -14] + }, + { + "name": "singDOWN", + "prefix": "spooky DOWN note", + "offsets": [-50, -130] + } + ] +} \ No newline at end of file diff --git a/assets/shared/images/characters/bf-carOffsets.txt b/assets/shared/images/characters/bf-carOffsets.txt deleted file mode 100644 index bcabd1951b6..00000000000 --- a/assets/shared/images/characters/bf-carOffsets.txt +++ /dev/null @@ -1,10 +0,0 @@ -idle -5 0 -idleHair -5 0 -singUP -29 27 -singRIGHT -38 -7 -singLEFT 12 -6 -singDOWN -10 -50 -singUPmiss -29 27 -singRIGHTmiss -30 21 -singLEFTmiss 12 24 -singDOWNmiss -11 -19 diff --git a/assets/shared/images/characters/bf-christmasOffsets.txt b/assets/shared/images/characters/bf-christmasOffsets.txt deleted file mode 100644 index 01428449062..00000000000 --- a/assets/shared/images/characters/bf-christmasOffsets.txt +++ /dev/null @@ -1,10 +0,0 @@ -idle -5 0 -singUP -29 27 -singRIGHT -38 -7 -singLEFT 12 -6 -singDOWN -10 -50 -singUPmiss -29 27 -singRIGHTmiss -30 21 -singLEFTmiss 12 24 -singDOWNmiss -11 -19 -hey 7 4 diff --git a/assets/shared/images/characters/bf-pixel-deadOffsets.txt b/assets/shared/images/characters/bf-pixel-deadOffsets.txt deleted file mode 100644 index 3544a2c9cc2..00000000000 --- a/assets/shared/images/characters/bf-pixel-deadOffsets.txt +++ /dev/null @@ -1,3 +0,0 @@ -firstDeath 0 0 -deathLoop -30 -12 -deathConfirm -30 -12 diff --git a/assets/shared/images/characters/dadOffsets.txt b/assets/shared/images/characters/dadOffsets.txt deleted file mode 100644 index 87284640e35..00000000000 --- a/assets/shared/images/characters/dadOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -idle 0 0 -idleLoop 0 0 -singUP -6 50 -singRIGHT 0 27 -singLEFT -10 10 -singDOWN 0 -30 diff --git a/assets/shared/images/characters/gf-carOffsets.txt b/assets/shared/images/characters/gf-carOffsets.txt deleted file mode 100644 index 7b96a0fe9bc..00000000000 --- a/assets/shared/images/characters/gf-carOffsets.txt +++ /dev/null @@ -1,3 +0,0 @@ -idleHair 0 0 -danceLeft 0 0 -danceRight 0 0 diff --git a/assets/shared/images/characters/gf-christmasOffsets.txt b/assets/shared/images/characters/gf-christmasOffsets.txt deleted file mode 100644 index 05abb7ab842..00000000000 --- a/assets/shared/images/characters/gf-christmasOffsets.txt +++ /dev/null @@ -1,11 +0,0 @@ -cheer 0 0 -sad -2 -21 -danceLeft 0 -9 -danceRight 0 -9 -singUP 0 4 -singRIGHT 0 -20 -singLEFT 0 -19 -singDOWN 0 -20 -hairBlow 45 -8 -hairFall 0 -9 -scared -2 -17 diff --git a/assets/shared/images/characters/gf-pixelOffsets.txt b/assets/shared/images/characters/gf-pixelOffsets.txt deleted file mode 100644 index 9862aaecd78..00000000000 --- a/assets/shared/images/characters/gf-pixelOffsets.txt +++ /dev/null @@ -1,2 +0,0 @@ -danceLeft 0 0 -danceRight 0 0 diff --git a/assets/shared/images/characters/mom-carOffsets.txt b/assets/shared/images/characters/mom-carOffsets.txt deleted file mode 100644 index 1a2ecefcff0..00000000000 --- a/assets/shared/images/characters/mom-carOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -idle 0 0 -idleHair 0 0 -singUP 14 71 -singRIGHT 10 -60 -singLEFT 250 -23 -singDOWN 20 -160 diff --git a/assets/shared/images/characters/momOffsets.txt b/assets/shared/images/characters/momOffsets.txt deleted file mode 100644 index 512fcfd63da..00000000000 --- a/assets/shared/images/characters/momOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -idle 0 0 -idleLoop 0 0 -singUP 14 71 -singRIGHT 10 -60 -singLEFT 250 -23 -singDOWN 20 -160 diff --git a/assets/shared/images/characters/monster-christmasOffsets.txt b/assets/shared/images/characters/monster-christmasOffsets.txt deleted file mode 100644 index a35704617b7..00000000000 --- a/assets/shared/images/characters/monster-christmasOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP -20 50 -singRIGHT -51 0 -singLEFT -30 0 -singDOWN -40 -94 diff --git a/assets/shared/images/characters/monsterOffsets.txt b/assets/shared/images/characters/monsterOffsets.txt deleted file mode 100644 index e211a5fdfa9..00000000000 --- a/assets/shared/images/characters/monsterOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP -20 94 -singRIGHT -51 30 -singLEFT -30 20 -singDOWN -50 -80 diff --git a/assets/shared/images/characters/parents-christmasOffsets.txt b/assets/shared/images/characters/parents-christmasOffsets.txt deleted file mode 100644 index 3b4773d5a10..00000000000 --- a/assets/shared/images/characters/parents-christmasOffsets.txt +++ /dev/null @@ -1,10 +0,0 @@ -idle 0 0 -idleLoop 0 0 -singUP -47 24 -singRIGHT -1 -23 -singLEFT -30 16 -singDOWN -31 -29 -singUP-alt -47 24 -singRIGHT-alt -1 -24 -singLEFT-alt -30 15 -singDOWN-alt -30 -27 diff --git a/assets/shared/images/characters/picoOffsets.txt b/assets/shared/images/characters/picoOffsets.txt deleted file mode 100644 index e209da72357..00000000000 --- a/assets/shared/images/characters/picoOffsets.txt +++ /dev/null @@ -1,9 +0,0 @@ -idle 0 0 -singUP -29 27 -singRIGHT -68 -7 -singLEFT 65 9 -singDOWN 200 -70 -singUPmiss -19 67 -singRIGHTmiss -60 41 -singLEFTmiss 62 64 -singDOWNmiss 210 -28 diff --git a/assets/shared/images/characters/spookyOffsets.txt b/assets/shared/images/characters/spookyOffsets.txt deleted file mode 100644 index c14c5e752ee..00000000000 --- a/assets/shared/images/characters/spookyOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -danceLeft 0 0 -danceRight 0 0 -singUP -20 26 -singRIGHT -130 -14 -singLEFT 130 -10 -singDOWN -50 -130 diff --git a/source/Character.hx b/source/Character.hx index 47384c61858..90ff6dcf09c 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -35,212 +35,6 @@ class Character extends FlxSprite switch (curCharacter) { - case 'gf-christmas': - tex = Paths.getSparrowAtlas('gfChristmas', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - - playAnim('danceRight'); - - case 'gf-car': - tex = Paths.getSparrowAtlas('gfCar', 'shared', true); - 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); - animation.addByIndices('idleHair', 'GF Dancing Beat Hair blowing CAR', [10, 11, 12, 25, 26, 27], "", 24, true); - - loadOffsetFile(curCharacter); - - playAnim('danceRight'); - - case 'gf-pixel': - tex = Paths.getSparrowAtlas('gfPixel', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - - playAnim('danceRight'); - - setGraphicSize(Std.int(width * CoolUtil.daPixelZoom)); - updateHitbox(); - antialiasing = false; - - case 'dad': - // DAD ANIMATION LOADING CODE - tex = Paths.getSparrowAtlas('DADDY_DEAREST', 'shared', true); - frames = tex; - animation.addByPrefix('idle', 'Dad idle dance', 24, false); - animation.addByPrefix('singUP', 'Dad Sing Note UP', 24, false); - animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24, false); - animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24, false); - animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24, false); - animation.addByIndices('idleLoop', "Dad idle dance", [11, 12], "", 12, true); - - loadOffsetFile(curCharacter); - barColor = 0xFFaf66ce; - - playAnim('idle'); - case 'spooky': - tex = Paths.getSparrowAtlas('spooky_kids_assets', 'shared', true); - frames = tex; - animation.addByPrefix('singUP', 'spooky UP NOTE', 24, false); - animation.addByPrefix('singDOWN', 'spooky DOWN note', 24, false); - animation.addByPrefix('singLEFT', 'note sing left', 24, false); - animation.addByPrefix('singRIGHT', 'spooky sing right', 24, false); - animation.addByIndices('danceLeft', 'spooky dance idle', [0, 2, 6], "", 12, false); - animation.addByIndices('danceRight', 'spooky dance idle', [8, 10, 12, 14], "", 12, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFd57e00; - - playAnim('danceRight'); - case 'mom': - tex = Paths.getSparrowAtlas('Mom_Assets', 'shared', true); - 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); - animation.addByIndices('idleLoop', "Mom Idle", [11, 12], "", 12, true); - - loadOffsetFile(curCharacter); - barColor = 0xFFd8558e; - - playAnim('idle'); - - case 'mom-car': - tex = Paths.getSparrowAtlas('momCar', 'shared', true); - 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); - animation.addByIndices('idleHair', 'Mom Idle', [10, 11, 12, 13], "", 24, true); - - loadOffsetFile(curCharacter); - barColor = 0xFFd8558e; - - playAnim('idle'); - case 'monster': - tex = Paths.getSparrowAtlas('Monster_Assets', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - barColor = 0xFFf3ff6e; - playAnim('idle'); - case 'monster-christmas': - tex = Paths.getSparrowAtlas('monsterChristmas', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - barColor = 0xFFf3ff6e; - playAnim('idle'); - case 'pico': - tex = Paths.getSparrowAtlas('Pico_FNF_assetss', 'shared', true); - frames = tex; - animation.addByPrefix('idle', "Pico Idle Dance", 24, false); - animation.addByPrefix('singUP', 'pico Up note0', 24, false); - animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false); - if (isPlayer) - { - animation.addByPrefix('singLEFT', 'Pico NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'Pico Note Right0', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Pico Note Right Miss', 24, false); - animation.addByPrefix('singLEFTmiss', 'Pico NOTE LEFT miss', 24, false); - } - else - { - // Need to be flipped! REDO THIS LATER! - animation.addByPrefix('singLEFT', 'Pico Note Right0', 24, false); - animation.addByPrefix('singRIGHT', 'Pico NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Pico NOTE LEFT miss', 24, false); - animation.addByPrefix('singLEFTmiss', 'Pico Note Right Miss', 24, false); - } - - animation.addByPrefix('singUPmiss', 'pico Up note miss', 24); - animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); - - loadOffsetFile(curCharacter); - barColor = 0xFFb7d855; - - playAnim('idle'); - - flipX = true; - - case 'bf-christmas': - var tex = Paths.getSparrowAtlas('bfChristmas', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - - playAnim('idle'); - - flipX = true; - case 'bf-car': - var tex = Paths.getSparrowAtlas('bfCar', 'shared', true); - 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.addByIndices('idleHair', 'BF idle dance', [10, 11, 12, 13], "", 24, true); - - loadOffsetFile(curCharacter); - playAnim('idle'); - - barColor = 0xFF31b0d1; - - flipX = true; case 'bf-pixel': frames = Paths.getSparrowAtlas('bfPixel', 'shared', true); animation.addByPrefix('idle', 'BF IDLE', 24, false); @@ -268,23 +62,6 @@ class Character extends FlxSprite barColor = 0xFF31b0d1; flipX = true; - case 'bf-pixel-dead': - frames = Paths.getSparrowAtlas('bfPixelsDEAD', 'shared', true); - animation.addByPrefix('singUP', "BF Dies pixel", 24, false); - animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false); - animation.addByPrefix('deathLoop', "Retry Loop", 24, false); - animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); - animation.play('firstDeath'); - - loadOffsetFile(curCharacter); - playAnim('firstDeath'); - // pixel bullshit - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - antialiasing = false; - flipX = true; - - barColor = 0xFF31b0d1; case 'spirit': frames = Paths.getPackerAtlas('spirit', 'shared', true); @@ -304,24 +81,6 @@ class Character extends FlxSprite antialiasing = false; - case 'parents-christmas': - frames = Paths.getSparrowAtlas('mom_dad_christmas_assets', 'shared', true); - 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); - animation.addByIndices('idleLoop', "Parent Christmas Idle", [11, 12], "", 12, true); - - loadOffsetFile(curCharacter); - barColor = 0xFF9a00f8; - - playAnim('idle'); default: parseDataFile(); } From f429ecf7d5e64db2d2fb4ec20cfa13e73e3f73c5 Mon Sep 17 00:00:00 2001 From: Ishaan Sharma Date: Wed, 27 Oct 2021 17:59:18 -0400 Subject: [PATCH 05/42] Add 'round accuracy' setting Rounds accuracy to the nearest whole number in scoreTxt. --- source/KadeEngineData.hx | 3 +++ source/Options.hx | 32 ++++++++++++++++++++++++++++++++ source/OptionsMenu.hx | 1 + source/PlayState.hx | 4 ++-- 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index eedd5d560c4..ebe2232cef5 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -112,6 +112,9 @@ class KadeEngineData if (FlxG.save.data.optimize == null) FlxG.save.data.optimize = false; + if (FlxG.save.data.roundAcc == null) + FlxG.save.data.roundAcc = false; + FlxG.save.data.cacheImages = false; if (FlxG.save.data.middleScroll == null) diff --git a/source/Options.hx b/source/Options.hx index 6f16fda1842..508cc77ed8a 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -558,6 +558,35 @@ class ShitMsOption extends Option } } + +class RoundAccuracy extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function left():Bool + { + FlxG.save.data.roundAccuracy = !FlxG.save.data.roundAccuracy; + + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "Round Accuracy: < " + (FlxG.save.data.roundAccuracy ? "on" : "off") + " >"; + } +} + class CpuStrums extends Option { public function new(desc:String) @@ -586,6 +615,8 @@ class CpuStrums extends Option } } + + class GraphicLoading extends Option { public function new(desc:String) @@ -1815,6 +1846,7 @@ class ResetSettings extends Option FlxG.save.data.flashing = null; FlxG.save.data.resetButton = null; FlxG.save.data.botplay = null; + FlxG.save.data.roundAccuracy = null; FlxG.save.data.cpuStrums = null; FlxG.save.data.strumline = null; FlxG.save.data.customStrumLine = null; diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index cbb7108f155..fcfbae77ed2 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -142,6 +142,7 @@ class OptionsMenu extends FlxSubState new LaneUnderlayOption("How transparent your lane is, higher = more visible."), new StepManiaOption("Sets the colors of the arrows depending on quantization instead of direction."), new AccuracyOption("Display accuracy information on the info bar."), + new RoundAccuracy("Round your accuracy to the nearest whole number for the score text (cosmetic only)."), new SongPositionOption("Show the song's current position as a scrolling bar."), new Colour("The color behind icons now fit with their theme. (e.g. Pico = green)"), new NPSDisplayOption("Shows your current Notes Per Second on the info bar."), diff --git a/source/PlayState.hx b/source/PlayState.hx index 8dd1f29986a..34ebfd38afb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -892,7 +892,7 @@ class PlayState extends MusicBeatState scoreTxt.screenCenter(X); scoreTxt.scrollFactor.set(); scoreTxt.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, accuracy); + scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); if (!FlxG.save.data.healthBar) scoreTxt.y = healthBarBG.y; @@ -4227,7 +4227,7 @@ class PlayState extends MusicBeatState accuracy = Math.max(0, totalNotesHit / totalPlayed * 100); accuracyDefault = Math.max(0, totalNotesHitDefault / totalPlayed * 100); - scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, accuracy); + scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); judgementCounter.text = 'Sicks: ${sicks}\nGoods: ${goods}\nBads: ${bads}\nShits: ${shits}\nMisses: ${misses}'; } From 6e9d80e02ddafe6991060023a5b95885bf70f919 Mon Sep 17 00:00:00 2001 From: Ishaan Sharma Date: Wed, 27 Oct 2021 18:03:07 -0400 Subject: [PATCH 06/42] Fix roundAcc to roundAccuracy --- source/KadeEngineData.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index ebe2232cef5..b13d0d6f718 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -112,9 +112,9 @@ class KadeEngineData if (FlxG.save.data.optimize == null) FlxG.save.data.optimize = false; - if (FlxG.save.data.roundAcc == null) - FlxG.save.data.roundAcc = false; - + if (FlxG.save.data.roundAccuracy == null) + FlxG.save.data.roundAccuracy = false; + FlxG.save.data.cacheImages = false; if (FlxG.save.data.middleScroll == null) From 5daca3eba8f433b9a530b06cbe1c3cdfb56087d8 Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Fri, 29 Oct 2021 03:09:36 -0400 Subject: [PATCH 07/42] Update building.md to update Haxe to 4.2.3. --- docs/building.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index d4db8b271c6..2a8b1fbfa07 100644 --- a/docs/building.md +++ b/docs/building.md @@ -7,7 +7,9 @@ **Also also note**: To build for *Windows*, you need to be on *Windows*. To build for *Linux*, you need to be on *Linux*. Same goes for macOS. You can build for html5/browsers on any platform. ## Dependencies - 1. [Install Haxe 4.1.5](https://haxe.org/download/version/4.1.5/). You should use 4.1.5 instead of the latest version because the latest version has some problems with Friday Night Funkin': Kade Engine. + 1. [Install Haxe 4.2.3](https://haxe.org/download/). This is the latest version at the time of writing. + - 4.1.5 was originally recommended because "4.2.0 is broken and is not working with gits properly..." This was actually referring to compatibility issues with OpenFL, Lime, and HaxeFlixel, which are important libraries the game relies on. + - [ninjamuffin99 himself](https://github.com/HaxeFoundation/haxe/issues/10443#issuecomment-948958011) confirmed that these issues are long since resolved, and the latest version of Haxe is stable for development of FNF and its mods. 2. After installing Haxe, [Install HaxeFlixel](https://haxeflixel.com/documentation/install-haxeflixel/). 3. Install `git`. - Windows: install from the [git-scm](https://git-scm.com/downloads) website. From 1a65f3c5f6e940e30a01cd9b98f293f0da5d1001 Mon Sep 17 00:00:00 2001 From: KadeCS Date: Sat, 30 Oct 2021 12:53:36 -0700 Subject: [PATCH 08/42] yessir --- source/GameplayCustomizeState.hx | 4 ++-- source/KadeEngineData.hx | 3 +++ source/MainMenuState.hx | 2 +- source/MusicBeatState.hx | 2 ++ source/Note.hx | 16 +++++++------- source/Options.hx | 36 ++++++++++++++++++++++++++++++-- source/OptionsMenu.hx | 6 ++++-- source/PlayState.hx | 16 +++++++++++--- 8 files changed, 67 insertions(+), 18 deletions(-) diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 72d76b3c4ab..3bb326c440b 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -355,8 +355,8 @@ class GameplayCustomizeState extends MusicBeatState if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed) { - sick.x = (FlxG.mouse.x - (sick.width + 145)); - sick.y = (FlxG.mouse.y - (sick.height + 145)); + sick.x = (FlxG.mouse.screenX - (sick.width + 145)); + sick.y = (FlxG.mouse.screenY - (sick.height + 145)); } for (i in playerStrums) diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index b13d0d6f718..e7aa6e3efe7 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -36,6 +36,9 @@ class KadeEngineData if (FlxG.save.data.fps == null) FlxG.save.data.fps = false; + if (FlxG.save.data.rotateSprites == null) + FlxG.save.data.rotateSprites = true; + if (FlxG.save.data.changedHit == null) { FlxG.save.data.changedHitX = -1; diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 4bd5188e3d5..344a4fcdb58 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -39,7 +39,7 @@ class MainMenuState extends MusicBeatState public static var nightly:String = ""; - public static var kadeEngineVer:String = "1.8" + nightly; + public static var kadeEngineVer:String = "1.8.1" + nightly; public static var gameVer:String = "0.2.7.1"; var magenta:FlxSprite; diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index 77e952149ef..57ff33db924 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -72,6 +72,8 @@ class MusicBeatState extends FlxUIState Application.current.window.onFocusOut.add(onWindowFocusOut); TimingStruct.clearTimings(); + KeyBinds.keyCheck(); + if (transIn != null) trace('reg ' + transIn.region); diff --git a/source/Note.hx b/source/Note.hx index 45f9aa688c4..3e66441bf70 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -111,9 +111,6 @@ class Note extends FlxSprite if (this.strumTime < 0) this.strumTime = 0; - if (!inCharter) - y += FlxG.save.data.offset + PlayState.songOffset; - this.noteData = noteData; var daStage:String = ((PlayState.instance != null && !PlayStateChangeables.Optimize) ? PlayState.Stage.curStage : 'stage'); @@ -188,7 +185,7 @@ class Note extends FlxSprite animation.play(dataColor[noteData] + 'Scroll'); originColor = noteData; // The note's origin color will be checked by its sustain notes - if (FlxG.save.data.stepMania && !isSustainNote && !PlayState.instance.executeModchart) + if (FlxG.save.data.stepMania && !isSustainNote && !(PlayState.instance != null ? PlayState.instance.executeModchart : false)) { var col:Int = 0; @@ -210,9 +207,12 @@ class Note extends FlxSprite col = quantityColor[4]; animation.play(dataColor[col] + 'Scroll'); - localAngle -= arrowAngles[col]; - localAngle += arrowAngles[noteData]; - originAngle = localAngle; + if (FlxG.save.data.rotateSprites) + { + localAngle -= arrowAngles[col]; + localAngle += arrowAngles[noteData]; + originAngle = localAngle; + } originColor = col; } @@ -229,7 +229,7 @@ class Note extends FlxSprite if (isSustainNote && prevNote != null) { - noteYOff = Math.round(-stepHeight + swagWidth * 0.5); + noteYOff = Math.round(-stepHeight + swagWidth * 0.5) + FlxG.save.data.offset + PlayState.songOffset; noteScore * 0.2; alpha = 0.6; diff --git a/source/Options.hx b/source/Options.hx index 508cc77ed8a..d5a673c7b35 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -1453,12 +1453,12 @@ class OffsetThing extends Option private override function updateDisplay():String { - return "Note offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; + return "Visual offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; } public override function getValue():String { - return "Note offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; + return "Visual offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; } } @@ -1584,6 +1584,38 @@ class MiddleScrollOption extends Option } } +class RotateSpritesOption extends Option +{ + public function new(desc:String) + { + super(); + if (OptionsMenu.isInPause) + description = "This option cannot be toggled in the pause menu."; + else + description = desc; + } + + public override function left():Bool + { + if (OptionsMenu.isInPause) + return false; + FlxG.save.data.rotateSprites = !FlxG.save.data.rotateSprites; + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "Rotate Sprites: < " + (FlxG.save.data.rotateSprites ? "Enabled" : "Disabled") + " >"; + } +} + class NoteskinOption extends Option { public function new(desc:String) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index fcfbae77ed2..be678a80971 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -119,7 +119,7 @@ class OptionsMenu extends FlxSubState options = [ new OptionCata(50, 40, "Gameplay", [ new ScrollSpeedOption("Change your scroll speed. (1 = Chart dependent)"), - new OffsetThing("Change the note audio offset (how many milliseconds a note is offset in a chart)"), + new OffsetThing("Change the note visual offset (how many milliseconds a note looks like it is offset in a chart)"), new AccuracyDOption("Change how accuracy is calculated. (Accurate = Simple, Complex = Milisecond Based)"), new GhostTapOption("Toggle counting pressing a directional input when no arrow is there as a miss."), new DownscrollOption("Toggle making the notes scroll down rather than up."), @@ -135,7 +135,9 @@ class OptionsMenu extends FlxSubState new CustomizeGameplay("Drag and drop gameplay modules to your prefered positions!") ]), new OptionCata(345, 40, "Appearance", [ - new NoteskinOption("Change your current noteskin"), new EditorRes("Not showing the editor grid will greatly increase editor performance"), + new NoteskinOption("Change your current noteskin"), + new RotateSpritesOption("Should the game rotate the sprites to do color quantization (turn off for bar skins)"), + new EditorRes("Not showing the editor grid will greatly increase editor performance"), new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), new MiddleScrollOption("Put your lane in the center or on the right."), new HealthBarOption("Toggles health bar visibility"), new JudgementCounter("Show your judgements that you've gotten in the song"), diff --git a/source/PlayState.hx b/source/PlayState.hx index 34ebfd38afb..bfbbaf2e406 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -892,7 +892,8 @@ class PlayState extends MusicBeatState scoreTxt.screenCenter(X); scoreTxt.scrollFactor.set(); scoreTxt.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); + scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, + (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); if (!FlxG.save.data.healthBar) scoreTxt.y = healthBarBG.y; @@ -2530,6 +2531,9 @@ class PlayState extends MusicBeatState // Conductor.songPosition = FlxG.sound.music.time; Conductor.songPosition += FlxG.elapsed * 1000; Conductor.rawPosition = FlxG.sound.music.time; + + // sync + /*@:privateAccess { FlxG.sound.music._channel. @@ -3164,6 +3168,8 @@ class PlayState extends MusicBeatState } else if (!daNote.wasGoodHit && !daNote.isSustainNote) { + misses++; + updateAccuracy(); health -= 0.15; } } @@ -3216,6 +3222,8 @@ class PlayState extends MusicBeatState } else if (!daNote.wasGoodHit && !daNote.isSustainNote) { + misses++; + updateAccuracy(); health -= 0.15; } } @@ -4227,7 +4235,8 @@ class PlayState extends MusicBeatState accuracy = Math.max(0, totalNotesHit / totalPlayed * 100); accuracyDefault = Math.max(0, totalNotesHitDefault / totalPlayed * 100); - scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); + scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, + (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); judgementCounter.text = 'Sicks: ${sicks}\nGoods: ${goods}\nBads: ${bads}\nShits: ${shits}\nMisses: ${misses}'; } @@ -4403,7 +4412,8 @@ class PlayState extends MusicBeatState override function stepHit() { super.stepHit(); - if (FlxG.sound.music.time > Conductor.rawPosition + 20 || FlxG.sound.music.time < Conductor.rawPosition - 20) + if (Conductor.songPosition * songMultiplier > FlxG.sound.music.time + 25 + || Conductor.songPosition * songMultiplier < FlxG.sound.music.time - 25) { resyncVocals(); } From a7f5f55ee7e20ba711b3e6f643b716e8bbc1cff2 Mon Sep 17 00:00:00 2001 From: KadeCS Date: Sat, 30 Oct 2021 12:55:40 -0700 Subject: [PATCH 09/42] bruh --- source/PlayState.hx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index bfbbaf2e406..09be40ffa64 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2931,15 +2931,6 @@ class PlayState extends MusicBeatState daNote.clipRect = swagRect; } } - - if (daNote.isParent) - { - for (i in 0...daNote.children.length) - { - var slide = daNote.children[i]; - slide.y = daNote.y - slide.height; - } - } } else { From 1ff9705a72915183bf5a054ed1fc4f68bac6e5ac Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 30 Oct 2021 15:23:59 -0700 Subject: [PATCH 10/42] fix idleLoop issue --- assets/preload/data/characters/bf-car.json | 2 +- assets/preload/data/characters/gf-car.json | 2 +- assets/preload/data/characters/mom-car.json | 2 +- source/Boyfriend.hx | 9 ------ source/Character.hx | 35 ++++++++++----------- 5 files changed, 19 insertions(+), 31 deletions(-) diff --git a/assets/preload/data/characters/bf-car.json b/assets/preload/data/characters/bf-car.json index 587bfcdb4c3..5cfedd8c0d1 100644 --- a/assets/preload/data/characters/bf-car.json +++ b/assets/preload/data/characters/bf-car.json @@ -11,7 +11,7 @@ "offsets": [-5, 0] }, { - "name": "idleHair", + "name": "idleLoop", "prefix": "BF idle dance", "offsets": [-5, 0], "frameIndices": [10, 11, 12, 13], diff --git a/assets/preload/data/characters/gf-car.json b/assets/preload/data/characters/gf-car.json index 5dde9d38de3..bd0e83990e1 100644 --- a/assets/preload/data/characters/gf-car.json +++ b/assets/preload/data/characters/gf-car.json @@ -17,7 +17,7 @@ "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] }, { - "name": "idleHair", + "name": "idleLoop", "prefix": "GF Dancing Beat Hair blowing CAR", "offsets": [0, 0], "frameIndices": [10, 11, 12, 25, 26, 27] diff --git a/assets/preload/data/characters/mom-car.json b/assets/preload/data/characters/mom-car.json index efa323c2db0..de8c50fc1f3 100644 --- a/assets/preload/data/characters/mom-car.json +++ b/assets/preload/data/characters/mom-car.json @@ -10,7 +10,7 @@ "offsets": [0, 0] }, { - "name": "idleHair", + "name": "idleLoop", "prefix": "Mom Idle", "offsets": [0, 0], "frameIndices": [10, 11, 12, 13], diff --git a/source/Boyfriend.hx b/source/Boyfriend.hx index 8975fd911d7..c89128d08ba 100644 --- a/source/Boyfriend.hx +++ b/source/Boyfriend.hx @@ -21,24 +21,15 @@ class Boyfriend extends Character if (!debugMode) { 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 (curCharacter.endsWith('-car') && !animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) - playAnim('idleHair'); if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished) - { playAnim('deathLoop'); - } } super.update(elapsed); diff --git a/source/Character.hx b/source/Character.hx index 90ff6dcf09c..84e34bcaa8a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -180,18 +180,6 @@ class Character extends FlxSprite holdTimer += elapsed; } - if (curCharacter.endsWith('-car') - && !animation.curAnim.name.startsWith('sing') - && animation.curAnim.finished - && animation.getByName('idleHair') != null) - playAnim('idleHair'); - - if (animation.getByName('idleLoop') != null) - { - if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) - playAnim('idleLoop'); - } - var dadVar:Float = 4; if (curCharacter == 'dad') @@ -207,14 +195,23 @@ class Character extends FlxSprite } } - switch (curCharacter) + if (!debugMode) { - case 'gf': - if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished) - { - danced = true; - playAnim('danceRight'); - } + if (animation.getByName('idleLoop') != null) + { + if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) + playAnim('idleLoop'); + } + + switch (curCharacter) + { + case 'gf': + if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished) + { + danced = true; + playAnim('danceRight'); + } + } } super.update(elapsed); From a455e7d732f007ade6c11bf93b3f8b45ba7d80a3 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 30 Oct 2021 15:24:14 -0700 Subject: [PATCH 11/42] Run files through haxe-formatter --- source/KadeEngineData.hx | 2 +- source/Options.hx | 3 --- source/StageDebugState.hx | 24 +++++++++++++----------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index e7aa6e3efe7..6207fa87211 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -117,7 +117,7 @@ class KadeEngineData if (FlxG.save.data.roundAccuracy == null) FlxG.save.data.roundAccuracy = false; - + FlxG.save.data.cacheImages = false; if (FlxG.save.data.middleScroll == null) diff --git a/source/Options.hx b/source/Options.hx index d5a673c7b35..3dd1b55c63e 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -558,7 +558,6 @@ class ShitMsOption extends Option } } - class RoundAccuracy extends Option { public function new(desc:String) @@ -615,8 +614,6 @@ class CpuStrums extends Option } } - - class GraphicLoading extends Option { public function new(desc:String) diff --git a/source/StageDebugState.hx b/source/StageDebugState.hx index fbec31360cb..b5bfda0a2a9 100644 --- a/source/StageDebugState.hx +++ b/source/StageDebugState.hx @@ -111,19 +111,21 @@ class StageDebugState extends FlxState posText.cameras = [camHUD]; add(posText); - addHelpText(); + addHelpText(); } - var helpText:FlxText; - function addHelpText():Void { - var helpTextValue = "Help:\nQ/E : Zoom in and out\nI/J/K/L : Pan Camera\nSpace : Cycle Object\nShift : Switch Mode (Char/Stage)\nClick and Drag : Move Active Object\nZ/X : Rotate Object\nR : Reset Rotation\nCTRL-S : Save Offsets to File\nESC : Return to Stage\nPress F1 to hide/show this!\n"; - helpText = new FlxText(940, 0, 0, helpTextValue, 15); - helpText.scrollFactor.set(); + var helpText:FlxText; + + function addHelpText():Void + { + var helpTextValue = "Help:\nQ/E : Zoom in and out\nI/J/K/L : Pan Camera\nSpace : Cycle Object\nShift : Switch Mode (Char/Stage)\nClick and Drag : Move Active Object\nZ/X : Rotate Object\nR : Reset Rotation\nCTRL-S : Save Offsets to File\nESC : Return to Stage\nPress F1 to hide/show this!\n"; + helpText = new FlxText(940, 0, 0, helpTextValue, 15); + helpText.scrollFactor.set(); helpText.cameras = [camHUD]; - helpText.color = FlxColor.WHITE; + helpText.color = FlxColor.WHITE; - add(helpText); - } + add(helpText); + } override public function update(elapsed:Float) { @@ -242,10 +244,10 @@ class StageDebugState extends FlxState if (FlxG.keys.pressed.CONTROL && FlxG.keys.justPressed.S) saveBoyPos(); - if (FlxG.keys.justPressed.F1) + if (FlxG.keys.justPressed.F1) FlxG.save.data.showHelp = !FlxG.save.data.showHelp; - helpText.visible = FlxG.save.data.showHelp; + helpText.visible = FlxG.save.data.showHelp; super.update(elapsed); } From f1d30677fc052a91bbcfe408eab97f5f463fde67 Mon Sep 17 00:00:00 2001 From: KadeDev Date: Sat, 30 Oct 2021 16:45:52 -0700 Subject: [PATCH 12/42] fix some things with this --- source/ChartingState.hx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index e02c9bc3138..a7e4162fb73 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1756,23 +1756,6 @@ class ChartingState extends MusicBeatState } } - for (section in _song.notes) - { - var saveRemove = []; - - for (i in notes) - { - if (i[0] >= section.startTime && i[0] < section.endTime) - { - saveRemove.push(i); - section.sectionNotes.push(i); - } - } - - for (i in saveRemove) - notes.remove(i); - } - for (i in curRenderedNotes) { i.strumTime = TimingStruct.getTimeFromBeat(i.beat); From b0a499dd0820f0b46b8c91340c1a4be5f2b34d78 Mon Sep 17 00:00:00 2001 From: KadeDev Date: Sat, 30 Oct 2021 17:32:16 -0700 Subject: [PATCH 13/42] actually fix it --- source/ChartingState.hx | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index a7e4162fb73..3f9606ad40e 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -166,6 +166,8 @@ class ChartingState extends MusicBeatState FlxG.mouse.visible = true; + PlayState.inDaPlay = false; + instance = this; deezNuts.set(4, 1); @@ -303,8 +305,6 @@ class ChartingState extends MusicBeatState recalculateAllSectionTimes(); - poggers(); - Debug.logTrace("Song length in MS: " + FlxG.sound.music.length); for (i in 0...9000000) // REALLY HIGH BEATS just cuz like ig this is the upper limit, I mean ur chart is probably going to run like ass anyways @@ -739,7 +739,6 @@ class ChartingState extends MusicBeatState Debug.logTrace(i.bpm + " - START: " + i.startBeat + " - END: " + i.endBeat + " - START-TIME: " + i.startTime); recalculateAllSectionTimes(); - poggers(); regenerateLines(); }); @@ -821,7 +820,6 @@ class ChartingState extends MusicBeatState } recalculateAllSectionTimes(); - poggers(); regenerateLines(); }); @@ -1728,6 +1726,8 @@ class ChartingState extends MusicBeatState { var notes = []; + Debug.logTrace("Basing everything on BPM which will in fact fuck up the sections"); + for (section in _song.notes) { var removed = []; @@ -1735,17 +1735,17 @@ class ChartingState extends MusicBeatState for (note in section.sectionNotes) { // commit suicide - var old = note[0]; - note[0] = TimingStruct.getTimeFromBeat(note[4]); - note[2] = TimingStruct.getTimeFromBeat(TimingStruct.getBeatFromTime(note[2])); - if (note[0] < section.startTime) + var old = [note[0], note[1], note[2], note[3], note[4]]; + old[0] = TimingStruct.getTimeFromBeat(old[4]); + old[2] = TimingStruct.getTimeFromBeat(TimingStruct.getBeatFromTime(old[0])); + if (old[0] < section.startTime && old[0] < section.endTime) { - notes.push(note); + notes.push(old); removed.push(note); } - if (note[0] > section.endTime) + if (old[0] > section.endTime && old[0] > section.startTime) { - notes.push(note); + notes.push(old); removed.push(note); } } @@ -1756,6 +1756,23 @@ class ChartingState extends MusicBeatState } } + for (section in _song.notes) + { + var saveRemove = []; + + for (i in notes) + { + if (i[0] >= section.startTime && i[0] <= section.endTime) + { + saveRemove.push(i); + section.sectionNotes.push(i); + } + } + + for (i in saveRemove) + notes.remove(i); + } + for (i in curRenderedNotes) { i.strumTime = TimingStruct.getTimeFromBeat(i.beat); From 13b15a0befe2f3b9d88958e571c7a05a4ae37e5f Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 31 Oct 2021 14:24:33 -0700 Subject: [PATCH 14/42] Move spirit over to character json --- assets/preload/data/characters/spirit.json | 36 +++++++++++++++++++ .../images/characters/spiritOffsets.txt | 5 --- source/Character.hx | 31 +++++++--------- 3 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 assets/preload/data/characters/spirit.json delete mode 100644 assets/shared/images/characters/spiritOffsets.txt diff --git a/assets/preload/data/characters/spirit.json b/assets/preload/data/characters/spirit.json new file mode 100644 index 00000000000..8a6826be4c6 --- /dev/null +++ b/assets/preload/data/characters/spirit.json @@ -0,0 +1,36 @@ +{ + "name": "Spirit", + "asset": "characters/spirit", + "barColor": "#FF3C6E", + "scale": 6, + "antialiasing": false, + "usePackerAtlas": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "idle spirit_", + "offsets": [-220, -280] + }, + { + "name": "singUP", + "prefix": "up_", + "offsets": [-220, -240] + }, + { + "name": "singLEFT", + "prefix": "left_", + "offsets": [-200, -280] + }, + { + "name": "singRIGHT", + "prefix": "right_", + "offsets": [-220, -280] + }, + { + "name": "singDOWN", + "prefix": "spirit down_", + "offsets": [170, 110] + } + ] +} \ No newline at end of file diff --git a/assets/shared/images/characters/spiritOffsets.txt b/assets/shared/images/characters/spiritOffsets.txt deleted file mode 100644 index ed2442d754b..00000000000 --- a/assets/shared/images/characters/spiritOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle -220 -280 -singUP -220 -240 -singRIGHT -220 -280 -singLEFT -200 -280 -singDOWN 170 110 diff --git a/source/Character.hx b/source/Character.hx index 84e34bcaa8a..c60cd82510e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -63,24 +63,6 @@ class Character extends FlxSprite flipX = true; - case 'spirit': - frames = Paths.getPackerAtlas('spirit', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - barColor = 0xFFff3c6e; - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - playAnim('idle'); - - antialiasing = false; - default: parseDataFile(); } @@ -124,8 +106,13 @@ class Character extends FlxSprite } var data:CharacterData = cast jsonData; + var tex:FlxAtlasFrames; + + if (data.usePackerAtlas) + tex = Paths.getPackerAtlas(data.asset, 'shared'); + else + tex = Paths.getSparrowAtlas(data.asset, 'shared'); - var tex:FlxAtlasFrames = Paths.getSparrowAtlas(data.asset, 'shared'); frames = tex; if (frames != null) for (anim in data.animations) @@ -338,6 +325,12 @@ typedef CharacterData = * @default true */ var ?antialiasing:Bool; + + /** + * Whether this character uses PackerAtlas. + * @default false + */ + var ?usePackerAtlas:Bool; } typedef AnimationData = From 36906509411033396bf02b58043dcef3b2ccf608 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 31 Oct 2021 14:31:03 -0700 Subject: [PATCH 15/42] Move BF (Pixel) over to character json --- assets/preload/data/characters/bf-pixel.json | 56 +++++++++++++++++++ .../images/characters/bf-pixelOffsets.txt | 9 --- source/Character.hx | 37 +----------- source/GameplayCustomizeState.hx | 4 +- source/PlayState.hx | 9 +-- 5 files changed, 62 insertions(+), 53 deletions(-) create mode 100644 assets/preload/data/characters/bf-pixel.json delete mode 100644 assets/shared/images/characters/bf-pixelOffsets.txt diff --git a/assets/preload/data/characters/bf-pixel.json b/assets/preload/data/characters/bf-pixel.json new file mode 100644 index 00000000000..be20c08cfac --- /dev/null +++ b/assets/preload/data/characters/bf-pixel.json @@ -0,0 +1,56 @@ +{ + "name": "Boyfriend (Pixel Day)", + "asset": "characters/bfPixel", + "barColor": "#31B0D1", + "flipX": true, + "scale": 6, + "antialiasing": false, + "startingAnim": "firstDeath", + "animations": [ + { + "name": "idle", + "prefix": "BF IDLE", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "BF UP NOTE", + "offsets": [0, 0] + }, + { + "name": "singLEFT", + "prefix": "BF LEFT NOTE", + "offsets": [0, 0] + }, + { + "name": "singRIGHT", + "prefix": "BF RIGHT NOTE", + "offsets": [0, 0] + }, + { + "name": "singDOWN", + "prefix": "BF DOWN NOTE", + "offsets": [0, 0] + }, + { + "name": "singUPmiss", + "prefix": "BF UP MISS", + "offsets": [0, 0] + }, + { + "name": "singLEFTmiss", + "prefix": "BF LEFT MISS", + "offsets": [0, 0] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF RIGHT MISS", + "offsets": [0, 0] + }, + { + "name": "singDOWNmiss", + "prefix": "BF DOWN MISS", + "offsets": [0, 0] + } + ] +} \ No newline at end of file diff --git a/assets/shared/images/characters/bf-pixelOffsets.txt b/assets/shared/images/characters/bf-pixelOffsets.txt deleted file mode 100644 index b8a82929bd1..00000000000 --- a/assets/shared/images/characters/bf-pixelOffsets.txt +++ /dev/null @@ -1,9 +0,0 @@ -idle 0 0 -singUP 0 0 -singRIGHT 0 0 -singLEFT 0 0 -singDOWN 0 0 -singUPmiss 0 0 -singRIGHTmiss 0 0 -singLEFTmiss 0 0 -singDOWNmiss 0 0 diff --git a/source/Character.hx b/source/Character.hx index c60cd82510e..9f1032355e4 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -30,42 +30,7 @@ class Character extends FlxSprite curCharacter = character; this.isPlayer = isPlayer; - var tex:FlxAtlasFrames; - antialiasing = FlxG.save.data.antialiasing; - - switch (curCharacter) - { - case 'bf-pixel': - frames = Paths.getSparrowAtlas('bfPixel', 'shared', true); - 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); - - loadOffsetFile(curCharacter); - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - playAnim('idle'); - - width -= 100; - height -= 100; - - antialiasing = false; - - barColor = 0xFF31b0d1; - - flipX = true; - - default: - parseDataFile(); - } + parseDataFile(); if (curCharacter.startsWith('bf')) dance(); diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 3bb326c440b..3bc463308ce 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -221,8 +221,8 @@ class GameplayCustomizeState extends MusicBeatState case 'mall': camFollow.y = boyfriend.getMidpoint().y - 200; case 'school' | 'schoolEvil': - camFollow.x = boyfriend.getMidpoint().x - 200; - camFollow.y = boyfriend.getMidpoint().y - 200; + camFollow.x = boyfriend.getMidpoint().x - 300; + camFollow.y = boyfriend.getMidpoint().y - 300; } add(camFollow); diff --git a/source/PlayState.hx b/source/PlayState.hx index 09be40ffa64..33b7e986a4e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2738,12 +2738,9 @@ 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; - camFollow.y = boyfriend.getMidpoint().y - 200; - case 'schoolEvil': - camFollow.x = boyfriend.getMidpoint().x - 200; - camFollow.y = boyfriend.getMidpoint().y - 200; + case 'school' | 'schoolEvil': + camFollow.x = boyfriend.getMidpoint().x - 300; + camFollow.y = boyfriend.getMidpoint().y - 300; } } } From d87164a6a54ab95e14a18bf467a34816f34f48df Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 31 Oct 2021 15:21:28 -0700 Subject: [PATCH 16/42] oops --- assets/preload/data/characters/bf-pixel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/preload/data/characters/bf-pixel.json b/assets/preload/data/characters/bf-pixel.json index be20c08cfac..5c093b81f6f 100644 --- a/assets/preload/data/characters/bf-pixel.json +++ b/assets/preload/data/characters/bf-pixel.json @@ -5,7 +5,7 @@ "flipX": true, "scale": 6, "antialiasing": false, - "startingAnim": "firstDeath", + "startingAnim": "idle", "animations": [ { "name": "idle", From a5dab4d10793654b8a5899e1111573eb01bb077a Mon Sep 17 00:00:00 2001 From: KadeCS Date: Sun, 31 Oct 2021 18:02:18 -0700 Subject: [PATCH 17/42] im so high right now --- source/ChartingState.hx | 1 + source/PlayState.hx | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index e02c9bc3138..545dab740f6 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1,5 +1,6 @@ package; +import openfl.net.FileFilter; import Song.SongMeta; import openfl.system.System; import lime.app.Application; diff --git a/source/PlayState.hx b/source/PlayState.hx index 09be40ffa64..5195e2f3cf4 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -837,6 +837,16 @@ class PlayState extends MusicBeatState Debug.logTrace("Removed " + toBeRemoved.length + " cuz of start time"); } + for (i in 0...unspawnNotes.length) + if (unspawnNotes[i].strumTime < startTime) + unspawnNotes.remove(unspawnNotes[i]); + + // make all of the notes + for (i in unspawnNotes) + { + notes.add(i); + } + trace('generated'); // add(strumLine); @@ -1521,10 +1531,6 @@ class PlayState extends MusicBeatState trace("pitched inst and vocals to " + songMultiplier); #end - for (i in 0...unspawnNotes.length) - if (unspawnNotes[i].strumTime < startTime) - unspawnNotes.remove(unspawnNotes[i]); - if (needSkip) { skipActive = true; @@ -1961,6 +1967,8 @@ class PlayState extends MusicBeatState function resyncVocals():Void { + if (endingSong) + return; vocals.stop(); FlxG.sound.music.stop(); @@ -2034,7 +2042,6 @@ class PlayState extends MusicBeatState if (unspawnNotes[0].strumTime - Conductor.songPosition < 14000 * songMultiplier) { var dunceNote:Note = unspawnNotes[0]; - notes.add(dunceNote); #if FEATURE_LUAMODCHART if (executeModchart) From a8d96ec6a81b7e08b2e6515616ac2210f8cfbfe5 Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Sun, 31 Oct 2021 21:32:02 -0400 Subject: [PATCH 18/42] Avoid logTrace calls in production. These are computationally expensive since they involve a file system write and happen frequently, like whenever you press a note. --- source/Debug.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Debug.hx b/source/Debug.hx index bd1142ac3dc..c0e15c6eab3 100644 --- a/source/Debug.hx +++ b/source/Debug.hx @@ -80,11 +80,12 @@ class Debug */ public static function logTrace(input:Dynamic, ?pos:haxe.PosInfos):Void { + #if debug if (input == null) return; var output = formatOutput(input, pos); - writeToFlxGLog(output, LOG_STYLE_TRACE); writeToLogFile(output, 'TRACE'); + #end } /** From 29a69bd26a74a4678f48f511e5c7d4b5f72b5432 Mon Sep 17 00:00:00 2001 From: Eric Myllyoja Date: Sun, 31 Oct 2021 21:33:15 -0400 Subject: [PATCH 19/42] Update bug.md --- .github/ISSUE_TEMPLATE/bug.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 27c14b5e45a..07b3346f32a 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -14,6 +14,8 @@ Windows (`x86`), Windows (`x86_64`), Linux, or macOS? Specify below. ## 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 possible. + +## Please check the `logs` folder within your game directory, and upload the most recent game logs if you can. + +## Have you identified any steps to reproduce the bug? If so, please describe them below. Use images if possible. From 67699b7852ed16799daab154452597d76677e1b5 Mon Sep 17 00:00:00 2001 From: KadeCS Date: Sun, 31 Oct 2021 18:34:21 -0700 Subject: [PATCH 20/42] save --- Project.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project.xml b/Project.xml index 7b87057ddaa..36a2b79a78a 100644 --- a/Project.xml +++ b/Project.xml @@ -133,6 +133,8 @@ + + From df91a48a765b4d7b9e3ca0d77d6bff270a85c5b0 Mon Sep 17 00:00:00 2001 From: KadeCS Date: Sun, 31 Oct 2021 18:34:23 -0700 Subject: [PATCH 21/42] ballsex --- source/PlayState.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/PlayState.hx b/source/PlayState.hx index 5195e2f3cf4..c3a7109a142 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1987,6 +1987,8 @@ class PlayState extends MusicBeatState #end } + // ballsex - etterna + #if FEATURE_DISCORD DiscordClient.changePresence(detailsText + " " From e3b5508ccc77bc91abd70e6c783ea2d1efc1a52e Mon Sep 17 00:00:00 2001 From: KadeCS Date: Mon, 1 Nov 2021 06:48:36 -0700 Subject: [PATCH 22/42] some optimization and maybe other stuff? --- source/MusicBeatState.hx | 2 -- source/PlayState.hx | 44 ++++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index 57ff33db924..2a0169a7649 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -171,8 +171,6 @@ class MusicBeatState extends FlxUIState } } - (cast(Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap); - super.update(elapsed); } diff --git a/source/PlayState.hx b/source/PlayState.hx index 7bd99eaa12b..1d0983dcc35 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2006,6 +2006,11 @@ class PlayState extends MusicBeatState #end } + function percentageOfSong():Float + { + return (Conductor.songPosition / songLength) * 100; + } + public var paused:Bool = false; var startedCountdown:Bool = false; @@ -2041,7 +2046,7 @@ class PlayState extends MusicBeatState if (unspawnNotes[0] != null) { - if (unspawnNotes[0].strumTime - Conductor.songPosition < 14000 * songMultiplier) + if (unspawnNotes[0].strumTime - Conductor.songPosition < 14000) { var dunceNote:Note = unspawnNotes[0]; @@ -2067,8 +2072,7 @@ class PlayState extends MusicBeatState dunceNote.cameras = [camHUD]; } - var index:Int = unspawnNotes.indexOf(dunceNote); - unspawnNotes.splice(index, 1); + unspawnNotes.remove(dunceNote); currentLuaIndex++; } } @@ -2259,21 +2263,20 @@ class PlayState extends MusicBeatState // reverse iterate to remove oldest notes first and not invalidate the iteration // stop iteration as soon as a note is not removed // all notes should be kept in the correct order and this is optimal, safe to do every frame/update + + var balls = notesHitArray.length - 1; + while (balls >= 0) { - var balls = notesHitArray.length - 1; - while (balls >= 0) - { - var cock:Date = notesHitArray[balls]; - if (cock != null && cock.getTime() + 1000 < Date.now().getTime()) - notesHitArray.remove(cock); - else - balls = 0; - balls--; - } - nps = notesHitArray.length; - if (nps > maxNPS) - maxNPS = nps; + var cock:Date = notesHitArray[balls]; + if (cock != null && cock.getTime() + 1000 < Date.now().getTime()) + notesHitArray.remove(cock); + else + balls = 0; + balls--; } + nps = notesHitArray.length; + if (nps > maxNPS) + maxNPS = nps; if (FlxG.keys.justPressed.NINE) iconP1.swapOldIcon(); @@ -2356,8 +2359,9 @@ class PlayState extends MusicBeatState // FlxG.watch.addQuick('VOL', vocals.amplitudeLeft); // FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight); - iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.50))); - iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.50))); + var iconLerp = 0.5; + iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, iconLerp))); + iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, iconLerp))); iconP1.updateHitbox(); iconP2.updateHitbox(); @@ -4472,8 +4476,8 @@ class PlayState extends MusicBeatState } if (songMultiplier == 1) { - iconP1.setGraphicSize(Std.int(iconP1.width + 30)); - iconP2.setGraphicSize(Std.int(iconP2.width + 30)); + iconP1.setGraphicSize(Std.int(iconP1.width + 45)); + iconP2.setGraphicSize(Std.int(iconP2.width + 45)); iconP1.updateHitbox(); iconP2.updateHitbox(); From 97a0bcdf3bca7a0b9d1f0244366bb59330492f31 Mon Sep 17 00:00:00 2001 From: KadeCS Date: Mon, 1 Nov 2021 06:51:24 -0700 Subject: [PATCH 23/42] anit-aliasing border --- source/KadeEngineFPS.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/KadeEngineFPS.hx b/source/KadeEngineFPS.hx index 9a99ae6c9d1..af106edfca2 100644 --- a/source/KadeEngineFPS.hx +++ b/source/KadeEngineFPS.hx @@ -127,7 +127,8 @@ class KadeEngineFPS extends TextField Main.instance.removeChild(bitmap); - bitmap = ImageOutline.renderImage(this, 2, 0x000000, 1); + if (FlxG.save.data.antiAliasing) + bitmap = ImageOutline.renderImage(this, 1, 0x000000, 1); Main.instance.addChild(bitmap); From 521cdfae6c80a67a8c55b0ed694551fbc2713755 Mon Sep 17 00:00:00 2001 From: KadeCS Date: Mon, 1 Nov 2021 07:22:47 -0700 Subject: [PATCH 24/42] memory leak is now optional until I find a better way of drawing outlines on openfl text --- source/KadeEngineData.hx | 6 +++++ source/KadeEngineFPS.hx | 28 +++++++++++++-------- source/Options.hx | 54 ++++++++++++++++++++++++++++++++++++++++ source/OptionsMenu.hx | 1 + 4 files changed, 78 insertions(+), 11 deletions(-) diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index 6207fa87211..d3cd0a5484c 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -36,6 +36,9 @@ class KadeEngineData if (FlxG.save.data.fps == null) FlxG.save.data.fps = false; + if (FlxG.save.data.fpsBorder == null) + FlxG.save.data.fpsBorder = false; + if (FlxG.save.data.rotateSprites == null) FlxG.save.data.rotateSprites = true; @@ -49,6 +52,9 @@ class KadeEngineData if (FlxG.save.data.fpsRain == null) FlxG.save.data.fpsRain = false; + if (FlxG.save.data.memoryDisplay == null) + FlxG.save.data.memoryDisplay = false; + if (FlxG.save.data.fpsCap == null) FlxG.save.data.fpsCap = 120; diff --git a/source/KadeEngineFPS.hx b/source/KadeEngineFPS.hx index af106edfca2..bfb4ddbd926 100644 --- a/source/KadeEngineFPS.hx +++ b/source/KadeEngineFPS.hx @@ -1,3 +1,4 @@ +import openfl.system.System; import flixel.math.FlxMath; import flixel.util.FlxColor; import openfl.Lib; @@ -31,6 +32,8 @@ class KadeEngineFPS extends TextField **/ public var currentFPS(default, null):Int; + public var memoryUsage:Float; + public var bitmap:Bitmap; @:noCompletion private var cacheCount:Int; @@ -62,9 +65,6 @@ class KadeEngineFPS extends TextField __enterFrame(time - currentTime); }); #end - - bitmap = ImageOutline.renderImage(this, 1, 0x000000, 1, true); - (cast(Lib.current.getChildAt(0), Main)).addChild(bitmap); } var array:Array = [ @@ -123,16 +123,22 @@ class KadeEngineFPS extends TextField #end } - visible = true; - - Main.instance.removeChild(bitmap); - - if (FlxG.save.data.antiAliasing) - bitmap = ImageOutline.renderImage(this, 1, 0x000000, 1); + if (FlxG.save.data.fpsBorder) + { + visible = true; + Main.instance.removeChild(bitmap); - Main.instance.addChild(bitmap); + bitmap = ImageOutline.renderImage(this, 2, 0x000000, 1); - visible = false; + Main.instance.addChild(bitmap); + visible = false; + } + else + { + visible = true; + if (Main.instance.contains(bitmap)) + Main.instance.removeChild(bitmap); + } cacheCount = currentCount; } diff --git a/source/Options.hx b/source/Options.hx index 3dd1b55c63e..51135909a8a 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -1419,6 +1419,60 @@ class OffsetMenu extends Option } } +class BorderFps extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function left():Bool + { + FlxG.save.data.fpsBorder = !FlxG.save.data.fpsBorder; + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "FPS Border: < " + (!FlxG.save.data.fpsBorder ? "off" : "on") + " >"; + } +} + +class DisplayMemory extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function left():Bool + { + FlxG.save.data.memoryDisplay = !FlxG.save.data.memoryDisplay; + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "Memory Display: < " + (!FlxG.save.data.memoryDisplay ? "off" : "on") + " >"; + } +} + class OffsetThing extends Option { public function new(desc:String) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index be678a80971..61bc983d859 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -149,6 +149,7 @@ class OptionsMenu extends FlxSubState new Colour("The color behind icons now fit with their theme. (e.g. Pico = green)"), new NPSDisplayOption("Shows your current Notes Per Second on the info bar."), new RainbowFPSOption("Make the FPS Counter flicker through rainbow colors."), + new BorderFps("Draw a border around the FPS Text (Consumes a lot of CPU Resources)"), new CpuStrums("Toggle the CPU's strumline lighting up when it hits a note."), ]), new OptionCata(640, 40, "Misc", [ From dab6a30bdcb003c3a56a9d1e2b6553b8a4b7f24f Mon Sep 17 00:00:00 2001 From: KadeCS Date: Tue, 2 Nov 2021 17:41:58 -0700 Subject: [PATCH 25/42] redo this --- source/PlayState.hx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 1d0983dcc35..a2df8e73ec4 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -841,12 +841,6 @@ class PlayState extends MusicBeatState if (unspawnNotes[i].strumTime < startTime) unspawnNotes.remove(unspawnNotes[i]); - // make all of the notes - for (i in unspawnNotes) - { - notes.add(i); - } - trace('generated'); // add(strumLine); @@ -2049,7 +2043,7 @@ class PlayState extends MusicBeatState if (unspawnNotes[0].strumTime - Conductor.songPosition < 14000) { var dunceNote:Note = unspawnNotes[0]; - + notes.add(dunceNote); #if FEATURE_LUAMODCHART if (executeModchart) { From 02a50747f9f5e4107cb600b8b591107ed83c16f5 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 4 Nov 2021 23:30:58 -0700 Subject: [PATCH 26/42] Add interrupt, nextAnim, and isDancing variables --- assets/preload/data/characters/bf-car.json | 1 + assets/preload/data/characters/gf-car.json | 6 +- .../preload/data/characters/gf-christmas.json | 4 + assets/preload/data/characters/gf-pixel.json | 1 + assets/preload/data/characters/gf.json | 4 + assets/preload/data/characters/mom-car.json | 1 + assets/preload/data/characters/spooky.json | 1 + source/Character.hx | 107 ++++++++++-------- 8 files changed, 74 insertions(+), 51 deletions(-) diff --git a/assets/preload/data/characters/bf-car.json b/assets/preload/data/characters/bf-car.json index 5cfedd8c0d1..d26bf5e94cd 100644 --- a/assets/preload/data/characters/bf-car.json +++ b/assets/preload/data/characters/bf-car.json @@ -8,6 +8,7 @@ { "name": "idle", "prefix": "BF idle dance", + "nextAnim": "idleLoop", "offsets": [-5, 0] }, { diff --git a/assets/preload/data/characters/gf-car.json b/assets/preload/data/characters/gf-car.json index bd0e83990e1..fe793787287 100644 --- a/assets/preload/data/characters/gf-car.json +++ b/assets/preload/data/characters/gf-car.json @@ -3,16 +3,19 @@ "asset": "characters/gfCar", "barColor": "#A5004D", "startingAnim": "danceRight", + "isDancing": true, "animations": [ { "name": "danceLeft", "prefix": "GF Dancing Beat Hair blowing CAR", + "nextAnim": "idleLoop", "offsets": [0, 0], "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] }, { "name": "danceRight", "prefix": "GF Dancing Beat Hair blowing CAR", + "nextAnim": "idleLoop", "offsets": [0, 0], "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] }, @@ -20,7 +23,8 @@ "name": "idleLoop", "prefix": "GF Dancing Beat Hair blowing CAR", "offsets": [0, 0], - "frameIndices": [10, 11, 12, 25, 26, 27] + "frameIndices": [10, 11, 12, 25, 26, 27], + "looped": true } ] } \ No newline at end of file diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json index 758f9033ff3..753107b70e1 100644 --- a/assets/preload/data/characters/gf-christmas.json +++ b/assets/preload/data/characters/gf-christmas.json @@ -3,6 +3,7 @@ "asset": "characters/gfChristmas", "barColor": "#A5004D", "startingAnim": "danceRight", + "isDancing": true, "animations": [ { "name": "singLEFT", @@ -44,6 +45,7 @@ { "name": "hairBlow", "prefix": "GF Dancing Beat Hair blowing", + "interrupt": false, "offsets": [45, -8], "frameIndices": [0, 1, 2, 3], "looped": true @@ -51,6 +53,8 @@ { "name": "hairFall", "prefix": "GF Dancing Beat Hair Landing", + "nextAnim": "danceRight", + "interrupt": false, "offsets": [0, -9], "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] }, diff --git a/assets/preload/data/characters/gf-pixel.json b/assets/preload/data/characters/gf-pixel.json index 158071f436e..3219759fe1e 100644 --- a/assets/preload/data/characters/gf-pixel.json +++ b/assets/preload/data/characters/gf-pixel.json @@ -5,6 +5,7 @@ "scale": 6, "antialiasing": false, "startingAnim": "danceRight", + "isDancing": true, "animations": [ { "name": "danceLeft", diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index 229f53932cf..a1432b57c34 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -3,6 +3,7 @@ "asset": "characters/GF_assets", "barColor": "#A5004D", "startingAnim": "danceRight", + "isDancing": true, "animations": [ { "name": "singLEFT", @@ -44,6 +45,7 @@ { "name": "hairBlow", "prefix": "GF Dancing Beat Hair blowing", + "interrupt": false, "offsets": [45, -8], "frameIndices": [0, 1, 2, 3], "looped": true @@ -51,6 +53,8 @@ { "name": "hairFall", "prefix": "GF Dancing Beat Hair Landing", + "nextAnim": "danceRight", + "interrupt": false, "offsets": [0, -9], "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] }, diff --git a/assets/preload/data/characters/mom-car.json b/assets/preload/data/characters/mom-car.json index de8c50fc1f3..6e1f24e0f84 100644 --- a/assets/preload/data/characters/mom-car.json +++ b/assets/preload/data/characters/mom-car.json @@ -7,6 +7,7 @@ { "name": "idle", "prefix": "Mom Idle", + "nextAnim": "idleLoop", "offsets": [0, 0] }, { diff --git a/assets/preload/data/characters/spooky.json b/assets/preload/data/characters/spooky.json index 1fa0ce70515..c843f127ba1 100644 --- a/assets/preload/data/characters/spooky.json +++ b/assets/preload/data/characters/spooky.json @@ -3,6 +3,7 @@ "asset": "characters/spooky_kids_assets", "barColor": "#D57E00", "startingAnim": "danceRight", + "isDancing": true, "animations": [ { "name": "danceLeft", diff --git a/source/Character.hx b/source/Character.hx index 9f1032355e4..6d7389127c0 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -13,7 +13,10 @@ using StringTools; class Character extends FlxSprite { public var animOffsets:Map>; + public var animInterrupt:Map; + public var animNext:Map; public var debugMode:Bool = false; + public var isDancing:Bool = false; public var isPlayer:Bool = false; public var curCharacter:String = 'bf'; @@ -27,14 +30,13 @@ class Character extends FlxSprite barColor = isPlayer ? 0xFF66FF33 : 0xFFFF0000; animOffsets = new Map>(); + animInterrupt = new Map(); + animNext = new Map(); curCharacter = character; this.isPlayer = isPlayer; parseDataFile(); - if (curCharacter.startsWith('bf')) - dance(); - if (isPlayer && frames != null) { flipX = !flipX; @@ -97,13 +99,21 @@ class Character extends FlxSprite } animOffsets[anim.name] = anim.offsets == null ? [0, 0] : anim.offsets; + animInterrupt[anim.name] = anim.interrupt == null ? true : anim.interrupt; + + if (anim.nextAnim != null) + animNext[anim.name] = anim.nextAnim; } - flipX = data.flipX == null ? false : data.flipX; + this.isDancing = data.isDancing == null ? false : data.isDancing; - setGraphicSize(Std.int(width * (data.scale == null ? 1 : data.scale))); + flipX = data.flipX == null ? false : data.flipX; - updateHitbox(); + if (data.scale != null) + { + setGraphicSize(Std.int(width * data.scale)); + updateHitbox(); + } antialiasing = data.antialiasing == null ? FlxG.save.data.antialiasing : data.antialiasing; @@ -149,21 +159,11 @@ class Character extends FlxSprite if (!debugMode) { - if (animation.getByName('idleLoop') != null) - { - if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) - playAnim('idleLoop'); - } + var nextAnim = animNext.get(animation.curAnim.name); - switch (curCharacter) - { - case 'gf': - if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished) - { - danced = true; - playAnim('danceRight'); - } - } + // TODO: Go back to the right anim after hairFall in Week 3 (danced = true) + if (nextAnim != null && animation.curAnim.finished) + playAnim(nextAnim); } super.update(elapsed); @@ -178,40 +178,28 @@ class Character extends FlxSprite { if (!debugMode) { - switch (curCharacter) + var canInterrupt = animInterrupt.get(animation.curAnim.name); + + Debug.logTrace('Can "${animation.curAnim.name}" from ${curCharacter} be interrupted?: ${canInterrupt}'); + + if (canInterrupt) { - case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel': - if (!animation.curAnim.name.startsWith('hair') && !animation.curAnim.name.startsWith('sing')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - } - case 'spooky': - if (!animation.curAnim.name.startsWith('sing')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - } - /* - // new dance code is gonna end up cutting off animation with the idle - // so here's example code that'll fix it. just adjust it to ya character 'n shit - case 'custom character': - if (!animation.curAnim.name.endsWith('custom animation')) - playAnim('idle', forced); - */ - default: + if (isDancing) + { + danced = !danced; + + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } + else + { if (altAnim && animation.getByName('idle-alt') != null) playAnim('idle-alt', forced); else playAnim('idle', forced); + } } } } @@ -281,7 +269,8 @@ typedef CharacterData = /** * The scale of this character. - * @default 1 + * Pixel characters typically use 6. + * @default 1 */ var ?scale:Int; @@ -296,6 +285,13 @@ typedef CharacterData = * @default false */ var ?usePackerAtlas:Bool; + + /** + * Whether this character uses a dancing idle instead of a regular idle. + * (ex. gf, spooky) + * @default false + */ + var ?isDancing:Bool; } typedef AnimationData = @@ -320,4 +316,15 @@ typedef AnimationData = var ?frameRate:Int; var ?frameIndices:Array; + + /** + * Whether this animation can be interrupted by the dance function. + * @default true + */ + var ?interrupt:Bool; + + /** + * The animation that this animation will go to after it is finished. + */ + var ?nextAnim:String; } From 3d1091560066a1714181b234f7694f4eff3b5fc5 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 4 Nov 2021 23:46:23 -0700 Subject: [PATCH 27/42] Add dadVar --- assets/preload/data/characters/dad.json | 1 + .../preload/data/characters/gf-christmas.json | 1 + assets/preload/data/characters/gf.json | 1 + assets/preload/data/characters/spooky.json | 1 + source/Character.hx | 36 ++++++++----------- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/assets/preload/data/characters/dad.json b/assets/preload/data/characters/dad.json index 1e4fa12db20..daa15a78bc2 100644 --- a/assets/preload/data/characters/dad.json +++ b/assets/preload/data/characters/dad.json @@ -3,6 +3,7 @@ "asset": "characters/DADDY_DEAREST", "barColor": "#AF66CE", "startingAnim": "idle", + "dadVar": 6.1, "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json index 753107b70e1..149ebde190a 100644 --- a/assets/preload/data/characters/gf-christmas.json +++ b/assets/preload/data/characters/gf-christmas.json @@ -4,6 +4,7 @@ "barColor": "#A5004D", "startingAnim": "danceRight", "isDancing": true, + "dadVar": 4.1, "animations": [ { "name": "singLEFT", diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index a1432b57c34..70ca0c693b9 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -4,6 +4,7 @@ "barColor": "#A5004D", "startingAnim": "danceRight", "isDancing": true, + "dadVar": 4.1, "animations": [ { "name": "singLEFT", diff --git a/assets/preload/data/characters/spooky.json b/assets/preload/data/characters/spooky.json index c843f127ba1..3e969c9a519 100644 --- a/assets/preload/data/characters/spooky.json +++ b/assets/preload/data/characters/spooky.json @@ -4,6 +4,7 @@ "barColor": "#D57E00", "startingAnim": "danceRight", "isDancing": true, + "dadVar": 4.1, "animations": [ { "name": "danceLeft", diff --git a/source/Character.hx b/source/Character.hx index 6d7389127c0..ca96340183f 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -16,7 +16,6 @@ class Character extends FlxSprite public var animInterrupt:Map; public var animNext:Map; public var debugMode:Bool = false; - public var isDancing:Bool = false; public var isPlayer:Bool = false; public var curCharacter:String = 'bf'; @@ -24,6 +23,11 @@ class Character extends FlxSprite public var holdTimer:Float = 0; + public var isDancing:Bool; + public var dadVar:Float; + public var charPos:Array; + public var camPos:Array; + public function new(x:Float, y:Float, ?character:String = "bf", ?isPlayer:Bool = false) { super(x, y); @@ -106,6 +110,9 @@ class Character extends FlxSprite } this.isDancing = data.isDancing == null ? false : data.isDancing; + this.charPos = data.charPos == null ? [0, 0] : data.charPos; + this.camPos = data.camPos == null ? [0, 0] : data.camPos; + this.dadVar = data.dadVar == null ? 4 : data.dadVar; flipX = data.flipX == null ? false : data.flipX; @@ -122,35 +129,16 @@ class Character extends FlxSprite playAnim(data.startingAnim); } - public function loadOffsetFile(character:String, library:String = 'shared') - { - var offset:Array = CoolUtil.coolTextFile(Paths.txt('images/characters/' + character + "Offsets", library)); - - for (i in 0...offset.length) - { - var data:Array = offset[i].split(' '); - addOffset(data[0], Std.parseInt(data[1]), Std.parseInt(data[2])); - } - } - override function update(elapsed:Float) { if (!isPlayer) { if (animation.curAnim.name.startsWith('sing')) - { holdTimer += elapsed; - } - var dadVar:Float = 4; - - if (curCharacter == 'dad') - dadVar = 6.1; - else if (curCharacter == 'gf' || curCharacter == 'spooky') - dadVar = 4.1; // fix double dances - if (holdTimer >= Conductor.stepCrochet * dadVar * 0.001) + if (holdTimer >= Conductor.stepCrochet * this.dadVar * 0.001) { - if (curCharacter == 'gf' || curCharacter == 'spooky') + if (this.isDancing) playAnim('danceLeft'); // overridden by dance correctly later dance(); holdTimer = 0; @@ -254,6 +242,10 @@ typedef CharacterData = var asset:String; var startingAnim:String; + var ?charPos:Array; + var ?camPos:Array; + var ?dadVar:Float; + /** * The color of this character's health bar. */ From 8399d5575839f6ac27d5aa4ae136ef3b07b1ffc3 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 00:23:12 -0700 Subject: [PATCH 28/42] add charPos, camPos, camFollow, and isGF --- assets/preload/data/characters/dad.json | 1 + .../preload/data/characters/gf-christmas.json | 1 + assets/preload/data/characters/gf.json | 1 + assets/preload/data/characters/mom-car.json | 1 + assets/preload/data/characters/mom.json | 1 + assets/preload/data/characters/pico.json | 1 + .../preload/data/characters/senpai-angry.json | 2 + assets/preload/data/characters/senpai.json | 2 + assets/preload/data/characters/spirit.json | 2 + source/Character.hx | 19 +++++ source/PlayState.hx | 78 +++++++++---------- 11 files changed, 68 insertions(+), 41 deletions(-) diff --git a/assets/preload/data/characters/dad.json b/assets/preload/data/characters/dad.json index daa15a78bc2..8e57efff718 100644 --- a/assets/preload/data/characters/dad.json +++ b/assets/preload/data/characters/dad.json @@ -4,6 +4,7 @@ "barColor": "#AF66CE", "startingAnim": "idle", "dadVar": 6.1, + "camPos": [400, 0], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json index 149ebde190a..57ba9667984 100644 --- a/assets/preload/data/characters/gf-christmas.json +++ b/assets/preload/data/characters/gf-christmas.json @@ -5,6 +5,7 @@ "startingAnim": "danceRight", "isDancing": true, "dadVar": 4.1, + "isGF": true, "animations": [ { "name": "singLEFT", diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index 70ca0c693b9..971d56ef6d2 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -5,6 +5,7 @@ "startingAnim": "danceRight", "isDancing": true, "dadVar": 4.1, + "isGF": true, "animations": [ { "name": "singLEFT", diff --git a/assets/preload/data/characters/mom-car.json b/assets/preload/data/characters/mom-car.json index 6e1f24e0f84..b0ed5423b67 100644 --- a/assets/preload/data/characters/mom-car.json +++ b/assets/preload/data/characters/mom-car.json @@ -3,6 +3,7 @@ "asset": "characters/momCar", "barColor": "#D8558E", "startingAnim": "idle", + "camFollow": [0, 100], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/mom.json b/assets/preload/data/characters/mom.json index c1e687fd274..b186001a7e6 100644 --- a/assets/preload/data/characters/mom.json +++ b/assets/preload/data/characters/mom.json @@ -3,6 +3,7 @@ "asset": "characters/Mom_Assets", "barColor": "#D8558E", "startingAnim": "idle", + "camFollow": [0, 100], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/pico.json b/assets/preload/data/characters/pico.json index 3df92860cc3..548cdc2c468 100644 --- a/assets/preload/data/characters/pico.json +++ b/assets/preload/data/characters/pico.json @@ -4,6 +4,7 @@ "barColor": "#B7D855", "flipX": true, "startingAnim": "idle", + "camPos": [600, 0], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/senpai-angry.json b/assets/preload/data/characters/senpai-angry.json index 5821c135dcf..cc2b5b0a726 100644 --- a/assets/preload/data/characters/senpai-angry.json +++ b/assets/preload/data/characters/senpai-angry.json @@ -5,6 +5,8 @@ "scale": 6, "antialiasing": false, "startingAnim": "idle", + "camPos": [300, 0], + "camFollow": [-100, -430], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/senpai.json b/assets/preload/data/characters/senpai.json index 61b8fbeca5e..367b103e2d2 100644 --- a/assets/preload/data/characters/senpai.json +++ b/assets/preload/data/characters/senpai.json @@ -5,6 +5,8 @@ "scale": 6, "antialiasing": false, "startingAnim": "idle", + "camPos": [300, 0], + "camFollow": [-100, -430], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/spirit.json b/assets/preload/data/characters/spirit.json index 8a6826be4c6..e2a84840670 100644 --- a/assets/preload/data/characters/spirit.json +++ b/assets/preload/data/characters/spirit.json @@ -6,6 +6,8 @@ "antialiasing": false, "usePackerAtlas": true, "startingAnim": "idle", + "camPos": [300, 0], + "hasTrail": true, "animations": [ { "name": "idle", diff --git a/source/Character.hx b/source/Character.hx index ca96340183f..a0b34da719f 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -23,10 +23,13 @@ class Character extends FlxSprite public var holdTimer:Float = 0; + public var isGF:Bool; + public var hasTrail:Bool; public var isDancing:Bool; public var dadVar:Float; public var charPos:Array; public var camPos:Array; + public var camFollow:Array; public function new(x:Float, y:Float, ?character:String = "bf", ?isPlayer:Bool = false) { @@ -109,9 +112,12 @@ class Character extends FlxSprite animNext[anim.name] = anim.nextAnim; } + this.isGF = data.isGF == null ? false : data.isGF; + this.hasTrail = data.hasTrail == null ? false : data.hasTrail; this.isDancing = data.isDancing == null ? false : data.isDancing; this.charPos = data.charPos == null ? [0, 0] : data.charPos; this.camPos = data.camPos == null ? [0, 0] : data.camPos; + this.camFollow = data.camFollow == null ? [0, 0] : data.camFollow; this.dadVar = data.dadVar == null ? 4 : data.dadVar; flipX = data.flipX == null ? false : data.flipX; @@ -244,6 +250,7 @@ typedef CharacterData = var ?charPos:Array; var ?camPos:Array; + var ?camFollow:Array; var ?dadVar:Float; /** @@ -284,6 +291,18 @@ typedef CharacterData = * @default false */ var ?isDancing:Bool; + + /** + * Whether this character has a trail behind them. + * @default false + */ + var ?hasTrail:Bool; + + /** + * Whether this character is based off Girlfriend. + * @default false + */ + var ?isGF:Bool; } typedef AnimationData = diff --git a/source/PlayState.hx b/source/PlayState.hx index a2df8e73ec4..585b08052a5 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -624,42 +624,41 @@ class PlayState extends MusicBeatState } } - camPos = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y); + gf.x += gf.charPos[0]; + gf.y += gf.charPos[1]; + dad.x += dad.charPos[0]; + dad.y += dad.charPos[1]; + boyfriend.x += boyfriend.charPos[0]; + boyfriend.y += boyfriend.charPos[1]; - switch (dad.curCharacter) + camPos = new FlxPoint(dad.getGraphicMidpoint().x + dad.camPos[0], dad.getGraphicMidpoint().y + dad.camPos[1]); + + if (dad.isGF) { - case 'gf': - if (!stageTesting) - dad.setPosition(gf.x, gf.y); - gf.visible = false; - if (isStoryMode) - { - camPos.x += 600; - tweenCamIn(); - } - case 'dad': - camPos.x += 400; - case 'pico': + if (!stageTesting) + dad.setPosition(gf.x, gf.y); + gf.visible = false; + if (isStoryMode) + { camPos.x += 600; - case 'senpai': - camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); - case 'senpai-angry': - camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); - case 'spirit': - if (FlxG.save.data.distractions) + tweenCamIn(); + } + } + + if (dad.hasTrail) + { + if (FlxG.save.data.distractions) + { + // trailArea.scrollFactor.set(); + if (!PlayStateChangeables.Optimize) { - // trailArea.scrollFactor.set(); - if (!PlayStateChangeables.Optimize) - { - 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); + var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); + // evilTrail.changeValuesEnabled(false, false, false, false); + // evilTrail.changeGraphic() + add(evilTrail); } - - camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); + // evilTrail.scrollFactor.set(1.1, 1.1); + } } Stage.update(0); @@ -1169,7 +1168,7 @@ class PlayState extends MusicBeatState if (idleToBeat) dad.dance(forcedToIdle); } - else if (dad.curCharacter == 'spooky' || dad.curCharacter == 'gf') + else if (dad.isDancing) dad.dance(); var introAssets:Map> = new Map>(); @@ -2711,14 +2710,8 @@ class PlayState extends MusicBeatState #end // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); - switch (dad.curCharacter) - { - case 'mom' | 'mom-car': - camFollow.y = dad.getMidpoint().y; - case 'senpai' | 'senpai-angry': - camFollow.y = dad.getMidpoint().y - 430; - camFollow.x = dad.getMidpoint().x - 100; - } + camFollow.x += dad.camFollow[0]; + camFollow.y += dad.camFollow[1]; } if (currentSection.mustHitSection && camFollow.x != boyfriend.getMidpoint().x - 100) @@ -2749,6 +2742,9 @@ class PlayState extends MusicBeatState camFollow.x = boyfriend.getMidpoint().x - 300; camFollow.y = boyfriend.getMidpoint().y - 300; } + + camFollow.x += boyfriend.camFollow[0]; + camFollow.y += boyfriend.camFollow[1]; } } @@ -4447,7 +4443,7 @@ class PlayState extends MusicBeatState if (idleToBeat && !boyfriend.animation.curAnim.name.startsWith('sing')) boyfriend.dance(forcedToIdle, currentSection.playerAltAnim); } - else if ((dad.curCharacter == 'spooky' || dad.curCharacter == 'gf') && !dad.animation.curAnim.name.startsWith('sing')) + else if (dad.isDancing && !dad.animation.curAnim.name.startsWith('sing')) dad.dance(forcedToIdle, currentSection.CPUAltAnim); } // FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM); From 2bd162f20a21d3aa4b9129d554d4a7c862fc6cc3 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 00:26:04 -0700 Subject: [PATCH 29/42] forgor --- source/GameplayCustomizeState.hx | 35 ++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 3bc463308ce..f80da43954c 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -195,19 +195,32 @@ class GameplayCustomizeState extends MusicBeatState } } - camPos = new FlxPoint(boyfriend.getMidpoint().x - 100, boyfriend.getMidpoint().y - 100); + gf.x += gf.charPos[0]; + gf.y += gf.charPos[1]; + dad.x += dad.charPos[0]; + dad.y += dad.charPos[1]; + boyfriend.x += boyfriend.charPos[0]; + boyfriend.y += boyfriend.charPos[1]; - switch (dad.curCharacter) + camPos = new FlxPoint(dad.getGraphicMidpoint().x + dad.camPos[0], dad.getGraphicMidpoint().y + dad.camPos[1]); + + if (dad.isGF) { - case 'gf': - dad.setPosition(gf.x, gf.y); - gf.visible = false; - case 'spirit': - if (FlxG.save.data.distractions) - { - var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); - add(evilTrail); - } + dad.setPosition(gf.x, gf.y); + gf.visible = false; + } + + if (dad.hasTrail) + { + if (FlxG.save.data.distractions) + { + // 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); + } } camFollow = new FlxObject(0, 0, 1, 1); From f9b02a2efa05628be0153c484e533967c2f84de3 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 10:15:40 -0700 Subject: [PATCH 30/42] Add isDanced (only works for isDancing) --- assets/preload/data/characters/gf-car.json | 1 + .../preload/data/characters/gf-christmas.json | 1 + assets/preload/data/characters/gf-pixel.json | 1 + assets/preload/data/characters/gf.json | 1 + source/Character.hx | 17 ++++++++++++++++- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/assets/preload/data/characters/gf-car.json b/assets/preload/data/characters/gf-car.json index fe793787287..570ebaf1d55 100644 --- a/assets/preload/data/characters/gf-car.json +++ b/assets/preload/data/characters/gf-car.json @@ -4,6 +4,7 @@ "barColor": "#A5004D", "startingAnim": "danceRight", "isDancing": true, + "isGF": true, "animations": [ { "name": "danceLeft", diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json index 57ba9667984..532d10c2097 100644 --- a/assets/preload/data/characters/gf-christmas.json +++ b/assets/preload/data/characters/gf-christmas.json @@ -57,6 +57,7 @@ "prefix": "GF Dancing Beat Hair Landing", "nextAnim": "danceRight", "interrupt": false, + "isDanced": true, "offsets": [0, -9], "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] }, diff --git a/assets/preload/data/characters/gf-pixel.json b/assets/preload/data/characters/gf-pixel.json index 3219759fe1e..ee2cc33330c 100644 --- a/assets/preload/data/characters/gf-pixel.json +++ b/assets/preload/data/characters/gf-pixel.json @@ -6,6 +6,7 @@ "antialiasing": false, "startingAnim": "danceRight", "isDancing": true, + "isGF": true, "animations": [ { "name": "danceLeft", diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index 971d56ef6d2..f4158dade28 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -57,6 +57,7 @@ "prefix": "GF Dancing Beat Hair Landing", "nextAnim": "danceRight", "interrupt": false, + "isDanced": true, "offsets": [0, -9], "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] }, diff --git a/source/Character.hx b/source/Character.hx index a0b34da719f..26e3da04e12 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -15,6 +15,7 @@ class Character extends FlxSprite public var animOffsets:Map>; public var animInterrupt:Map; public var animNext:Map; + public var animDanced:Map; public var debugMode:Bool = false; public var isPlayer:Bool = false; @@ -39,6 +40,7 @@ class Character extends FlxSprite animOffsets = new Map>(); animInterrupt = new Map(); animNext = new Map(); + animDanced = new Map(); curCharacter = character; this.isPlayer = isPlayer; @@ -108,6 +110,9 @@ class Character extends FlxSprite animOffsets[anim.name] = anim.offsets == null ? [0, 0] : anim.offsets; animInterrupt[anim.name] = anim.interrupt == null ? true : anim.interrupt; + if (data.isDancing && anim.isDanced != null) + animDanced[anim.name] = anim.isDanced; + if (anim.nextAnim != null) animNext[anim.name] = anim.nextAnim; } @@ -154,10 +159,14 @@ class Character extends FlxSprite if (!debugMode) { var nextAnim = animNext.get(animation.curAnim.name); + var forceDanced = animDanced.get(animation.curAnim.name); - // TODO: Go back to the right anim after hairFall in Week 3 (danced = true) if (nextAnim != null && animation.curAnim.finished) + { + if (this.isDancing) + danced = forceDanced; playAnim(nextAnim); + } } super.update(elapsed); @@ -338,4 +347,10 @@ typedef AnimationData = * The animation that this animation will go to after it is finished. */ var ?nextAnim:String; + + /** + * Whether this animation sets danced to true or false. + * Only works for characters with isDancing enabled. + */ + var ?isDanced:Bool; } From 596d23de2c80a35f0ed2c37a6a53cbb544cf66cd Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 10:16:37 -0700 Subject: [PATCH 31/42] oops forgor --- source/Character.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Character.hx b/source/Character.hx index 26e3da04e12..cd824005cf6 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -163,7 +163,7 @@ class Character extends FlxSprite if (nextAnim != null && animation.curAnim.finished) { - if (this.isDancing) + if (this.isDancing && forceDanced != null) danced = forceDanced; playAnim(nextAnim); } From 3facd13e98809b1f20039d4e5fba3a84f74b3981 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 10:27:59 -0700 Subject: [PATCH 32/42] forgor again --- source/GameplayCustomizeState.hx | 4 +++- source/PlayState.hx | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index f80da43954c..88e329f999d 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -503,7 +503,9 @@ class GameplayCustomizeState extends MusicBeatState boyfriend.dance(); dad.dance(); } - else if (dad.curCharacter == 'spooky' || dad.curCharacter == 'gf') + else if (boyfriend.isDancing) + boyfriend.dance(); + else if (dad.isDancing) dad.dance(); gf.dance(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 585b08052a5..f962dcb3e42 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1168,6 +1168,8 @@ class PlayState extends MusicBeatState if (idleToBeat) dad.dance(forcedToIdle); } + else if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.endsWith("miss")) + boyfriend.dance(); else if (dad.isDancing) dad.dance(); @@ -4443,6 +4445,8 @@ class PlayState extends MusicBeatState if (idleToBeat && !boyfriend.animation.curAnim.name.startsWith('sing')) boyfriend.dance(forcedToIdle, currentSection.playerAltAnim); } + else if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.startsWith('sing')) + boyfriend.dance(forcedToIdle, currentSection.CPUAltAnim); else if (dad.isDancing && !dad.animation.curAnim.name.startsWith('sing')) dad.dance(forcedToIdle, currentSection.CPUAltAnim); } From a5943101b0764d0cac1f11e72f61b0d1d809de4f Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 10:31:20 -0700 Subject: [PATCH 33/42] oops i accidently --- source/GameplayCustomizeState.hx | 11 +++++++---- source/PlayState.hx | 22 ++++++++++++++-------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 88e329f999d..1889d96a3e3 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -503,10 +503,13 @@ class GameplayCustomizeState extends MusicBeatState boyfriend.dance(); dad.dance(); } - else if (boyfriend.isDancing) - boyfriend.dance(); - else if (dad.isDancing) - dad.dance(); + else if (curBeat % 2 != 0) + { + if (boyfriend.isDancing) + boyfriend.dance(); + if (dad.isDancing) + dad.dance(); + } gf.dance(); diff --git a/source/PlayState.hx b/source/PlayState.hx index f962dcb3e42..098ad6e721a 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1168,10 +1168,13 @@ class PlayState extends MusicBeatState if (idleToBeat) dad.dance(forcedToIdle); } - else if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.endsWith("miss")) - boyfriend.dance(); - else if (dad.isDancing) - dad.dance(); + else if (swagCounter % idleBeat != 0) + { + if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.endsWith("miss")) + boyfriend.dance(); + if (dad.isDancing) + dad.dance(); + } var introAssets:Map> = new Map>(); introAssets.set('default', ['ready', "set", "go"]); @@ -4445,10 +4448,13 @@ class PlayState extends MusicBeatState if (idleToBeat && !boyfriend.animation.curAnim.name.startsWith('sing')) boyfriend.dance(forcedToIdle, currentSection.playerAltAnim); } - else if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.startsWith('sing')) - boyfriend.dance(forcedToIdle, currentSection.CPUAltAnim); - else if (dad.isDancing && !dad.animation.curAnim.name.startsWith('sing')) - dad.dance(forcedToIdle, currentSection.CPUAltAnim); + else if (curBeat % idleBeat != 0) + { + if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.startsWith('sing')) + boyfriend.dance(forcedToIdle, currentSection.CPUAltAnim); + if (dad.isDancing && !dad.animation.curAnim.name.startsWith('sing')) + dad.dance(forcedToIdle, currentSection.CPUAltAnim); + } } // FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM); wiggleShit.update(Conductor.crochet); From dcd00fb8518166edfe7215d07f31cd81e25f4a35 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 11:03:00 -0700 Subject: [PATCH 34/42] some cleanup --- source/Character.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index cd824005cf6..64b12724259 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -147,9 +147,9 @@ class Character extends FlxSprite if (animation.curAnim.name.startsWith('sing')) holdTimer += elapsed; - if (holdTimer >= Conductor.stepCrochet * this.dadVar * 0.001) + if (holdTimer >= Conductor.stepCrochet * dadVar * 0.001) { - if (this.isDancing) + if (isDancing) playAnim('danceLeft'); // overridden by dance correctly later dance(); holdTimer = 0; @@ -163,7 +163,7 @@ class Character extends FlxSprite if (nextAnim != null && animation.curAnim.finished) { - if (this.isDancing && forceDanced != null) + if (isDancing && forceDanced != null) danced = forceDanced; playAnim(nextAnim); } From b2d2691a49fc22faa3cf57076156bc5314b9336f Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 18:57:07 -0700 Subject: [PATCH 35/42] we do a little forgoring --- assets/preload/data/characters/dad.json | 1 + assets/preload/data/characters/mom.json | 1 + assets/preload/data/characters/parents-christmas.json | 1 + 3 files changed, 3 insertions(+) diff --git a/assets/preload/data/characters/dad.json b/assets/preload/data/characters/dad.json index 8e57efff718..9994c39e8d8 100644 --- a/assets/preload/data/characters/dad.json +++ b/assets/preload/data/characters/dad.json @@ -9,6 +9,7 @@ { "name": "idle", "prefix": "Dad idle dance", + "nextAnim": "idleLoop", "offsets": [0, 0] }, { diff --git a/assets/preload/data/characters/mom.json b/assets/preload/data/characters/mom.json index b186001a7e6..6700b43a84a 100644 --- a/assets/preload/data/characters/mom.json +++ b/assets/preload/data/characters/mom.json @@ -8,6 +8,7 @@ { "name": "idle", "prefix": "Mom Idle", + "nextAnim": "idleLoop", "offsets": [0, 0] }, { diff --git a/assets/preload/data/characters/parents-christmas.json b/assets/preload/data/characters/parents-christmas.json index 98555c3f922..01f544f911a 100644 --- a/assets/preload/data/characters/parents-christmas.json +++ b/assets/preload/data/characters/parents-christmas.json @@ -7,6 +7,7 @@ { "name": "idle", "prefix": "Parent Christmas Idle", + "nextAnim": "idleLoop", "offsets": [0, 0] }, { From 35965e1c583d562d6efaa5095214f47266cd8475 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:01:14 -0700 Subject: [PATCH 36/42] rename isGF to replacesGF --- assets/preload/data/characters/gf-car.json | 2 +- assets/preload/data/characters/gf-christmas.json | 2 +- assets/preload/data/characters/gf-pixel.json | 2 +- assets/preload/data/characters/gf.json | 2 +- source/Character.hx | 8 ++++---- source/PlayState.hx | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/preload/data/characters/gf-car.json b/assets/preload/data/characters/gf-car.json index 570ebaf1d55..edaa2185b63 100644 --- a/assets/preload/data/characters/gf-car.json +++ b/assets/preload/data/characters/gf-car.json @@ -4,7 +4,7 @@ "barColor": "#A5004D", "startingAnim": "danceRight", "isDancing": true, - "isGF": true, + "replacesGF": true, "animations": [ { "name": "danceLeft", diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json index 532d10c2097..12fc3bcb71d 100644 --- a/assets/preload/data/characters/gf-christmas.json +++ b/assets/preload/data/characters/gf-christmas.json @@ -5,7 +5,7 @@ "startingAnim": "danceRight", "isDancing": true, "dadVar": 4.1, - "isGF": true, + "replacesGF": true, "animations": [ { "name": "singLEFT", diff --git a/assets/preload/data/characters/gf-pixel.json b/assets/preload/data/characters/gf-pixel.json index ee2cc33330c..b025c29d082 100644 --- a/assets/preload/data/characters/gf-pixel.json +++ b/assets/preload/data/characters/gf-pixel.json @@ -6,7 +6,7 @@ "antialiasing": false, "startingAnim": "danceRight", "isDancing": true, - "isGF": true, + "replacesGF": true, "animations": [ { "name": "danceLeft", diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index f4158dade28..fc6cb3e5be5 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -5,7 +5,7 @@ "startingAnim": "danceRight", "isDancing": true, "dadVar": 4.1, - "isGF": true, + "replacesGF": true, "animations": [ { "name": "singLEFT", diff --git a/source/Character.hx b/source/Character.hx index 64b12724259..5abec1e513e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -24,7 +24,7 @@ class Character extends FlxSprite public var holdTimer:Float = 0; - public var isGF:Bool; + public var replacesGF:Bool; public var hasTrail:Bool; public var isDancing:Bool; public var dadVar:Float; @@ -117,7 +117,7 @@ class Character extends FlxSprite animNext[anim.name] = anim.nextAnim; } - this.isGF = data.isGF == null ? false : data.isGF; + this.replacesGF = data.replacesGF == null ? false : data.replacesGF; this.hasTrail = data.hasTrail == null ? false : data.hasTrail; this.isDancing = data.isDancing == null ? false : data.isDancing; this.charPos = data.charPos == null ? [0, 0] : data.charPos; @@ -308,10 +308,10 @@ typedef CharacterData = var ?hasTrail:Bool; /** - * Whether this character is based off Girlfriend. + * Whether this character replaces gf if they are set as dad. * @default false */ - var ?isGF:Bool; + var ?replacesGF:Bool; } typedef AnimationData = diff --git a/source/PlayState.hx b/source/PlayState.hx index 098ad6e721a..5d61a396951 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -633,7 +633,7 @@ class PlayState extends MusicBeatState camPos = new FlxPoint(dad.getGraphicMidpoint().x + dad.camPos[0], dad.getGraphicMidpoint().y + dad.camPos[1]); - if (dad.isGF) + if (dad.replacesGF) { if (!stageTesting) dad.setPosition(gf.x, gf.y); From aa559285d429f426aec051865eacd78e9abf5123 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:02:48 -0700 Subject: [PATCH 37/42] rename dadVar to holdLength --- assets/preload/data/characters/dad.json | 2 +- assets/preload/data/characters/gf-christmas.json | 2 +- assets/preload/data/characters/gf.json | 2 +- assets/preload/data/characters/spooky.json | 2 +- source/Character.hx | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/preload/data/characters/dad.json b/assets/preload/data/characters/dad.json index 9994c39e8d8..a3171d31add 100644 --- a/assets/preload/data/characters/dad.json +++ b/assets/preload/data/characters/dad.json @@ -3,7 +3,7 @@ "asset": "characters/DADDY_DEAREST", "barColor": "#AF66CE", "startingAnim": "idle", - "dadVar": 6.1, + "holdLength": 6.1, "camPos": [400, 0], "animations": [ { diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json index 12fc3bcb71d..acb15d13466 100644 --- a/assets/preload/data/characters/gf-christmas.json +++ b/assets/preload/data/characters/gf-christmas.json @@ -4,7 +4,7 @@ "barColor": "#A5004D", "startingAnim": "danceRight", "isDancing": true, - "dadVar": 4.1, + "holdLength": 4.1, "replacesGF": true, "animations": [ { diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index fc6cb3e5be5..54c75c53ff2 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -4,7 +4,7 @@ "barColor": "#A5004D", "startingAnim": "danceRight", "isDancing": true, - "dadVar": 4.1, + "holdLength": 4.1, "replacesGF": true, "animations": [ { diff --git a/assets/preload/data/characters/spooky.json b/assets/preload/data/characters/spooky.json index 3e969c9a519..9a9c9dc860d 100644 --- a/assets/preload/data/characters/spooky.json +++ b/assets/preload/data/characters/spooky.json @@ -4,7 +4,7 @@ "barColor": "#D57E00", "startingAnim": "danceRight", "isDancing": true, - "dadVar": 4.1, + "holdLength": 4.1, "animations": [ { "name": "danceLeft", diff --git a/source/Character.hx b/source/Character.hx index 5abec1e513e..e3cb05d58dd 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -27,7 +27,7 @@ class Character extends FlxSprite public var replacesGF:Bool; public var hasTrail:Bool; public var isDancing:Bool; - public var dadVar:Float; + public var holdLength:Float; public var charPos:Array; public var camPos:Array; public var camFollow:Array; @@ -123,7 +123,7 @@ class Character extends FlxSprite this.charPos = data.charPos == null ? [0, 0] : data.charPos; this.camPos = data.camPos == null ? [0, 0] : data.camPos; this.camFollow = data.camFollow == null ? [0, 0] : data.camFollow; - this.dadVar = data.dadVar == null ? 4 : data.dadVar; + this.holdLength = data.holdLength == null ? 4 : data.holdLength; flipX = data.flipX == null ? false : data.flipX; @@ -147,7 +147,7 @@ class Character extends FlxSprite if (animation.curAnim.name.startsWith('sing')) holdTimer += elapsed; - if (holdTimer >= Conductor.stepCrochet * dadVar * 0.001) + if (holdTimer >= Conductor.stepCrochet * holdLength * 0.001) { if (isDancing) playAnim('danceLeft'); // overridden by dance correctly later @@ -260,7 +260,7 @@ typedef CharacterData = var ?charPos:Array; var ?camPos:Array; var ?camFollow:Array; - var ?dadVar:Float; + var ?holdLength:Float; /** * The color of this character's health bar. From 294d05b9bccea31bd750c9144487a6632a6066ad Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:04:35 -0700 Subject: [PATCH 38/42] right this state exists --- source/GameplayCustomizeState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 1889d96a3e3..a8559667637 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -204,7 +204,7 @@ class GameplayCustomizeState extends MusicBeatState camPos = new FlxPoint(dad.getGraphicMidpoint().x + dad.camPos[0], dad.getGraphicMidpoint().y + dad.camPos[1]); - if (dad.isGF) + if (dad.replacesGF) { dad.setPosition(gf.x, gf.y); gf.visible = false; From 350315e9f6ff6778cb3d91e6d6f337659952d255 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:08:54 -0700 Subject: [PATCH 39/42] add alt anim support for isDancing --- source/Character.hx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index e3cb05d58dd..ea2d5b98982 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -191,10 +191,20 @@ class Character extends FlxSprite { danced = !danced; - if (danced) - playAnim('danceRight'); + if (altAnim && animation.getByName('danceRight-alt') != null && animation.getByName('danceLeft-alt') != null) + { + if (danced) + playAnim('danceRight-alt'); + else + playAnim('danceLeft-alt'); + } else - playAnim('danceLeft'); + { + if (danced) + playAnim('danceRight'); + else + playAnim('danceLeft'); + } } else { From 10265f1f9f44a2faeb6f64a55f8680e1c82dcf56 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:18:18 -0700 Subject: [PATCH 40/42] math is hard --- assets/preload/data/characters/senpai-angry.json | 2 +- assets/preload/data/characters/senpai.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/preload/data/characters/senpai-angry.json b/assets/preload/data/characters/senpai-angry.json index cc2b5b0a726..d1a6889efc9 100644 --- a/assets/preload/data/characters/senpai-angry.json +++ b/assets/preload/data/characters/senpai-angry.json @@ -6,7 +6,7 @@ "antialiasing": false, "startingAnim": "idle", "camPos": [300, 0], - "camFollow": [-100, -430], + "camFollow": [-250, -330], "animations": [ { "name": "idle", diff --git a/assets/preload/data/characters/senpai.json b/assets/preload/data/characters/senpai.json index 367b103e2d2..c98452c2a8d 100644 --- a/assets/preload/data/characters/senpai.json +++ b/assets/preload/data/characters/senpai.json @@ -6,7 +6,7 @@ "antialiasing": false, "startingAnim": "idle", "camPos": [300, 0], - "camFollow": [-100, -430], + "camFollow": [-250, -330], "animations": [ { "name": "idle", From dd111cd9d1dff3414c40b37ef7538562dcde03b5 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:20:33 -0700 Subject: [PATCH 41/42] remove logging that could hurt performance in debug --- source/Character.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index ea2d5b98982..9f00068f04e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -183,8 +183,6 @@ class Character extends FlxSprite { var canInterrupt = animInterrupt.get(animation.curAnim.name); - Debug.logTrace('Can "${animation.curAnim.name}" from ${curCharacter} be interrupted?: ${canInterrupt}'); - if (canInterrupt) { if (isDancing) From e166414a73c2011c5dacc4a77fa9f65217ebeb6d Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Nov 2021 19:27:04 -0700 Subject: [PATCH 42/42] fix antialiasing in philly stage --- source/Stage.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Stage.hx b/source/Stage.hx index 867015a1f2a..b731ee86cfc 100644 --- a/source/Stage.hx +++ b/source/Stage.hx @@ -73,6 +73,7 @@ class Stage extends MusicBeatState { var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.loadImage('philly/sky', 'week3')); bg.scrollFactor.set(0.1, 0.1); + bg.antialiasing = FlxG.save.data.antialiasing; swagBacks['bg'] = bg; toAdd.push(bg); @@ -80,6 +81,7 @@ class Stage extends MusicBeatState city.scrollFactor.set(0.3, 0.3); city.setGraphicSize(Std.int(city.width * 0.85)); city.updateHitbox(); + city.antialiasing = FlxG.save.data.antialiasing; swagBacks['city'] = city; toAdd.push(city); @@ -102,10 +104,12 @@ class Stage extends MusicBeatState } var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.loadImage('philly/behindTrain', 'week3')); + streetBehind.antialiasing = FlxG.save.data.antialiasing; swagBacks['streetBehind'] = streetBehind; toAdd.push(streetBehind); var phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.loadImage('philly/train', 'week3')); + phillyTrain.antialiasing = FlxG.save.data.antialiasing; if (FlxG.save.data.distractions) { swagBacks['phillyTrain'] = phillyTrain; @@ -118,6 +122,7 @@ class Stage extends MusicBeatState // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.loadImage('philly/street', 'week3')); + street.antialiasing = FlxG.save.data.antialiasing; swagBacks['street'] = street; toAdd.push(street); }