Author Topic: Beta Test [ Highscores Changes ]  (Read 9383 times)

0 Members and 1 Guest are viewing this topic.

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Beta Test [ Highscores Changes ]
« on: January 08, 2010, 12:11:54 pm »
Nooo, don't touch the highscores code  ;D

Last night I recoded the highscores (it's been the same since day 1 of Adrenaline1.06).

We now run a race array holding the time, a lot easier and quicker than opening, reading and checking the highscores.
From what I've tested, it works good.

mooman mentioned the votemenu lag, I'm thinking it's due to the race files at the end of the race been opened. With the new array it only loads the file once (at the start of race), it will only save if highscores have changed.

This post is a heads up just in case we have problems.

Thanks for listening and this will hopefully increase the servers performance. (Also with arrays, we'll soon be having /top [number] which can see either 1 to 20 of the top times for the race.

Note: /top5 [trackname] is offline till this is up and running smoothly..

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #1 on: January 08, 2010, 12:14:25 pm »
Thanks for listening and this will hopefully increase the servers performance. (Also with arrays, we'll soon be having /top [number] which can see either 1 to 20 of the top times for the race.

woooo

You're the man!   ;D ;D

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #2 on: January 08, 2010, 12:52:54 pm »
Woop, it works good.

Only restart server when there is no new highscores (silly coding error, soon to be resolved).

I did this to compete with Andre's coding improvements with the forum ;)

HighScore( racename ) : Used once to get highscore
SaveTrackHighScoreList( ) : Only used if highscores are new
ReadTrackHighScoreList( display ) : Only formats a string to display
LoadHighScoreForRace( ) : Used once to get highscores
CheckAgainstHighScore(playerid, time) : Checks a players finish time, resorts the array

The above is so quick and efficient. The below is the old system :

HighScore(Track[]) : Called once, but never stored
ReadTrackHighScoreList(track[24], display, playerid, all) : Called for /top5 (file opened, read, stringed)
CheckAgainstHighScore(playerid, time) : Checks a players finish time (loads, checks, formats, saves)

Was a ugly and slow method, with 50 players we needed a quicker solution.

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #3 on: January 08, 2010, 01:07:36 pm »
So we got top20 now? woo!

Offline [MAF]Aj_Lajk_Bir

  • Admin
  • Posts: 5,031
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #4 on: January 08, 2010, 01:12:46 pm »
top 20 nice :D

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #5 on: January 08, 2010, 01:41:35 pm »
Currently got top10 active on server, works good.

Offline [MAF]Sighmoan

  • Admin
  • Posts: 1,599
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #6 on: January 08, 2010, 01:53:45 pm »
Hooray, i might start appearing in the top * again then :D

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #7 on: January 08, 2010, 03:00:21 pm »
Hooray, i might start appearing in the top * again then :D
lol same

Offline [2F2F]SNiKeRiS

  • Admin
  • Posts: 3,892
    • View Profile
    • 2F2F website
Re: Beta Test [ Highscores Changes ]
« Reply #8 on: January 08, 2010, 03:25:48 pm »
Started the new year with great news that's cool. Cheers!  :D

Offline KariranY

  • Posts: 184
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #9 on: January 08, 2010, 03:35:19 pm »
This is awesome... since I haven't been to server after this update, does it still announce when someone hits record (like 9th) on public?

Offline Witchfynde

  • Posts: 251
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #10 on: January 08, 2010, 04:26:09 pm »
Why is the highscore page down? I mean it shows 0 races and no data.
Kurrackt grammer, seenteks n cahpeetahleezey-shun art ye mates.

Offline [MAF]Aj_Lajk_Bir

  • Admin
  • Posts: 5,031
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #11 on: January 08, 2010, 05:57:23 pm »
Note: /top5 [trackname] is offline till this is up and running smoothly..

hard to read all?

falco355

  • Guest
Re: Beta Test [ Highscores Changes ]
« Reply #12 on: January 08, 2010, 05:58:53 pm »
it's not now /top5 but /top20.

Offline [MAF]Aj_Lajk_Bir

  • Admin
  • Posts: 5,031
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #13 on: January 08, 2010, 06:04:19 pm »
another...

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Beta Test [ Highscores Changes ]
« Reply #14 on: January 08, 2010, 06:32:17 pm »
Bug?