ID:1175980
 
I'm not sure I'll ever need it, but I've recently been looking into options for making it possible for players to use their save files over any hosted version of a game. It seems like a pretty useful, but difficult feature to deal with so far. MySql is probably the best option, but I don't know a thing about it and currently find it too overwhelming to try to figure out saving with it. I'll probably study that some day, though.

Then there's client-side saving, which seems like it might be a lot simpler, but it seems to raise even more questions than MySql does. I mean you cannot save when the player logs out, so how do you keep players from thinking they got rolled back if they're not in the same location? I figure resetting them to a spawn point might be the answer to that one.

Then another question becomes how to handle something like guilds? They're something you would need to save server-side, yet you can't have players log in to another server and not have access to their guild.

Originally, I thought MySql might have to do with how to handle this type of feature, but client-side saving wasn't on my mind. I figured it would have something to do with importing and exporting the saves between open servers anytime the player logs out of a server, but I haven't seen anything that really points to that being possible, much less it working without lag.

So with all that out of the way, I guess the main question is what are All the options? what are the main upsides and down sides to each one? and what would you do? This is something I really would expect to be more common by now, and if not now then sometime in the near future so I'd love to hear what all you have to say.

For the record though, I really have done my research. I read through the Dantom Database library, one other library, a couple developer help posts, an old post about multi-world saves by I believe Stephen001, etc. I just still have a lot of room to learn on the topic and plenty of questions, so I figured it would be worth opening this back up for a fresh discussion.
I thought about this and because of it I implemented my AES-128 library. It prevents you from having to host a central database server that would make all servers useless if and when it goes down and protects your savefiles from being edited in a valid way by malicious players if used correctly. You would of course be saving the files on the client-side and so the downsides would be the player disconnecting or losing connection before the save is complete, thus potentially corrupting their saved data. Furthermore if they don't save before disconnecting they will be rolled back to the last time they saved when they next log in, and it will also be possible for players to make a backup of old saves and roll back and forward whenever they please. Issues like rollbacks could also occur if the server died while playing and corruption in the worst case if it died while a save was occurring.

I see rollbacks as a minor annoyance that can be solved with periodic saves by the player and auto-saves that occur after significant events in the player character's lifespan (like in most modern games it would also need to warn the player not to disconnect during the save for fear of data corruption). The corruption problem is the most pressing matter. EDIT: An important point to note is that you should not force an auto-save on all players in the world at once if it is possible to avoid doing so. If the server died while this auto-save was happening then you would be in an extreme worst case in which large numbers of players have all had their saved data corrupted.

Data corruption in the case of a server crash can not be completely ruled out in the case of player-owned servers because their reliability cannot be guaranteed. However, the most pressing concern is data corruption due to players losing connection or forcing a disconnect while a save is in progress as this should be the more common of the two occurrences by far. If the file being transferred is small enough then the time frame for this to occur should be relatively insignificant and thus statistically unlikely. I have only thought about implementing a system like this and have not done so, so I'd be interested in hearing other developers' opinions as well.
Hm. I hadn't thought of players backing up their save files and what not with client-side save files. That's a real deal breaker without something to prevent it, but I suppose it may be possible to stop that through making it virtually impossible for them to find the file.

That's not easy to do, but with a few good file name tricks and such I imagine it's possible, and I wouldn't be surprised if large scale MMO's do something sort of similar sometimes. Most do use server-side saves, though.

This kind of makes me think that, if possible, then duplicating the files over to other servers each time may be the safest way. MySql could be the best, but if the database becomes unavailable for any reason then it makes the game unplayable; while as the shifting files between servers shouldn't.

Edit: Client-side saves also make it harder to wipe player saves in the event you need to for any reason, but I imagine that is the least of the concerns in all this.
In response to Toddab503
Not quite. When Feed still used client-side saving and savefiles needed to be patched/wiped, I just would set a variable that would get saved with the player and whenever the client tried loading, if the variable didn't match the saved one(or there was no saved one) I could carry through with whatever save fixes/edits I needed to in a separate bit of code. Then you could just increment the variable each time you need to access saves.

I'm interested in this conversation because I'm not sure whether to use client-side saving again or continue using server-side saving.
Ages ago, BYOND had this thing called hub files. Which, assumingly, let you save savefiles to the hub. This functionality was unfortunately removed, because no one used it.
Whi was stupid in developers part. ^
In response to Super Saiyan X
Super Saiyan X wrote:
Ages ago, BYOND had this thing called hub files. Which, assumingly, let you save savefiles to the hub. This functionality was unfortunately removed, because no one used it.

How many people would you suppose would use it now if it ever returned?
Wow. This has already become a very interesting discussion.

@Kumorii: I hadn't thought of that, but it makes sense. Good thinking.

@Everyone else: I've got to agree with Fushimi, I mean it may have just been that developers weren't using BYOND in ways that needed that at the time, but heck on-screen objects weren't even popular yet. Things have changed, and expanded a lot.

So, I personally think a pretty good bit of people would use it. I can't say it'd be hundreds or something at first, but I think I'd use it frequently, and I can think of at least two or three other projects that already exist and could benefit from it.

