Cookies?  Preferences?  Persistance?

In an online game where you don’t want to keep every person’s save game data (especially if they just show up once and try the game out, never to return again) on the server, what options are there to store data on the client?

Cookies?
Some Preferences API (I think I read about it)?

I don’t think cookies are supported, but combined with CGI scripts you can empower your applet to do cookies. I think it should be possible with JavaScript on the page as well. The applet would call the JavaScript functions to read and write cookies. However, I don’t think this is supported on many browsers? Hopefully I am wrong…

Thanks for answering my newbie questions :wink:
from, Stefan

I store them on the server and run weekly(biweekly) checks and if no return, they get removed form the player list.

oh and must agree with the comment from Breakfast…cgi app on a java site. :slight_smile:

As a general idea:

  • If the game has any kind of “local installation” (if it is an application or something like that) store the data locally.
    The user/player can delete it at will.

  • if the game is purely an “online game” (applet or no local install) save the data at the server (DB or something). The user/player could delete it under demand … and the idea of weekly / biweekly delete is very good. Even if you can store the data at cookies or some kind of “temporal” resource … it could be delete “by accident” or without user’s knowledge … and it could be very frustrating.

Just an idea.

Storing game data on the client would lead to easy cheating… IMHO, forget it.

Hi

I’ve done a merge between a chat and a place where you can play simple multiplayer games, maybe the idea would be useful.

http://www.mycgiserver.com/~nabetse/Multijuegos/Multijuegos18Records.htm

I don’t store nothing in client nor server, because the games don’t really need to much data.

Bye.

Okay, thanks. I just want to try to stay away from a server, because I don’t have one ;). Well if you use encryption, you will at least make it a lot harder for the client to cheat (and obfusticate your class files, of course).

from,
Stefan

I like the encryption idea. Use a public key to encrypt the data stored on the client. Only the server has the private key, so only it is able to decode it. That should work out OK and then you don’t need a huge database.

If you are going to store it on the server and delete it weekly or whatever you might want to have an automated emailer built in to the system to say “your account has been inactive for the last X days- if you don’t return today your save game will be deleted.” or words to that effect.

You might consider using Java Web Start. It has several possibilities for storing user settings either on the server or on the client.