Description
· 1.5 KiB · Text
Исходник
So for NX, NX2, NXA(Not Tested) the score works like that.
We have a few defined integer globals:
SCORE_PERFECT = 1000 // This is if you hit a perfect
SCORE_GREAT = 500
SCORE_GOOD = 100
SCORE_BAD = -200
SCORE_MISS = -500
SCORE_MISS_LONGNOTE = -300
SCORE_NIGHTMARE_BONUS = 500000 // If the music is double, you get this more at score.
SCORE_GRADE_S = 100000 // If you got S, this is added too.
this is usually used as a ENUM. So for getting scores, we have a little formulae:
Basicly, we use 4 things to calculate: Judgment (those PERFECT, GREAT, GOOD), Combo, Note Number, and a boolean that if is a long note body.
Ok so for calculating, if is a we use a variable integer Score.
if is a long note and the judgement is miss, we have Score = SCORE_MISS_LONGNOTE (that is -300)
else, we have the other table values.
Ok so this is not the only thing to calc.
If the judgment is less or equal that Great, we have following conditions:
if Combo >= 51 we add 1000
if NoteNum >= 4 we multiply by 2 else if NoteNum >= 3 we multiply by 1.5
This score is added to global score (aka Song Score).
If its a double side, we add SCORE_NIGHTMARE_BONUS, and if it got S, we add SCORE_GRADE_S
So its like:
if (IsLongNote && (Judgment == eMiss))
Score = SCORE_MISS_LONGNOTE;
else
Score = ScoreTable[Judgment - ePerfect];
if (Judgment <= eGreat) {
if (Combo >= 51)
Score += 1000;
if (NoteNum >= 4)
Score *= 2;
else if (NoteNum >= 3)
Score = int(Score * 1.5f);
}
return Score;
| 1 | So for NX, NX2, NXA(Not Tested) the score works like that. |
| 2 | |
| 3 | We have a few defined integer globals: |
| 4 | SCORE_PERFECT = 1000 // This is if you hit a perfect |
| 5 | SCORE_GREAT = 500 |
| 6 | SCORE_GOOD = 100 |
| 7 | SCORE_BAD = -200 |
| 8 | SCORE_MISS = -500 |
| 9 | SCORE_MISS_LONGNOTE = -300 |
| 10 | SCORE_NIGHTMARE_BONUS = 500000 // If the music is double, you get this more at score. |
| 11 | SCORE_GRADE_S = 100000 // If you got S, this is added too. |
| 12 | |
| 13 | this is usually used as a ENUM. So for getting scores, we have a little formulae: |
| 14 | |
| 15 | Basicly, we use 4 things to calculate: Judgment (those PERFECT, GREAT, GOOD), Combo, Note Number, and a boolean that if is a long note body. |
| 16 | |
| 17 | Ok so for calculating, if is a we use a variable integer Score. |
| 18 | |
| 19 | if is a long note and the judgement is miss, we have Score = SCORE_MISS_LONGNOTE (that is -300) |
| 20 | else, we have the other table values. |
| 21 | |
| 22 | Ok so this is not the only thing to calc. |
| 23 | If the judgment is less or equal that Great, we have following conditions: |
| 24 | if Combo >= 51 we add 1000 |
| 25 | if NoteNum >= 4 we multiply by 2 else if NoteNum >= 3 we multiply by 1.5 |
| 26 | |
| 27 | |
| 28 | This score is added to global score (aka Song Score). |
| 29 | |
| 30 | If its a double side, we add SCORE_NIGHTMARE_BONUS, and if it got S, we add SCORE_GRADE_S |
| 31 | So its like: |
| 32 | |
| 33 | if (IsLongNote && (Judgment == eMiss)) |
| 34 | Score = SCORE_MISS_LONGNOTE; |
| 35 | else |
| 36 | Score = ScoreTable[Judgment - ePerfect]; |
| 37 | |
| 38 | |
| 39 | if (Judgment <= eGreat) { |
| 40 | if (Combo >= 51) |
| 41 | Score += 1000; |
| 42 | if (NoteNum >= 4) |
| 43 | Score *= 2; |
| 44 | else if (NoteNum >= 3) |
| 45 | Score = int(Score * 1.5f); |
| 46 | } |
| 47 | return Score; |
| 48 |