ID:272898
 
I'm in the middle of thinking of a way to make a Global save system(savefiles). The only way I can think of at the moment is hosting a server(Central server) and then export the savefiles from the game's servers to the central server using world.Export and world.Import(), but is there a better way of doing this?
Lord Ulquiorra wrote:
I'm trying to make a Global Saving system and I'm wondering if anyone has any ideas of how I should go about this.

Global saving as in... saving all objs/mobs/turfs on the map? If so I have a lib for it:
http://www.byond.com/developer/AJX/MapHandling

The other way (more commonly used and much slower and takes up more space *BUT* can save variables) is by making a loop that runs through all the areas everywhere and Writing() them to a savefile. I don't like this approach because load times and save times aren't as fast as I would like.
In response to AJX
AJX wrote:
Lord Ulquiorra wrote:
I'm trying to make a Global Saving system and I'm wondering if anyone has any ideas of how I should go about this.

Global saving as in... saving all objs/mobs/turfs on the map? If so I have a lib for it:
http://www.byond.com/developer/AJX/MapHandling

The other way (more commonly used and much slower and takes up more space *BUT* can save variables) is by making a loop that runs through all the areas everywhere and Writing() them to a savefile. I don't like this approach because load times and save times aren't as fast as I would like.

Yeah, I see how my post is misleading. I'll edit it.
What about client-side saving? Though you need to add security but shouldn't be too hard if you use the hash procedure md5().

See DM Guide, Chapter 12, Sections 5 and 6.3
Lord Ulquiorra wrote:
I'm in the middle of thinking of a way to make a Global save system(savefiles). The only way I can think of at the moment is hosting a server(Central server) and then export the savefiles from the game's servers to the central server using world.Export and world.Import(), but is there a better way of doing this?

As mentioned by GhostAnime, client side saving is an option. There are a few problems with this approach such as savefile editing, savefile manipulation (copy/replace your savefile to duplicate items), etc.

You can fight off the savefile editing pretty easily by either encrypting the numbers you're saving or just creating a verification hash that is checks for validity.

As for the item duping trick, I'd say your best way to avoid that is to include ID#s on items, and if duplicate IDs start popping up then get rid of one of them. Could possibly lead to people ripping other people off, but meh. Better than letting them freely dupe items?
In response to AJX
or there is the option I prefer which is mySQL databases
In response to Pirion
Pirion wrote:
or there is the option I prefer which is mySQL databases

Dangerous to do without a central server to handle communications.. Otherwise anyone with a little bit of knowledge could easily start screwing with your system. That'd probably be easier to hack than a savefile.
In response to AJX
Yes, I use a central Server System to communicate with the database, as I have it set to IP restricted access.

I just wanted to throw in how much I liked them. lol =p
In response to Pirion
Pirion wrote:
Yes, I use a central Server System to communicate with the database, as I have it set to IP restricted access.

I just wanted to throw in how much I liked them. lol =p

Oh, well in that case:
Yea they're great.

But a few problems arise when using them for BYOND saving...
1: Items. If you have different items then you need to create a parser for handling your inventory.
2: Items with varying stats. JESUS! If you have this then you're screwed. Much better off simply using a savefile.

BYOND Savefiles are simply more flexible unless every single player savefile will be 99% numbers or short easy to decipher text with no dynamic-ness.
In response to AJX
AJX wrote:
1: Items. If you have different items then you need to create a parser for handling your inventory.
2: Items with varying stats. JESUS! If you have this then you're screwed. Much better off simply using a savefile.

Heh, no reason this should be notably problematic, really. You can store virtually whatever data you want in a database, you just need to come up with a suitable format for it. Not too different from programming item saving into text-based files.

Of course, the preferred saving method depends on the situation and what you want. I probably wouldn't bother using a centralized database on a remote server if I didn't need that data to be accessible from multiple servers and as such - if it's "usual" saved data that just needs to be accessed by one server, just store it on that server (in what ever format you want, really). Just sayin'.
In response to Kaioken
Kaioken wrote:
AJX wrote:
1: Items. If you have different items then you need to create a parser for handling your inventory.
2: Items with varying stats. JESUS! If you have this then you're screwed. Much better off simply using a savefile.

Heh, no reason this should be notably problematic, really. You can store virtually whatever data you want in a database, you just need to come up with a suitable format for it. Not too different from programming item saving into text-based files.

Seems like an excessive pain in the dick to me. But eh, guess its just me.