Skip to content

[FEATURE] Move songScore to a new class - #7647

Open
zxcksharks wants to merge 2 commits into
FunkinCrew:developfrom
zxcksharks:song-score-class
Open

[FEATURE] Move songScore to a new class#7647
zxcksharks wants to merge 2 commits into
FunkinCrew:developfrom
zxcksharks:song-score-class

Conversation

@zxcksharks

@zxcksharks zxcksharks commented May 28, 2026

Copy link
Copy Markdown

Note

Breaking change - all scripts using songScore must now reference SongScore.instance.getScore().

Linked Issues

N/A

Description

In PlayState.hx, songScore used to have a TODO comment saying "Move this to a class."
Not sure if that's still needed, but I did it anyway! This allows us to add further logic into score logic when needed.

This used to be part of a bigger PR I was working on, regarding held note scoring consistency.
However, I'm holding off (giving up?) on that for now until some other PRs are pulled (namely #6914) and until my psyche recovers (my contributions to FNF last about as long as I am motivated, and I can't promise anything 😭 )

For the details on the incomplete held note scoring PR, if anyone wants to tackle it themselves if I die or just out of curiosity (it's worked on in my accurate-sustains branch):

  • Add a field called pendingPoints and function getWithPending() to the new SongScore class
  • Currently held notes will apply their score there as an integer, instead of at the real points variable
  • Hold notes will also hold a new appliedScore field, tracking how much score they've applied to pendingScore so far
  • Move player hold note logic to processInputQueue (maybe into a function called goodHoldNoteHit())
  • When held notes are released, calculate the diff like you would in goodNoteHit(), remove the appliedScore from the pendingScore, and apply the real score to points.
    This would be a massive change in input handling, which is why I didn't do it 😅

Screenshots/Videos

N/A

@github-actions github-actions Bot added status: pending triage Awaiting review. size: huge A huge pull request with more than 500 changes. labels May 28, 2026
@zxcksharks

Copy link
Copy Markdown
Author

i targeted the wrong branch whoops

@github-actions github-actions Bot added pr: haxe PR modifies game code. pr: documentation PR modifies documentation or README files. pr: github PR modifies GitHub metadata files. and removed status: pending triage Awaiting review. size: huge A huge pull request with more than 500 changes. labels May 28, 2026
@zxcksharks
zxcksharks changed the base branch from main to develop May 28, 2026 16:24
@NotHyper-474 NotHyper-474 added status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. type: enhancement Involves an enhancement or new feature. and removed pr: documentation PR modifies documentation or README files. pr: github PR modifies GitHub metadata files. labels May 28, 2026
@NotHyper-474

NotHyper-474 commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Does this have any difference over #5114? (Although it doesn't seem like that one will be updated anytime soon)

@NotHyper-474 NotHyper-474 added status: needs clarification Requires more info from the author. and removed status: pending triage Awaiting review. labels May 28, 2026
@zxcksharks

Copy link
Copy Markdown
Author

Does this have any difference over #5114? (Although it doesn't seem like that one will be updated anytime soon)

Not much, but it does use a singleton pattern instead of a static class
(Though I don't know if I'm doing singletons right... I'm just using the interface 😅)

@NotHyper-474 NotHyper-474 added status: pending triage Awaiting review. and removed status: needs clarification Requires more info from the author. labels May 28, 2026
@Hundrec Hundrec changed the title [FEATURE] Moved songScore to a new class [FEATURE] Move songScore to a new class May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. type: enhancement Involves an enhancement or new feature.

Development

Successfully merging this pull request may close these issues.

2 participants