Change scoring according to http://www.aaroninjapan.com/ddr2.html
and fix inaccurate comments
This commit is contained in:
@@ -80,6 +80,8 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
GAMESTATE->m_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
|
GAMESTATE->m_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
http://www.aaroninjapan.com/ddr2.html
|
||||||
|
|
||||||
A single step's points are calculated as follows:
|
A single step's points are calculated as follows:
|
||||||
|
|
||||||
p = score multiplier (Perfect = 10, Great = 5, other = 0)
|
p = score multiplier (Perfect = 10, Great = 5, other = 0)
|
||||||
@@ -90,14 +92,15 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
So, the score for one step is:
|
So, the score for one step is:
|
||||||
one_step_score = p * (B/S) * n
|
one_step_score = p * (B/S) * n
|
||||||
|
|
||||||
*IMPORTANT* : Double steps (U+L, D+R, etc.) count as two steps instead of one, so
|
*IMPORTANT* : Double steps (U+L, D+R, etc.) count as two steps instead of one *for your combo count only*,
|
||||||
if you get a double L+R on the 112th step of a song, you score is calculated with a
|
so if you get a double L+R on the 112th step of a song, you score is calculated for only one step, not two,
|
||||||
Perfect/Great/whatever for both the 112th and 113th steps. Got it? Now, through simple
|
as the combo counter might otherwise imply.
|
||||||
algebraic manipulation
|
|
||||||
S = 1+...+N = (1+N)*N/2 (1 through N added together)
|
|
||||||
Okay, time for an example:
|
|
||||||
|
|
||||||
So, for example, suppose we wanted to calculate the step score of a "Great" on the 57th step of a 441 step, 8-foot difficulty song (I'm just making this one up):
|
Now, through simple algebraic manipulation:
|
||||||
|
S = 1+...+N = (1+N)*N/2 (1 through N added together)
|
||||||
|
|
||||||
|
Okay, time for an example. Suppose we wanted to calculate the step score of a "Great" on the 57th step of
|
||||||
|
a 441 step, 8-foot difficulty song (I'm just making this one up):
|
||||||
|
|
||||||
S = (1 + 441)*441 / 2
|
S = (1 + 441)*441 / 2
|
||||||
= 194,222 / 2
|
= 194,222 / 2
|
||||||
@@ -106,9 +109,13 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
= 5 * (8,000,000 / 97,461) * 57
|
= 5 * (8,000,000 / 97,461) * 57
|
||||||
= 5 * (82) * 57 (The 82 is rounded down from 82.08411...)
|
= 5 * (82) * 57 (The 82 is rounded down from 82.08411...)
|
||||||
= 23,370
|
= 23,370
|
||||||
Remember this is just the score for the step, not the cumulative score up to the 57th step. Also, please note that I am currently checking into rounding errors with the system and if there are any, how they are resolved in the system.
|
|
||||||
|
|
||||||
Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible score for any song is the number of feet difficulty X 10,000,000.
|
Remember this is just the score for the step, not the cumulative score up to the 57th step. Also, please note that
|
||||||
|
I am currently checking into rounding errors with the system and if there are any, how they are resolved in the system.
|
||||||
|
|
||||||
|
Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible
|
||||||
|
score for any song is the number of feet difficulty X 10,000,000.
|
||||||
|
|
||||||
3dfsux:
|
3dfsux:
|
||||||
I redid this code so it will store the score as a long, then correct the score for each song based on that value.
|
I redid this code so it will store the score as a long, then correct the score for each song based on that value.
|
||||||
lScore == p * n
|
lScore == p * n
|
||||||
@@ -116,7 +123,6 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
keeping these seperate for as long as possible improves accuracy.
|
keeping these seperate for as long as possible improves accuracy.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
// for( int i=0; i<iNumTapsInRow; i++ )
|
|
||||||
AddScore( scoreOfLastTap ); // only score once per row
|
AddScore( scoreOfLastTap ); // only score once per row
|
||||||
|
|
||||||
|
|
||||||
@@ -131,7 +137,9 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
}
|
}
|
||||||
#endif //DEBUG
|
#endif //DEBUG
|
||||||
|
|
||||||
// combo of marvelous/perfect
|
//
|
||||||
|
// Toasty combo
|
||||||
|
//
|
||||||
switch( scoreOfLastTap )
|
switch( scoreOfLastTap )
|
||||||
{
|
{
|
||||||
case TNS_MARVELOUS:
|
case TNS_MARVELOUS:
|
||||||
@@ -147,31 +155,48 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Regular combo
|
||||||
|
//
|
||||||
int &iCurCombo = GAMESTATE->m_CurStageStats.iCurCombo[m_PlayerNumber];
|
int &iCurCombo = GAMESTATE->m_CurStageStats.iCurCombo[m_PlayerNumber];
|
||||||
|
int iOldCombo = iCurCombo;
|
||||||
|
|
||||||
|
/*
|
||||||
|
http://www.aaroninjapan.com/ddr2.html
|
||||||
|
|
||||||
|
Note on ONI Mode scoring
|
||||||
|
|
||||||
|
Your combo counter only increased with a "Marvelous/Perfect", and double Marvelous/Perfect steps (left and right, etc.)
|
||||||
|
only add 1 to your combo instead of 2. The combo counter thus becomes a "Marvelous/Perfect" counter.
|
||||||
|
*/
|
||||||
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
{
|
||||||
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
case PLAY_MODE_NONSTOP:
|
||||||
|
case PLAY_MODE_ENDLESS:
|
||||||
switch( scoreOfLastTap )
|
switch( scoreOfLastTap )
|
||||||
{
|
{
|
||||||
case TNS_MARVELOUS:
|
case TNS_MARVELOUS:
|
||||||
case TNS_PERFECT:
|
case TNS_PERFECT:
|
||||||
case TNS_GREAT:
|
case TNS_GREAT:
|
||||||
{
|
iCurCombo += iNumTapsInRow;
|
||||||
int iOldCombo = iCurCombo;
|
break;
|
||||||
|
}
|
||||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI )
|
break;
|
||||||
{
|
case PLAY_MODE_ONI:
|
||||||
switch( scoreOfLastTap )
|
switch( scoreOfLastTap )
|
||||||
{
|
{
|
||||||
case TNS_MARVELOUS:
|
case TNS_MARVELOUS:
|
||||||
case TNS_PERFECT:
|
case TNS_PERFECT:
|
||||||
iCurCombo++;
|
iCurCombo++;
|
||||||
break;
|
break;
|
||||||
case TNS_GREAT:
|
}
|
||||||
// int aosid = 4;
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
iCurCombo += iNumTapsInRow;
|
|
||||||
|
|
||||||
#define CROSSED( i ) (iOldCombo<i && i<=iCurCombo)
|
#define CROSSED( i ) (iOldCombo<i && i<=iCurCombo)
|
||||||
|
|
||||||
@@ -188,12 +213,13 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
|
|
||||||
// new max combo
|
// new max combo
|
||||||
GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max(GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], iCurCombo);
|
GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max(GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], iCurCombo);
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
switch( scoreOfLastTap )
|
||||||
|
{
|
||||||
case TNS_GOOD:
|
case TNS_GOOD:
|
||||||
case TNS_BOO:
|
case TNS_BOO:
|
||||||
case TNS_MISS:
|
case TNS_MISS:
|
||||||
{
|
|
||||||
// don't play "combo stopped" in battle
|
// don't play "combo stopped" in battle
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
@@ -206,10 +232,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
}
|
}
|
||||||
|
|
||||||
iCurCombo = 0;
|
iCurCombo = 0;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,19 +250,6 @@ void ScoreKeeperMAX2::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tap
|
|||||||
|
|
||||||
int ScoreKeeperMAX2::GetPossibleDancePoints( const NoteData* pNoteData )
|
int ScoreKeeperMAX2::GetPossibleDancePoints( const NoteData* pNoteData )
|
||||||
{
|
{
|
||||||
//Each song has a certain number of "Dance Points" assigned to it. For regular arrows, this is 2 per arrow. For freeze arrows, it is 6 per arrow. When you add this all up, you get the maximum number of possible "Dance Points".
|
|
||||||
//
|
|
||||||
//Your "Dance Points" are calculated as follows:
|
|
||||||
//
|
|
||||||
//A "Marvelous" is worth 3 points, but oniy when in oni mode
|
|
||||||
//A "Perfect" is worth 2 points
|
|
||||||
//A "Great" is worth 1 points
|
|
||||||
//A "Good" is worth 0 points
|
|
||||||
//A "Boo" will subtract 4 points
|
|
||||||
//A "Miss" will subtract 8 points
|
|
||||||
//An "OK" (Successful Freeze step) will add 6 points
|
|
||||||
//A "NG" (Unsuccessful Freeze step) is worth 0 points
|
|
||||||
|
|
||||||
/* Note that, if Marvelous timing is disabled or not active (not course mode),
|
/* Note that, if Marvelous timing is disabled or not active (not course mode),
|
||||||
* PERFECT will be used instead. */
|
* PERFECT will be used instead. */
|
||||||
|
|
||||||
@@ -257,26 +267,95 @@ int ScoreKeeperMAX2::TapNoteScoreToDancePoints( TapNoteScore tns )
|
|||||||
if(!PREFSMAN->m_bMarvelousTiming && tns == TNS_MARVELOUS)
|
if(!PREFSMAN->m_bMarvelousTiming && tns == TNS_MARVELOUS)
|
||||||
tns = TNS_PERFECT;
|
tns = TNS_PERFECT;
|
||||||
|
|
||||||
|
/*
|
||||||
|
http://www.aaroninjapan.com/ddr2.html
|
||||||
|
|
||||||
|
Regular play scoring
|
||||||
|
|
||||||
|
A "Perfect" is worth 2 points
|
||||||
|
A "Great" is worth 1 points
|
||||||
|
A "Good" is worth 0 points
|
||||||
|
A "Boo" will subtract 4 points
|
||||||
|
A "Miss" will subtract 8 points
|
||||||
|
An "OK" (Successful Freeze step) will add 6 points
|
||||||
|
A "NG" (Unsuccessful Freeze step) is worth 0 points
|
||||||
|
|
||||||
|
Note on ONI Mode scoring
|
||||||
|
|
||||||
|
The total number of Dance Points is calculated with Marvelous steps being worth 3 points, Perfects getting
|
||||||
|
2 points, OKs getting 3 points, Greats getting 1 point, and everything else is worth 0 points. (Note: The
|
||||||
|
"Marvelous" step rating is a new rating to DDR Extreme only used in Oni and Nonstop modes. They are rated
|
||||||
|
higher than "Perfect" steps).
|
||||||
|
|
||||||
|
Note on NONSTOP Mode scoring
|
||||||
|
|
||||||
|
A "Marvelous" is worth 2 points
|
||||||
|
A "Perfect" is also worth 2 points
|
||||||
|
A "Great" is worth 1 points
|
||||||
|
A "Good" is worth 0 points
|
||||||
|
A "Boo" will subtract 4 points
|
||||||
|
A "Miss" will subtract 8 points
|
||||||
|
An "OK" (Successful Freeze step) will add 6 points
|
||||||
|
A "NG" (Unsuccessful Freeze step) is worth 0 points
|
||||||
|
*/
|
||||||
|
|
||||||
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
{
|
||||||
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
case PLAY_MODE_ENDLESS:
|
||||||
|
case PLAY_MODE_NONSTOP:
|
||||||
switch( tns )
|
switch( tns )
|
||||||
{
|
{
|
||||||
case TNS_MARVELOUS: return bOni ? +3 : +2;
|
case TNS_MARVELOUS: return +2;
|
||||||
case TNS_PERFECT: return +2;
|
case TNS_PERFECT: return +2;
|
||||||
case TNS_GREAT: return +1;
|
case TNS_GREAT: return +1;
|
||||||
case TNS_GOOD: return +0;
|
case TNS_GOOD: return +0;
|
||||||
case TNS_BOO: return bOni ? 0 : -4;
|
case TNS_BOO: return -4;
|
||||||
case TNS_MISS: return bOni ? 0 : -8;
|
case TNS_MISS: return -8;
|
||||||
case TNS_NONE: return 0;
|
|
||||||
default: ASSERT(0); return 0;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case PLAY_MODE_ONI:
|
||||||
|
switch( tns )
|
||||||
|
{
|
||||||
|
case TNS_MARVELOUS: return +3;
|
||||||
|
case TNS_PERFECT: return +2;
|
||||||
|
case TNS_GREAT: return +1;
|
||||||
|
case TNS_GOOD: return +0;
|
||||||
|
case TNS_BOO: return +0;
|
||||||
|
case TNS_MISS: return +0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return +0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScoreKeeperMAX2::HoldNoteScoreToDancePoints( HoldNoteScore hns )
|
int ScoreKeeperMAX2::HoldNoteScoreToDancePoints( HoldNoteScore hns )
|
||||||
{
|
{
|
||||||
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
{
|
||||||
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
case PLAY_MODE_ENDLESS:
|
||||||
|
case PLAY_MODE_NONSTOP:
|
||||||
switch( hns )
|
switch( hns )
|
||||||
{
|
{
|
||||||
case HNS_OK: return GAMESTATE->IsCourseMode() ? +3 : +6;
|
case HNS_OK: return +6;
|
||||||
case HNS_NG: return +0;
|
case HNS_NG: return +0;
|
||||||
default: ASSERT(0); return 0;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case PLAY_MODE_ONI:
|
||||||
|
switch( hns )
|
||||||
|
{
|
||||||
|
case HNS_OK: return +3;
|
||||||
|
case HNS_NG: return +0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
return +0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user