diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index d8ea5483a..ddc6261b5 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -6,7 +6,6 @@ body:
- type: markdown
attributes:
value: "# PLEASE READ THE [CONTRIBUTING GUIDE](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md) BEFORE OPENING ISSUES!"
-
- type: checkboxes
attributes:
label: Issue Checklist
@@ -46,7 +45,7 @@ body:
attributes:
label: Version
description: Which version are you playing on? The game version is in the bottom left corner of the main menu.
- placeholder: ex. 0.5.3
+ placeholder: ex. 0.6.2
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/charting.yml b/.github/ISSUE_TEMPLATE/charting.yml
index e86b73c12..810a3778d 100644
--- a/.github/ISSUE_TEMPLATE/charting.yml
+++ b/.github/ISSUE_TEMPLATE/charting.yml
@@ -46,7 +46,7 @@ body:
attributes:
label: Version
description: Which version are you playing on? The game version is in the bottom left corner of the main menu.
- placeholder: ex. 0.5.3
+ placeholder: ex. 0.6.2
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/compiling.yml b/.github/ISSUE_TEMPLATE/compiling.yml
index 6dd9e4cf9..a3370e3c5 100644
--- a/.github/ISSUE_TEMPLATE/compiling.yml
+++ b/.github/ISSUE_TEMPLATE/compiling.yml
@@ -34,7 +34,7 @@ body:
attributes:
label: Version
description: Which version are you compiling? The game version is in the bottom left corner of the main menu or in the project.hxp file.
- placeholder: ex. 0.5.3
+ placeholder: ex. 0.6.2
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/crash.yml b/.github/ISSUE_TEMPLATE/crash.yml
index f315fcc2c..04fea1d13 100644
--- a/.github/ISSUE_TEMPLATE/crash.yml
+++ b/.github/ISSUE_TEMPLATE/crash.yml
@@ -46,7 +46,7 @@ body:
attributes:
label: Version
description: Which version are you playing on? The game version is in the bottom left corner of the main menu.
- placeholder: ex. 0.5.3
+ placeholder: ex. 0.6.2
validations:
required: true
diff --git a/CODESTYLE.md b/CODESTYLE.md
index 2b6333258..32723531e 100644
--- a/CODESTYLE.md
+++ b/CODESTYLE.md
@@ -14,8 +14,8 @@ Code Quality is handled by the `vshaxe.haxe-checkstyle` extension, which include
* `IndentationCharacter` checks what is used to indent, `Indentation` checks how deep the indentation is.
* `CommentedOutCode` check is in place because old code should be retrieved via Git history.
* TODO items: Enable these one-by-one and fix them to improve the overall code quality.
- - Reconfigure `MethodLength`
- - Reconfigure `CyclomaticComplexity`
+ - Re-configure `MethodLength`
+ - Re-configure `CyclomaticComplexity`
- Re-enable `MagicNumber`
- Re-configure `NestedControlFlow`
- Re-configure `NestedIfDepth`
@@ -28,5 +28,5 @@ Prettier automatically handles formatting of JSON files, and can be configured i
### Prettier Notes
* Prettier will automatically attempt to place expressions on a single line if they fit, but will keep them multi-line if they are manually made multi-line.
- * This means that long singleline objects are automatically expanded, and short multiline objects aren't automatically collapsed.
+ * This means that long single-line objects are automatically expanded, and short multi-line objects aren't automatically collapsed.
* You may want to use regex replacement to manually remove the first newline in short multi-line objects to convince Prettier to collapse them.
diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md
index 13e2e3543..0f1985fab 100644
--- a/docs/CONTRIBUTING.md
+++ b/docs/CONTRIBUTING.md
@@ -1,6 +1,6 @@
# Contributing
Welcome to the Contributing Guide!
-You can contribute to the Funkin' repository by opening issues or pull requests.
+You can contribute to the Funkin' repository by opening issues or pull requests.
This guide will cover best practices for each type of contribution.
@@ -11,7 +11,7 @@ This guide will cover best practices for each type of contribution.
[Part 1: Etiquette](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md#part-1-etiquette)
-Part 2: Issues
+Part 2: Issues
* [Requirements](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md#requirements)
@@ -24,8 +24,8 @@ This guide will cover best practices for each type of contribution.
-
-Part 3: Pull Requests
+
+Part 3: Pull Requests
* [Choosing a base branch](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md#choosing-a-base-branch)
@@ -39,6 +39,8 @@ This guide will cover best practices for each type of contribution.
* [funkin.assets PRs](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md#funkinassets-prs)
+ * [Charting PRs](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md#charting-prs)
+
[Closing](https://github.com/FunkinCrew/Funkin/blob/main/docs/CONTRIBUTING.md#closing)
@@ -54,11 +56,11 @@ This guide will cover best practices for each type of contribution.
# Part 2: Issues
Issues serve many purposes, from reporting bugs to suggesting new features.
-This section provides guidelines to follow when [opening an issue](https://github.com/FunkinCrew/Funkin/issues).
+This section provides guidelines to follow when [opening an issue](https://github.com/FunkinCrew/Funkin/issues).
## Requirements
Make sure you're playing:
-- the latest version of the game (currently v0.5.3)
+- the latest version of the game (currently v0.6.2)
- without any mods
- on [Newgrounds](https://www.newgrounds.com/portal/view/770371) or downloaded from [itch.io](https://ninja-muffin24.itch.io/funkin)
@@ -84,7 +86,7 @@ Here's a list of commonly suggested features and the reasons why they won't be a
| "Philly Glow" Effect from Psych Engine | https://github.com/FunkinCrew/Funkin/issues/3788#issuecomment-2688966982 |
| Importing Charts from Psych Engine (and other mod content) | https://github.com/FunkinCrew/Funkin/issues/2586#issuecomment-2125733327 |
| Backwards Compatibility for Modding | https://github.com/FunkinCrew/Funkin/issues/3949#issuecomment-2608391329 |
-| Lua Support | https://github.com/FunkinCrew/Funkin/issues/2643#issuecomment-2143718093 |
+| Lua Support | https://github.com/FunkinCrew/Funkin/issues/2643#issuecomment-2143718093 |
## Issue Types
@@ -122,6 +124,9 @@ Also only report one issue or enhancement at a time! If you have multiple bug re
Once you're sure your issue is unique and specific, feel free to submit it.
+> [!IMPORTANT]
+> **DO NOT CLOSE YOUR ISSUE FOR ANY REASON!** Your issue will be taken care of by a moderator!
+
**Thank you for opening issues!**
# Part 3: Pull Requests
@@ -133,6 +138,7 @@ When creating a branch in your fork, base your branch on either the `main` or `d
> [!CAUTION]
> Avoid using your fork's default branch (`main` in this case) for your PR. This is considered an [anti-pattern](https://jmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/) by GitHub themselves!
+> Instead, make a separate branch for your additions (ex. `docs/fix-typo` or `minor-bugfix`).
Choose the `main` branch if you modify:
- Documentation (`.md` files)
@@ -165,85 +171,173 @@ This process reapplies your changes on top of the updated branch and cleanly res
> This guide does not cover compiling. If you have trouble compiling the game, refer to the [Compilation Guide](https://github.com/FunkinCrew/Funkin/blob/main/docs/COMPILING.md).
Code-based PRs make changes such as **fixing bugs** or **implementing new features** in the game.
+
This involves modifying one or several of the repository’s `.hx` files, found within the `source/` folder.
### Codestyle
-Before submitting your PR, check that your code follows the [Style Guide](https://github.com/FunkinCrew/Funkin/blob/main/docs/style-guide.md).
+Before submitting your PR, check that your code follows the [Style Guide](https://github.com/FunkinCrew/Funkin/blob/main/docs/style-guide.md). This keeps your code consistent with the rest of the codebase!
+### Code comments
+Code comments help others understand your changes, so the way you write them is important!
Here are some guidelines for writing comments in your code:
-- Leave comments only when you believe a piece of code warrants explanation.
+- Leave comments only when you believe a piece of code warrants explanation. If a piece of code is self-explanatory, it does not need a comment.
- Ensure that your comments provide meaningful insight into the function or purpose of the code.
- Write your comments in a clear and concise manner.
- Only sign your comments with your name when your changes are complex and may require further explanation.
-### Example Comments
+### Example code comments
#### DO NOT:
+Below are examples of what you SHOULD NOT do when writing code comments.
```haxe
- /**
- * jumps around the song
- * works with bpm changes but skipped notes still hurt
- * @param sections how many sections to jump, negative = backwards
- */
- function changeSection(sections:Int):Void
+/**
+ * jumps around the song
+ * works with bpm changes but skipped notes still hurt
+ * @param sections how many sections to jump, negative = backwards
+ */
+function changeSection(sections:Int):Void
+{
+ // Pause the music, as you probably guessed
+ // FlxG.sound.music.pause();
+
+ // Set the target time in steps, I don’t really get how this works though lol - [GitHub username]
+ var targetTimeSteps:Float = Conductor.instance.currentStepTime + (Conductor.instance.stepsPerMeasure * sections);
+ var targetTimeMs:Float = Conductor.instance.getStepTimeInMs(targetTimeSteps);
+
+ // Don't go back in time to before the song started, that would probably break a lot of things and cause a bunch of problems!
+ targetTimeMs = Math.max(0, targetTimeMs);
+
+ if (FlxG.sound.music != null) // If the music is not null, set the time to the target time
{
- // Pause the music, as you probably guessed
- // FlxG.sound.music.pause();
-
- // Set the target time in steps, I don’t really get how this works though lol - [GitHub username]
- var targetTimeSteps:Float = Conductor.instance.currentStepTime + (Conductor.instance.stepsPerMeasure * sections);
- var targetTimeMs:Float = Conductor.instance.getStepTimeInMs(targetTimeSteps);
-
- // Don't go back in time to before the song started, that would probably break a lot of things and cause a whole bunch of problems!
- targetTimeMs = Math.max(0, targetTimeMs);
-
- if (FlxG.sound.music != null) // If the music is not null, set the time to the target time
- {
- FlxG.sound.music.time = targetTimeMs;
- }
-
- // Handle skipped notes and events and all that jazz
- handleSkippedNotes();
- SongEventRegistry.handleSkippedEvents(songEvents, Conductor.instance.songPosition);
- // regenNoteData(FlxG.sound.music.time);
-
- Conductor.instance.update(FlxG.sound?.music?.time ?? 0.0);
-
- // I hate this function - [GitHub username]
- resyncVocals();
+ FlxG.sound.music.time = targetTimeMs;
}
+
+ // Handle skipped notes and events and all that jazz
+ handleSkippedNotes();
+ SongEventRegistry.handleSkippedEvents(songEvents, Conductor.instance.songPosition);
+ // regenNoteData(FlxG.sound.music.time);
+
+ Conductor.instance.update(FlxG.sound?.music?.time ?? 0.0);
+
+ // I hate this function - [GitHub username]
+ resyncVocals();
+}
+```
+
+```haxe
+// End the song when the music is complete.
+FlxG.sound.music.onComplete = function() {
+ endSong(skipEndingTransition);
+};
+// A negative instrumental offset means the song skips the first few milliseconds of the track.
+// This just gets added into the startTimestamp behavior so we don't need to do anything extra.
+FlxG.sound.music.play(true, Math.max(0, startTimestamp - Conductor.instance.combinedOffset));
+FlxG.sound.music.pitch = playbackRate;
+
+// Prevent the volume from being wrong.
+FlxG.sound.music.volume = 1.0;
+// IF fadetween is not null we cancel it
+if (FlxG.sound.music.fadeTween != null) FlxG.sound.music.fadeTween.cancel();
+
+// Play the vocals
+trace('Playing vocals...');
+// Add the vocals
+add(vocals);
+// Play the vocals for real this time lol
+vocals.play();
+// Set the vocals volume
+vocals.volume = 1.0;
+// Set the vocals pitch
+vocals.pitch = playbackRate;
+// Set the vocals time to the music time
+vocals.time = FlxG.sound.music.time;
+// trace('${FlxG.sound.music.time}');
+// trace('${vocals.time}');
+// functionThatWasntHereBeforeThisPRorSomethingIdKLOL();
+/* testsprite = new FlxSprite(0, 0);
+testsprite.loadGraphic(Paths.image('test'));
+testsprite.screenCenter();
+add(testsprite); */
+
+// Me too [GitHub username] I hate this function it gave me pain and suffering - Girlfriend
+resyncVocals();
+```
+
+```haxe
+#if FEATURE_DEBUG_FUNCTIONS
+// PAGEUP: who knows what this does
+// SHIFT+PAGEUP: There will be dire consequences.
+if (FlxG.keys.justPressed.PAGEUP) changeSection(FlxG.keys.pressed.SHIFT ? 20 : 2);
+// PAGEUP: who knows what this does
+// SHIFT+PAGEUP: There will be dire consequences.
+if (FlxG.keys.justPressed.PAGEDOWN) changeSection(FlxG.keys.pressed.SHIFT ? -20 : -2);
+#end
```
#### DO:
+Below are examples on what you SHOULD do when writing code comments.
```haxe
- /**
- * Jumps forward or backward a number of sections in the song.
- * Accounts for BPM changes, does not prevent death from skipped notes.
- * @param sections The number of sections to jump, negative to go backwards.
- */
- function changeSection(sections:Int):Void
+/**
+ * Jumps forward or backward a number of sections in the song.
+ * Accounts for BPM changes, does not prevent death from skipped notes.
+ * @param sections The number of sections to jump, negative to go backwards.
+ */
+function changeSection(sections:Int):Void
+{
+ var targetTimeSteps:Float = Conductor.instance.currentStepTime + (Conductor.instance.stepsPerMeasure * sections);
+ var targetTimeMs:Float = Conductor.instance.getStepTimeInMs(targetTimeSteps);
+
+ // Don't go back in time to before the song started.
+ targetTimeMs = Math.max(0, targetTimeMs);
+
+ if (FlxG.sound.music != null)
{
- var targetTimeSteps:Float = Conductor.instance.currentStepTime + (Conductor.instance.stepsPerMeasure * sections);
- var targetTimeMs:Float = Conductor.instance.getStepTimeInMs(targetTimeSteps);
-
- // Don't go back in time to before the song started.
- targetTimeMs = Math.max(0, targetTimeMs);
-
- if (FlxG.sound.music != null)
- {
- FlxG.sound.music.time = targetTimeMs;
- }
-
- handleSkippedNotes();
- SongEventRegistry.handleSkippedEvents(songEvents, Conductor.instance.songPosition);
-
- Conductor.instance.update(FlxG.sound?.music?.time ?? 0.0);
-
- resyncVocals();
+ FlxG.sound.music.time = targetTimeMs;
}
+
+ handleSkippedNotes();
+ SongEventRegistry.handleSkippedEvents(songEvents, Conductor.instance.songPosition);
+
+ Conductor.instance.update(FlxG.sound?.music?.time ?? 0.0);
+
+ resyncVocals();
+}
+```
+
+```haxe
+FlxG.sound.music.onComplete = function() {
+ endSong(skipEndingTransition);
+};
+// A negative instrumental offset means the song skips the first few milliseconds of the track.
+// This just gets added into the startTimestamp behavior so we don't need to do anything extra.
+FlxG.sound.music.play(true, Math.max(0, startTimestamp - Conductor.instance.combinedOffset));
+FlxG.sound.music.pitch = playbackRate;
+
+// Prevent the volume from being wrong.
+FlxG.sound.music.volume = 1.0;
+if (FlxG.sound.music.fadeTween != null) FlxG.sound.music.fadeTween.cancel();
+
+trace('Playing vocals...');
+add(vocals);
+vocals.play();
+vocals.volume = 1.0;
+vocals.pitch = playbackRate;
+vocals.time = FlxG.sound.music.time;
+resyncVocals();
+```
+
+```haxe
+#if FEATURE_DEBUG_FUNCTIONS
+// PAGEUP: Skip forward two sections.
+// SHIFT+PAGEUP: Skip forward twenty sections.
+if (FlxG.keys.justPressed.PAGEUP) changeSection(FlxG.keys.pressed.SHIFT ? 20 : 2);
+// PAGEDOWN: Skip backward two section. Doesn't replace notes.
+// SHIFT+PAGEDOWN: Skip backward twenty sections.
+if (FlxG.keys.justPressed.PAGEDOWN) changeSection(FlxG.keys.pressed.SHIFT ? -20 : -2);
+#end
```
## Documentation PRs
-Documentation-based PRs make changes such as **fixing typos** or **adding new information** in documentation files.
+Documentation-based PRs make changes such as **fixing typos** or **adding new information** in documentation files.
This involves modifying one or several of the repository’s `.md` files, found throughout the repository.
@@ -297,7 +391,25 @@ If you simultaneously modify files from both repositories, then open two separat
Be sure to choose `main` as the base branch for `funkin.assets` PRs, as no `develop` branch exists for that repository.
+### Charting PRs
+Charting PRs make changes such as **adding/removing notes** or **adjusting the placement of song events**.
+
+This involves modifying one or several of the `funkin.assets` repository's `.json` chart files, found in the `preload/data/songs/` directory.
+
+These PRs should only be opened in the `funkin.assets` repository.
+
+> [!CAUTION]
+> **No Major Recharts!** Any PR that makes major chart modifications will be rejected.
+> Keep your PRs to small tweaks and fixes.
+
+Here are some guidelines for opening a Charting PR:
+- **Explain the issue.** Which song, variation, difficulty, and section/timestamp is the problem in? Help us understand with screenshots and videos.
+- **Show your changes.** How does the chart look with your changes? Provide screenshots and videos here as well.
+- **Minimize the diff.** If your changes are very small (e.g. a few notes), do not re-export the chart using the Chart Editor. Instead, manually edit the `.json` chart files to help GitHub display your changes cleanly.
+
+If your PR is accepted, you will be credited as a GitHub contributor (but not as a charter in the Pause Menu).
+
# Closing
Thank you for reading the Contributing Guide.
-We look forward to seeing your contributions to the game!
+We look forward to seeing your contributions to the game!
\ No newline at end of file
diff --git a/docs/Funkin' Debug Hotkeys.md b/docs/Funkin' Debug Hotkeys.md
index cf85c6c59..9c10f060c 100644
--- a/docs/Funkin' Debug Hotkeys.md
+++ b/docs/Funkin' Debug Hotkeys.md
@@ -3,6 +3,7 @@
Most of this functionality is only available on debug builds of the game!
## Any State
+- `INSERT`: ***MEMORY GARBAGE COLLECTION***: Immediately perform memory garbage collection.
- `F2`: ***OVERLAY***: Enables the Flixel debug overlay, which has partial support for scripting.
- `F3`: ***SCREENSHOT***: Takes a screenshot of the game and saves it to the local `screenshots` directory. Works outside of debug builds too!
- `F4`: ***EJECT***: Forcibly switch state to the Main Menu (with no extra transition). Useful if you're stuck in a level and you need to get out!
@@ -11,6 +12,9 @@ Most of this functionality is only available on debug builds of the game!
- `CTRL-SHIFT-L`: ***FORCE CRASH***: Immediately crash the game with a detailed crash log and a stack trace.
+## Loading State
+- `SPACE`: Trace callbacks.
+
## **Play State**
- `H`: ***HIDE UI***: Makes the user interface invisible. Works in Pause Menu, great for screenshots.
- `1`: ***END SONG***: Immediately ends the song and moves to Results Screen on Freeplay, or next song on Story Mode.
@@ -19,20 +23,29 @@ Most of this functionality is only available on debug builds of the game!
- `9`: NEATO!
- `PAGEUP` (MacOS: `Fn-Up`): ***FORWARDS TIME TRAVEL***: Move forward by 2 sections. Hold SHIFT to move forward by 20 sections instead.
- `PAGEDOWN` (MacOS: `Fn-Down`): ***BACKWARDS TIME TRAVEL***: Move backward by 2 sections. Hold SHIFT to move backward by 20 sections instead.
+- `CHART Hotkey`: ***OPEN CHART EDITOR***: Open the Chart Editor with the current song loaded.
+- `STAGE Hotkey`: ***OPEN STAGE EDITOR***: Open the old Stage Editor overlay.
## **Freeplay State**
-- `F` (Freeplay Menu) - Move to Favorites
-- `Q` (Freeplay Menu) - Back one category
-- `E` (Freeplay Menu) - Forward one category
+- `P`: ***SWITCH TO PICO/BF***: Switch to Pico or BF (reopens Freeplay as the other character).
+- `T`: ***TEST RANK ANIMATION***: Play the Gold Perfect rank animation on the currently selected song.
+- `SHIFT-ACCEPT`: ***BOTPLAY MODE***: Start a song with Botplay mode enabled.
+- `CTRL-Switch Song`: Play the first unlocked alternate instrumental as the song preview.
+- `CTRL-LEFT`/`RIGHT`/`UP`/`DOWN`: ***OFFSET BF DJ IN CARTOON STATE***: While BF DJ's TV animation is playing, offset the DJ by 1 pixel in the opposite direction. `SHIFT` to move 10 pixels, `ALT` to move 0.1 pixels.
+- `CTRL-C`: ***TRIGGER DJ CARTOON***: Play the Freeplay DJ's cartoon animation. Press again to return to its regular animation.
## **Title State**
-- `Y` - WOAH
+- `ESCAPE`: ***QUIT***: Quit the game.
+- `D`: COOL
+- `UI LEFT`/`UI RIGHT Hotkey`: 2COOL
+- `Y`: WOAH
## **Main Menu**
- `~`: ***DEBUG***: Opens a menu to access the Chart Editor and other work-in-progress editors. Rebindable in the options menu.
+- `SHIFT-ACCEPT`: ***OPEN FREEPLAY AS PICO***: When selecting Freeplay, open the Freeplay menu with the playable character set to Pico.
- `CTRL-ALT-SHIFT-W`: ***ALL ACCESS***: Unlocks all songs in Freeplay. Only available on debug builds.
- `CTRL-ALT-SHIFT-M`: ***NO MORE ACCESS***: Re-locks all songs in Freeplay except those unlocked by default. Only available on debug builds.
- `CTRL-ALT-SHIFT-R`: ***GREAT SCORE?***: Give the user a hypothetical overridden score, and see if we can maintain that golden P rank. Only available on debug builds.
- `CTRL-ALT-SHIFT-P`: ***CHARACTER UNLOCK SCREEN***: Forces the Character Select screen to play Pico's unlocking animation. Only available on debug builds.
- `CTRL-ALT-SHIFT-N`: ***CHARACTER NOT SEEN***: Marks all characters as not seen and enables BF's new character unlocked animation in Freeplay. Only available on debug builds.
-- `CTRL-ALT-SHIFT-E`: ***DUMP SAVE DATA***: Prompts the user to save their save data as a JSON file, so its contents can be viewed. Only available on debug builds.
\ No newline at end of file
+- `CTRL-ALT-SHIFT-E`: ***DUMP SAVE DATA***: Prompts the user to save their save data as a JSON file, so its contents can be viewed. Only available on debug builds.
diff --git a/docs/style-guide.md b/docs/style-guide.md
index 4c4e01492..4df4a163d 100644
--- a/docs/style-guide.md
+++ b/docs/style-guide.md
@@ -4,7 +4,7 @@ This short document is designed to give a run-down on how code should be formatt
## Notes on IDEs and Extensions
-The Visual Studio Code IDE is highly recommended, as this repo contains various configuration that works with VSCode extensions to automatically style certain things for you.
+The Visual Studio Code IDE is highly recommended, as this repo contains various configurations that work with VSCode extensions to automatically style certain things for you.
VSCode is also the only IDE that has any good tools for Haxe so yeah.