updated groove radar values to store actually meaningful values (buggy). Algorithms used:
Voltage - ratio of perfects to total tap notes Stream - ratio of player max combo to possible max combo Air - ratio of jumps to total possible jumps Freeze - ratio of freeze arrows to total freeze arrows Chaos - dance points percentage Note: Multidimensional array stageStats.fRadarActual[p][r] is now a %, not width.
This commit is contained in:
@@ -28,6 +28,35 @@ void NoteDataWithScoring::Init()
|
||||
m_fHoldNoteLife.clear();
|
||||
}
|
||||
|
||||
int NoteDataWithScoring::GetMaxCombo() const
|
||||
{
|
||||
int iNumSuccessfulTapNotes = 0;
|
||||
int fEndBeat = GetMaxBeat()+1;
|
||||
|
||||
unsigned iStartIndex = BeatToNoteRow( (float)0 );
|
||||
unsigned iEndIndex = BeatToNoteRow( fEndBeat );
|
||||
|
||||
int combo = 0;
|
||||
int maxcombo = 0;
|
||||
|
||||
for( unsigned i=iStartIndex; i<min(float(iEndIndex), float(m_TapNoteScores[0].size())); i++ )
|
||||
{
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
if( this->GetTapNote(t, i) != TAP_EMPTY )
|
||||
if (GetTapNoteScore(t, i) >= TNS_GREAT)
|
||||
combo++;
|
||||
else
|
||||
{
|
||||
if (combo > maxcombo) maxcombo = combo;
|
||||
combo = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return max(combo, maxcombo);
|
||||
}
|
||||
|
||||
int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat, float fEndBeat ) const
|
||||
{
|
||||
int iNumSuccessfulTapNotes = 0;
|
||||
@@ -164,7 +193,7 @@ float NoteDataWithScoring::GetActualRadarValue( RadarCategory rv, float fSongSec
|
||||
|
||||
float NoteDataWithScoring::GetActualStreamRadarValue( float fSongSeconds ) const
|
||||
{
|
||||
// density of steps
|
||||
/* // density of steps
|
||||
int iNumSuccessfulNotes =
|
||||
GetNumTapNotesWithScore(TNS_MARVELOUS) +
|
||||
GetNumTapNotesWithScore(TNS_PERFECT) +
|
||||
@@ -173,11 +202,24 @@ float NoteDataWithScoring::GetActualStreamRadarValue( float fSongSeconds ) const
|
||||
float fNotesPerSecond = iNumSuccessfulNotes/fSongSeconds;
|
||||
float fReturn = fNotesPerSecond / 7;
|
||||
return min( fReturn, 1.0f );
|
||||
*/
|
||||
|
||||
int MaxCombo = GetMaxCombo();
|
||||
float TotalSteps = GetNumTapNotes();
|
||||
|
||||
return min( (float)MaxCombo/TotalSteps, 1.0f);
|
||||
}
|
||||
|
||||
float NoteDataWithScoring::GetActualVoltageRadarValue( float fSongSeconds ) const
|
||||
{
|
||||
float fAvgBPS = GetLastBeat() / fSongSeconds;
|
||||
// voltage is essentialy perfects divided by # of steps
|
||||
float totalnotes = GetNumTapNotes();
|
||||
float perfects = GetNumTapNotesWithScore(TNS_PERFECT) + GetNumTapNotesWithScore(TNS_MARVELOUS);
|
||||
|
||||
float result = perfects/totalnotes;
|
||||
return result;
|
||||
|
||||
/* float fAvgBPS = GetLastBeat() / fSongSeconds;
|
||||
|
||||
// peak density of steps
|
||||
float fMaxDensitySoFar = 0;
|
||||
@@ -198,6 +240,7 @@ float NoteDataWithScoring::GetActualVoltageRadarValue( float fSongSeconds ) cons
|
||||
|
||||
float fReturn = fMaxDensitySoFar*fAvgBPS/10;
|
||||
return min( fReturn, 1.0f );
|
||||
*/
|
||||
}
|
||||
|
||||
float NoteDataWithScoring::GetActualAirRadarValue( float fSongSeconds ) const
|
||||
@@ -207,13 +250,17 @@ float NoteDataWithScoring::GetActualAirRadarValue( float fSongSeconds ) const
|
||||
GetNumDoublesWithScore(TNS_MARVELOUS) +
|
||||
GetNumDoublesWithScore(TNS_PERFECT) +
|
||||
GetNumDoublesWithScore(TNS_GREAT)/2;
|
||||
float fReturn = iNumDoubles / fSongSeconds;
|
||||
// float fReturn = iNumDoubles / fSongSeconds;
|
||||
int iTotalDoubles = GetNumDoubles();
|
||||
|
||||
if (iTotalDoubles == 0) return 1.0f; // no jumps in song
|
||||
float fReturn = (float)iNumDoubles / iTotalDoubles;
|
||||
return min( fReturn, 1.0f );
|
||||
}
|
||||
|
||||
float NoteDataWithScoring::GetActualChaosRadarValue( float fSongSeconds ) const
|
||||
{
|
||||
// count number of triplets
|
||||
/* // count number of triplets
|
||||
int iNumChaosNotesCompleted = 0;
|
||||
for( unsigned r=0; r<m_TapNoteScores[0].size(); r++ )
|
||||
{
|
||||
@@ -223,12 +270,39 @@ float NoteDataWithScoring::GetActualChaosRadarValue( float fSongSeconds ) const
|
||||
|
||||
float fReturn = iNumChaosNotesCompleted / fSongSeconds * 0.5f;
|
||||
return min( fReturn, 1.0f );
|
||||
*/
|
||||
|
||||
float marvelous = GetNumTapNotesWithScore(TNS_MARVELOUS);
|
||||
float perfect = GetNumTapNotesWithScore(TNS_PERFECT);
|
||||
float great = GetNumTapNotesWithScore(TNS_GREAT);
|
||||
float good = GetNumTapNotesWithScore(TNS_GOOD);
|
||||
float boo = GetNumTapNotesWithScore(TNS_BOO);
|
||||
float miss = GetNumTapNotesWithScore(TNS_MISS);
|
||||
|
||||
float ok = GetNumHoldNotesWithScore(HNS_OK);
|
||||
float holdnotes = GetNumHoldNotes();
|
||||
|
||||
float DPEarned = 2 * (marvelous + perfect)
|
||||
+ (great)
|
||||
- 4 * (boo)
|
||||
- 8 * (miss)
|
||||
+ 6 * (ok);
|
||||
|
||||
float TotalDP = 2 * (marvelous + perfect + great
|
||||
+ good + boo + miss)
|
||||
+ 6 * holdnotes;
|
||||
|
||||
float fResult = DPEarned/TotalDP;
|
||||
|
||||
return min( fResult, 1.0f);
|
||||
}
|
||||
|
||||
float NoteDataWithScoring::GetActualFreezeRadarValue( float fSongSeconds ) const
|
||||
{
|
||||
// number of hold steps
|
||||
float fReturn = GetNumHoldNotesWithScore(HNS_OK) / fSongSeconds;
|
||||
float totalsteps = (float)GetNumHoldNotes();
|
||||
if (totalsteps == 0) return 1.0f;
|
||||
float fReturn = GetNumHoldNotesWithScore(HNS_OK) / totalsteps;
|
||||
return min( fReturn, 1.0f );
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ public:
|
||||
float GetActualAirRadarValue( float fSongSeconds ) const;
|
||||
float GetActualFreezeRadarValue( float fSongSeconds ) const;
|
||||
float GetActualChaosRadarValue( float fSongSeconds ) const;
|
||||
|
||||
int GetMaxCombo() const; // used for groove radar calculations
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -479,10 +479,17 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
|
||||
this->AddChild( &m_sprPossibleBar[p][r] );
|
||||
|
||||
m_sprActualBar[p][r].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation bar actual p%d",p+1)) );
|
||||
m_sprActualBar[p][r].SetWidth( m_sprActualBar[p][r].GetUnzoomedWidth() * stageStats.fRadarActual[p][r] );
|
||||
// should be out of the possible bar, not actual (whatever value that is at)
|
||||
m_sprActualBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * stageStats.fRadarActual[p][r] );
|
||||
|
||||
float value = (float)100 * m_sprActualBar[p][r].GetUnzoomedWidth() / m_sprPossibleBar[p][r].GetUnzoomedWidth();
|
||||
LOG->Trace("Radar bar %d of 5 - %f percent", r, value);
|
||||
|
||||
m_sprActualBar[p][r].SetName( ssprintf("BarActual%dP%d",r+1,p+1) );
|
||||
UtilSetXYAndOnCommand( m_sprActualBar[p][r], "ScreenEvaluation" );
|
||||
if( stageStats.fRadarActual[p][r] == stageStats.fRadarPossible[p][r] )
|
||||
|
||||
// .99999 is fairly close to 1.00, so we use that
|
||||
if( stageStats.fRadarActual[p][r] > 0.99999f )
|
||||
m_sprActualBar[p][r].Command( BAR_ACTUAL_MAX_COMMAND );
|
||||
this->AddChild( &m_sprActualBar[p][r] );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user