A static class which holds any functions related to scoring.

Static variables

@:value(100)staticfinalread onlyLEGACY_BAD_SCORE:Int = 100

The score a note receives when hit within the Bad threshold.

@:value(0.9)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.

@:value(200)staticfinalread onlyLEGACY_GOOD_SCORE:Int = 200

The score a note receives when hit within the Good threshold.

@:value(0.75)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.

@:value((10 / 60) * 1000)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.

@:value(-10)staticfinalread onlyLEGACY_MISS_SCORE:Int = -10

The score a note receives when missed.

@:value(50)staticfinalread onlyLEGACY_SHIT_SCORE:Int = 50

The score a note receives when hit within the Shit threshold.

@:value(1.0)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.

@:value(350)staticfinalread onlyLEGACY_SICK_SCORE:Int = 350

The score a note receives when hit within the Sick threshold.

@:value(0.2)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.

@:value(135.0)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

@:value(90.0)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

@:value(12.5)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

@:value(500)staticfinalread onlyPBOT1_MAX_SCORE:Int = 500

The maximum score a note can receive.

@:value(9.0)staticfinalread onlyPBOT1_MIN_SCORE:Float = 9.0

The minimum score a note can receive while still being considered a hit.

@:value(-100)staticfinalread onlyPBOT1_MISS_SCORE:Int = -100

The score a note receives when it is missed.

@:value(160.0)staticfinalread onlyPBOT1_MISS_THRESHOLD:Float = 160.0

The threshold at which a note hit is considered missed. 160ms

@:value(5.0)staticfinalread onlyPBOT1_PERFECT_THRESHOLD:Float = 5.0

The threshold at which a note hit is considered perfect and always given the max score.

@:value(54.99)staticfinalread onlyPBOT1_SCORING_OFFSET:Float = 54.99

The offset of the sigmoid curve for the scoring function.

@:value(0.080)staticfinalread onlyPBOT1_SCORING_SLOPE:Float = 0.080

The slope of the sigmoid curve for the scoring function.

@:value(160.0)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

@:value(45.0)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

@:value(100)staticfinalread onlyWEEK7_BAD_SCORE:Int = 100

@:value(0.8)staticfinalread onlyWEEK7_BAD_THRESHOLD:Float = 0.8

@:value(200)staticfinalread onlyWEEK7_GOOD_SCORE:Int = 200

@:value(0.55)staticfinalread onlyWEEK7_GOOD_THRESHOLD:Float = 0.55

@:value(LEGACY_HIT_WINDOW)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.

@:value(-10)staticfinalread onlyWEEK7_MISS_SCORE:Int = -10

@:value(50)staticfinalread onlyWEEK7_SHIT_SCORE:Int = 50

@:value(350)staticfinalread onlyWEEK7_SICK_SCORE:Int = 350

@:value(0.2)staticfinalread onlyWEEK7_SICK_THRESHOLD:Float = 0.2

Static methods

staticcalculateRank(scoreData:Null<SaveScoreData>):Null<ScoringRank>

@:value({ scoringSystem : PBOT1 })staticgetMissScore(scoringSystem:ScoringSystem = PBOT1):Int

@:value({ scoringSystem : PBOT1 })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.

@:value({ scoringSystem : PBOT1 })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;