A static class which holds any functions related to scoring.
Static variables
staticfinalread onlyLEGACY_BAD_SCORE:Int = 100
The score a note receives when hit within the Bad threshold.
staticfinalread onlyLEGACY_BAD_THRESHOLD:Float = 0.9
The threshold at which a note is considered a "Bad" hit rather than another judgement. Represented as a percentage of the total hit window.
staticfinalread onlyLEGACY_GOOD_SCORE:Int = 200
The score a note receives when hit within the Good threshold.
staticfinalread onlyLEGACY_GOOD_THRESHOLD:Float = 0.75
The threshold at which a note is considered a "Good" hit rather than another judgement. Represented as a percentage of the total hit window.
staticfinalread onlyLEGACY_HIT_WINDOW:Float = (10 / 60) * 1000
The window of time in which a note is considered to be hit, on the Funkin Legacy scoring system. Currently equal to 10 frames at 60fps, or ~166ms.
staticfinalread onlyLEGACY_SHIT_SCORE:Int = 50
The score a note receives when hit within the Shit threshold.
staticfinalread onlyLEGACY_SHIT_THRESHOLD:Float = 1.0
The score a note receives when hit within the Shit threshold, rather than a miss. Represented as a percentage of the total hit window.
staticfinalread onlyLEGACY_SICK_SCORE:Int = 350
The score a note receives when hit within the Sick threshold.
staticfinalread onlyLEGACY_SICK_THRESHOLD:Float = 0.2
The threshold at which a note is considered a "Sick" hit rather than another judgement. Represented as a percentage of the total hit window.
staticfinalread onlyPBOT1_BAD_THRESHOLD:Float = 135.0
The time within which a note is considered to have been hit with the Bad judgement.
~85% of the hit window, or 135ms
staticfinalread onlyPBOT1_GOOD_THRESHOLD:Float = 90.0
The time within which a note is considered to have been hit with the Good judgement.
~55% of the hit window, or 90ms
staticfinalread onlyPBOT1_KILLER_THRESHOLD:Float = 12.5
The time within which a note is considered to have been hit with the Killer judgement.
~7.5% of the hit window, or 12.5ms
staticfinalread onlyPBOT1_MIN_SCORE:Float = 9.0
The minimum score a note can receive while still being considered a hit.
staticfinalread onlyPBOT1_MISS_THRESHOLD:Float = 160.0
The threshold at which a note hit is considered missed.
160ms
staticfinalread onlyPBOT1_PERFECT_THRESHOLD:Float = 5.0
The threshold at which a note hit is considered perfect and always given the max score.
staticfinalread onlyPBOT1_SCORING_OFFSET:Float = 54.99
The offset of the sigmoid curve for the scoring function.
staticfinalread onlyPBOT1_SCORING_SLOPE:Float = 0.080
The slope of the sigmoid curve for the scoring function.
staticfinalread onlyPBOT1_SHIT_THRESHOLD:Float = 160.0
The time within which a note is considered to have been hit with the Shit judgement.
100% of the hit window, or 160ms
staticfinalread onlyPBOT1_SICK_THRESHOLD:Float = 45.0
The time within which a note is considered to have been hit with the Sick judgement.
~25% of the hit window, or 45ms
staticfinalread onlyWEEK7_HIT_WINDOW:Float = LEGACY_HIT_WINDOW
The window of time in which a note is considered to be hit, on the Funkin Classic scoring system. Same as L 10 frames at 60fps, or ~166ms.
Static methods
staticjudgeNote(msTiming:Float, scoringSystem:ScoringSystem = PBOT1):String
Determine the judgement a note receives under a given scoring system.
Parameters:
msTiming | The difference between the note's time and when it was hit. |
|---|---|
scoringSystem | The scoring system to use. |
Returns:
The judgement the note receives.
staticscoreNote(msTiming:Float, scoringSystem:ScoringSystem = PBOT1):Int
Determine the score a note receives under a given scoring system.
Parameters:
msTiming | The difference between the note's time and when it was hit. |
|---|---|
scoringSystem | The scoring system to use. |
Returns:
The score the note receives.
statictallyCompletion(?tallies:Null<SaveScoreTallyData>):Float
Calculates the "completion" of a song, based on how many GOOD and SICK notes were hit, minus how many were missed Top secret funkin crew patented algorithm TODO: Could possibly move more of the "tallying" related handling here.
In FreeplayState we make sure it's clamped between 0 and 1, and we probably always want to assume that?
Parameters:
tallies |
|---|
Returns:
Float Completion, as a float value between 0 and 1. If tallies is null, we return 0;