General > AdrenalineX Development
Beta Test [ Highscores Changes ]
[MAF]Rac3r:
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..
[FSR]Ush:
--- Quote from: [UK]Rac3r on January 08, 2010, 12:11:54 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.
--- End quote ---
woooo
You're the man! ;D ;D
[MAF]Rac3r:
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.
[FSR]Ush:
So we got top20 now? woo!
[MAF]Aj_Lajk_Bir:
top 20 nice :D
Navigation
[0] Message Index
[#] Next page
Go to full version