I need advice...
#1

Hello...
I'm planning to start programming new gamemode from scratch. So i have some questions because i can't decide what should i use.

What's the best command processor (fastest).
Also i'm planning to use MySQL, but i'm unsure if i should update the database every second with few queries or i should make one big query every 5 min. (Example: Updating the database when player recieves money which means if 3 players at the same time recieve money there would be 3 queries or i should store the variables and update the database every 5 minutes with huge query?)

Thanks in advance.
Reply
#2

ZCMD or YCMD are the favoured command processors, and they're easy to understand and use. I personally use ZCMD.

You should only really update the database when it needs to be updated. So for players, you would update their row in the database when they leave the server. Though an automated query every 5 minutes for all players wouldn't hurt. The only reason for such an automated system is to account for server crashes.

So to reduce the amount of queries, update a player's information when they leave the server and have an optional automatic saving system for every player connected if you're really concerned about server crashes.
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=618661, but any will do fine. If you want to save some resources, even if it's a little ^.

Save their statistics when they leave the server. Save their statistics every 15 minutes or so ^.
Reply
#4

Quote:
Originally Posted by Threshold
Посмотреть сообщение
ZCMD or YCMD are the favoured command processors, and they're easy to understand and use. I personally use ZCMD.

You should only really update the database when it needs to be updated. So for players, you would update their row in the database when they leave the server. Though an automated query every 5 minutes for all players wouldn't hurt. The only reason for such an automated system is to account for server crashes.

So to reduce the amount of queries, update a player's information when they leave the server and have an optional automatic saving system for every player connected if you're really concerned about server crashes.
I would go into the completely opposite direction. Save instantly when something changes. That way you get rid of the timer and you don't really have to save on disconnect either. You'll get more queries overall but this really isn't a problem since MySQL is built to handle some one hundred thousand queries per second. So even if you do some crazy shit in OnPlayerUpdate (not saying that this is a good idea, just theorizing) the MySQL server should be able to handle it. On average this callback gets called every 20 milliseconds per player, so that's 50 queries per player per second. Times 1000 for a full server is 50,000.
Reply
#5

Each to their own I suppose.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)