Alright here's the thing, my brother and I have a game and our host's comp often starts lagging like hell after a few days. We can host a back-up server, but most players dislike the fact that they don't have access to their usual characters.
Now my question is: Is it possible to implement a verb to get the save/player-files from the host? So we can run those on the back up server.
Thanks in advance,
Sdude
ID:165306
Jan 20 2007, 1:32 am
|
|
There are several ways to go about this.
world.Export() and world.Import() are too you need to look up in the DM Reference. ftp() is not the be all and end all. You could do this via Client Side save files. But if poorly done they leave your game open to malicious attacks. If both servers are running simultaneously you can use world.Export() on one to send the data and world.Import() on the other to recieve it and write the save files. (This method does cause lag, so you'll only want to do it on a rotation basis, 5 - 20 minutes depending on save file size etc) - The best idea is, when both servers start up, you should send all the save files from A to B. Then, during game time, send data of only active clients during those rotations. If you're good with PHP and MySQL. You could revamp your save files to a MySQL database, and, when your server is about to shut down, send all data to the database and have it retrieved by your second server. (This method is tricky and I'm not sure how it would fair on a large-scale game). -- Pretty much, your best method is client side save files. world.Export() and world.Import() can get pretty tricky. And my PHP/MySQL idea is really only good for gathering client data. And if you do want to go with ftp(). You'd have to write a save file load() and a save file save() proc so the users can export their own save files. And make damn sure they're encrypted well. Or else you'll have cheating players on the spot. It'd have to be done so you take the users save file. This is an individual method. So users are responsible for their own save file control. The downside is, if you ever have a time when you need to "Pwipe". Players are going to get more pissy, because they're character wont load and you'll get tons of "Character wont load" bug reports. -- Sorry I can't write up example code at the moment. |
In response to Tiberath
|
|
I tried it with dantom his Hublib but I can't get it right Anyone want to help me my normal save/load code is:
client/proc/SaveMob() PS I'm SdudeRKD his brother. |
I wont leave it at that lol look up the Import proc and Export Proc in the DM guide and Reference.
Also you could do this via FTP.