NEStalgia is one that probably wouldn't use it, but it might be useful for it. Spirit Age could probably make good use of it, since if I recall correctly they're using a lobby that may switch you through multiple hosted servers. Then there are games like Startegem, which could use it for its original purpose of keeping turn-based games going even when users are offline for a while.

I'm not sure how difficult it would be to bring back, or redesign, but I really think we need to try and get hubfiles or a similar feature back in working order.
I think client side saving is the way to go, it's fast it's safe (if you know what you are doing encryption wise), but then if the player reformat's they lose the save file.

Honestly if the MySQL server is on the same server as the host go for it! but if each player has to load the save file from the database hosted else where if it goes down everyone is screwed and then the problem of if it does connect but the lag is so immense it takes 5 minutes to load anything then the player can not continue until it's finished.

But this is where Master and Slaves come in on MySQL if you don't know each slave will sync the information from the Master keeping it up to date so pretty much each slave is a fall back.
In response to A.T.H.K
Well, that may be true, but what about handling information that needs to be present over all servers? Like guild datums, for example. I'm thinking using world.Import() and world.Export() could be sufficient for that since the files are usually really small and need a lot less updating than a players saves, but I don't know.

The more I think about it, the more uses I find for hubfiles, but I imagine even if that were re-added it wouldn't be in for a while.
I'm sure re-implementing hubfiles wouldn't be hard, since it was part of the site software, you just used Dantom.hublib to interact with it. I'm sure they have old iterations of the site backed up somewhere, it's just, they'd have to update it to match current BYOND functionality or something.

I think hubfiles would be very useful for when BYOND games start to get posted on Flash portals and such. (There was also a thing, where like, if a key was a 'roving key' (another removed function?) and you tried to do client-side saving, it'd get pushed to the hub as a hubfile instead - I think that's mentioned in one of the documents I linked earlier)
In response to Toddab503
Toddab503 wrote:
Well, that may be true, but what about handling information that needs to be present over all servers? Like guild datums, for example.

That's what the Master & Slaves would used for as they sync the data.

I'm thinking using world.Import() and world.Export() could be sufficient for that since the files are usually really small and need a lot less updating than a players saves

Then you have to know the exact address IP:PORT of the other servers which doesn't really help if they change often.

In response to Super Saiyan X
Super Saiyan X wrote:
I'm sure re-implementing hubfiles wouldn't be hard, since it was part of the site software, you just used Dantom.hublib to interact with it. I'm sure they have old iterations of the site backed up somewhere, it's just, they'd have to update it to match current BYOND functionality.

I remember this and it was handy, it's just a question of can BYOND's server handle it if many games used it, what are the costs in regards to this? will it see BYOND's bandwidth go through the roof? I guess only Tom could answer that. But yea it was great at the time.
@Super Saiyan X: That's true. It hopefully would not be too difficult to update, though. I was also thinking this could be the solution to developers being able to offer subscriptions over multiple games for one fee and such too, because it could be possible to check another of your hubs for a save that has subscription access. Security there wouldn't be tough, because hub passwords could be used.

@A.T.H.K: Yeah, that's true. It's not a problem for me right now since I'd always have that information for any project I have in mind, but it's definitely something I can see getting in the way pretty often for some developers. I guess MySql remains pretty important during this type of thing.
@A.T.H.K - Bandwidth shouldn't be an issue if they setup the file processing on another server.

I would love to see this feature reimplemented, however. The size of savefiles makes it very practical, even for games with a hundred or more players.
In response to Solomn Architect
Solomn Architect wrote:
@A.T.H.K - Bandwidth shouldn't be an issue if they setup the file processing on another server.

That's an extra cost which Tom by the sounds of it may not be able to afford and then bandwidth on that server is also at risk.
In response to A.T.H.K
Sounds like something that might help with the business model. I honestly wouldn't mind paying a small fee to enable this feature on a hub, or my hubs. It could also just be membership only, since hubs won't be anymore soon and they are the main thing people will want to be free.

If it's used like that, the feature may not be used super often, but it'll be worth it for any time it is.
Then the best option would be to make it a paid feature, member or not. Something like $10 for a year would draw in a lot more in funds. A bundle deal for Membership + Savefile space could go for like $30 a year. This would both pay for the server and add more revenue for the BYOND team. These are things that I wouldn't mind paying for to pitch a few more dollars Tom and Lummox's way. Assuming I had the money of course, that's why I haven't really updated my Membership for a while. Kids, ya know :P
In response to Toddab503
Toddab503 wrote:
It could also just be membership only, since hubs won't be anymore soon and they are the main thing people will want to be free.

I wouldn't make it Membership only. Opening it up to ANYONE, Member or not would increase sales. It would be cheaper than buying a membership and there's no commitment. On that note, they need to seriously think about opening up a server hosting service. BYOND Panel is nice, but they need the funds to help support their software. Or the owners should get it touch and think about a partnership deal.

If members were allowed to host one server at minimum bandwidth and RAM for free, but be able to pay for larger packages on a month-by-month basis. More people would buy memberships for hosting abilities. Not only are dedicated servers generally faster, due to a lack of other process' running to slow down the game, they're also more reliable and don't shut down after 10 o'clock.
Page: 1 2 3 4