Archived

This topic is now archived and is closed to further replies.

orko

how to save players data in an os project

Recommended Posts

orko    122
Hi I''m writing a open source online rpg. My question to you is: How would you save the players data? My solution ist to store it on the server, so the players can''t modify it. ( ok with hacks, but my game isn''t as popular as diablo;-) But the other programmers of the project don''t want to store the data on the server. Don''t ask me why. How can i store players data local without the possibility for the user to modify it. The problem is that the code is open source, so that anybody can view how the data is saved and then modify it. Is there any idea how this can be solved? orko

Share this post


Link to post
Share on other sites
JuNC    236
I suppose you could encrypt it client side and just store a decryption key on the server for each player. The sever then encrypts and sends the encrypted data to the client for storage. The client then sends the encrypted data to the server when it wants to connect (assuming you mean storing the kind of persistent data between sessions and not actual game playing data).

Share this post


Link to post
Share on other sites
orko    122
quote:
Original post by JuNC
I suppose you could encrypt it client side and just store a decryption key on the server for each player. The sever then encrypts and sends the encrypted data to the client for storage. The client then sends the encrypted data to the server when it wants to connect (assuming you mean storing the kind of persistent data between sessions and not actual game playing data).


The problem is that the data should be stored at the client side, because the player should be able to play some quests offline.
Like the lan-mode in diablo. There you can play offline or in lan.


Share this post


Link to post
Share on other sites
kooktroop    176
you could still use that method JuNC suggested.
Just have the client store the key.
Or have the client only request a key when it is first installed
If its a big enough key noone will ever find out what it is, or at least we hope.

Share this post


Link to post
Share on other sites
solson16    122
I don''t like the idea of a key. all someone would hgave to do is listen to the data goign between server and client to figutre it out. given, it''s difficult, but, I like this idea far better:

Do a CRC, or an md5sum on the player data, store IT on the server. ( a few bytes ) and store the resto f the data with the player. player logs in, uploads his/her data, and the server verifies it''s md5sum or crc. if it matches, the data''s good, if not, no go, fry him

Share this post


Link to post
Share on other sites
orko    122
The problem of all your suggestions is that the player can''t play offline and online with the same character.
Offline for me means without logging into a server for verifying my data or so.

Think of the md5sum. I play a quest offline and collect items and improve my skills. The md5sum of my character will have changed and i''ll not be able to play with it online.

I mean thera are two different ways to play online:
1. play like in battlenet
2. play in a lan

The second one is the one i prefer. There won''t be the same server everytime, because friends will meat at a lan party a play and friends will meat at home and play. It''s a different lan and a differetn server. So you can''t store your md5sum at the server

Share this post


Link to post
Share on other sites
Zredna    122
The only solution I can think of is to make the savegame and the loadgame funktions closed source. Just provide the objectfiles for those funktions with the source, and the player will still be able to compile the game himself.

/Zredna

Share this post


Link to post
Share on other sites
Fidelio_    122
quote:

I''m writing a open source online rpg.
My question to you is: How would you save the players data?

My solution ist to store it on the server, so the players can''t modify it. ( ok with hacks, but my game isn''t as popular as diablo;-)

But the other programmers of the project don''t want to store the data on the server. Don''t ask me why.



I think this idea is just doomed to fail. See Neverwinter Nights. It''s easy to create a local map, play on it, gain level 20, and uber stats, pick up 1 million gold and great weapons, then save and go onto one of the other 1000 servers. Many servers are just boring combat arena''s. There''s no game anymore when you allow local saves. Even if you make it secret, someone will figure out a character editor.

Share this post


Link to post
Share on other sites
moore52    122
It cannot be simply solved

We have 3 situations:
1. save on sever - forget about playing off-line (however it can be done by playing normally offline and update what_you_done_during_offline_hisory stored on server, but this only makes hacking harder)
2. save on local - forget about fair game, trust me, some people can change save throught any md5, crc and whatever you done, and if only one write save editor, anyone can get it)
3. save md5, crc, even rc5 on server - as in 1, you cannot play offline, but ...
i think if only some important, no-changable data is stored (stats, max hp, lvl (make user cannot lvl offline, say after loging server count exp and lvl, of course exp can be changed by user locally)
mayby sending only what_you_done_histroy can be soluction, but therefore cant be any random things in game (anything can be checked if its able to done)

Share this post


Link to post
Share on other sites
TechnoHydra    122
I''d prefer to save it Client side and either a complete or comprehensive copy on the server. Then when the Player logs in run a check of the two to make sure it matches. If you wanted the Server could monitor it from there and when the Player leaves, updates the Players file?

Share this post


Link to post
Share on other sites
Kylotan    10006
There''s no foolproof way of storing it locally, especially not when they can easily find out the exact encryption method you''re using. I''d allow the players to have a local copy for LAN games, but I just wouldn''t allow them to re-upload that copy to the server. The server would store the definitive online character.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites