When you finish a track, you usually get a score. I never really understood how this scoring works exactly, so:
How is the score calculated?
			   #  T= track time - it's the 1st lap time (not best lap), driven with ES in normal simulation mode,
   #     with no mistakes, used rewind with "_Tool_ go back time", and no boost at all
   #     Most difficult tracks have few (2-4) sec more, to leave some room for user rewinds
   <!--easy and norm are the car time multipliers for simultation modes
      less means bigger track time (more points, easier to qualify)
      track time is divided by this factor for a car,
      this way each car can be 1st on a track despite different engine power-->
   <!--made on For4-OSquare: drive a car perfectly (no boost, no going off road) then adjust it to have 1st place-->
///  compute race position,  basing on car and track time
//-----------------------------------------------------------------------------------------------
int App::GetRacePos(float timeCur, float timeTrk, float carTimeMul, bool coldStart, float* pPoints)
{
   //  magic factor: seconds needed for 1 second of track time for 1 race place difference
   //  eg. if track time is 3min = 180 sec, then 180*magic = 2.16 sec
   //  and this is the difference between car race positions (1 and 2, 2 and 3 etc)
   //  0.006 .. 0.0012            // par
   //float time1pl = magic * timeTrk;
   //  if already driving at start, add 1 sec (times are for 1st lap)
   float timeC = timeCur + (coldStart ? 0 : 1);
   float time = timeC * carTimeMul;
   float place = (time - timeTrk)/timeTrk / data->cars->magic;
   // time = (place * magic * timeTrk + timeTrk) / carTimeMul;  //todo: show this in lists and hud..
   if (pPoints)
      *pPoints = std::max(0.f, (20.f - place) * 0.5f);
   int plc = place < 1.f ? 1 : std::min(30, (int)( floor(place +1.f) ));
   return plc;
}
   <!--global multipliers for car factors, magic - see App::GetRacePos-->
   <global easy="0.94" norm="0.95" magic="0.010"/>
Users browsing this forum: No registered users and 1 guest