Question :)
#1

Hi guys

Is it better to have a timer that every 2 minutes is called for saving player data or should i update there when the variable is changing, if i do that there is no need for saving timer... But what's better ?

(I'm talking this for MySQL, not for regular save systems like dini, yini, ini etc...)
Reply
#2

I suggest the second option. My opinion is why a player saves his stats whilst nothing in this stats changed. It's better that his stats are saved when something in the stats change.
Reply
#3

Yeap, but i wasn't sure because its mysql, mysql uses a lot of ram
But when i reconsider that again i have same opinion like you

Rep +1

Keep with commenting i want to hear more opinions
Reply
#4

The second one off course,you don't wanna be saving the same stats over and over again.
Considering your server will have more players by time, thus more queries will be sent every 2 minutes, lags the server, but if you go with the second method, the chances of so many people having their variables changed/queries sent at the same time is very slim (even if it wasn't it won't affect anything, giving that the number of these people is prolly 15 max)
Reply
#5

Ok, so i should definitely use the second option

Rep +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)