Top score list including offline players
#1

Hello guys

i am thinking to make a top score list including offline players also by that i mean even 1st position player is offline but hes name will be shown at the top list also i want to ask if its possible with Yini if it is please i would like to see an example

thanks
Reply
#2

It is possible to do this with Y_INI; however, it would be very inefficient.

Switch over to either SQLite or MySQL.
Reply
#3

The best you could do using YINI is saving the top scores to a completely different file. You could load the file into an array and every time a player beats a high score in the array insert their score, shift the array, and save the array to the file again.
Reply
#4

You can check player's score whenever they leave server, save it to an array I.E TopScores[10][MAX_PLAYER_NAME] and load them from the array, and save the array on another file in INI
there is pretty much no other way around if you wanna be efficent about it (yeah you can loop thru all the files in your player's folder, but you get why thats a BAD BAD idea)
Reply
#5

Can you guys show me some code examples?
Reply
#6

I am just going to throw it off there that just because you use YINI for general saving it doesn't mean you can't use MySQL to save the top scores and whatnot.
Reply
#7

Quote:
Originally Posted by Abagail
Посмотреть сообщение
I am just going to throw it off there that just because you use YINI for general saving it doesn't mean you can't use MySQL to save the top scores and whatnot.
Yes, definitely. He specifically asked if it was possible with YINI and I gave him the answer for that specific question.

Using YINI for these things are reasonable if you do it like I said before, but it's not a reasonable saving system.
Using SQL for top scores only is a bit over the edge of being reasonable since he is already using YINI though.
If he was using a SQL saving system, which would be the most reasonable, it'd be best to just compare the values directly from there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)