Some questions from a networking beginner

I would like to use a client-server architecture with clients signing into and connecting to the server using a username and password. All calculations would then be handled by the server and the client would just sent requests.
Now to my question, what would be the best way to implement this? Could I use unity to basically make two versions of the game, client and server. If I use that method (if its possible) I would need to somehow keep track of usernames and passwords even if the server crashes( is there any serialization in javascript?).
I could use a MySQL server to track the accounts but I have no experience with them, and I would need to do a ‘game state backup’ on the server every half hour or so for if it crashed.
Any other suggestions for server architecture are greatly encouraged.
Sorry for the length, any help is appreciated!
-Luke

You should be able to do all this with RPCs, although I have no idea of what kind of game you are actually doing :wink: The client can use an RPC login function, the server processes the information and sends an RPC back with a success or failure message, etc. The client requests would be done in a similar manner. I think the Castles scene in the networking example project has something similar where a client first requests permission to instantiate his object with an RPC, gets an RPC reply, and so forth.

Well, you can just make one application with server and client code shared. Thats how all the examples are done in the networking example project.

Not sure I understand what you mean. You could easily keep user/passwd info in a file if thats what you want. It can be done with the usual .NET/mono routines to serialize to a file. Googling for it should result in tons of examples.

MySQL keeps all its data persistent. There is no need to back up you stuff every half hour. If it crashes you should just lose data which was in mid transaction as the crash occurred (unless of course the database gets corrupted). If its very important data you could easily do backups in any case.

Thank you very much for the informing answers!

The game type is MMO so the server will constantly be running a continuous game, does that change anything?

-Luke

AFAIK you can use this approach (server handles everything) only if all things move slow and you have no lag (like in a LAN).

The usual approach is to have client and server run everything and synchronise game states at some frequency. There is a good description here:

http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking

The concept is an MMORPG so a client with the no rights is almost crucial to prevent cheating.
The thing is I want the server to handle almost everything so would I need to have a Game-Server project and a Game-Client project as seperate standalones? That would seem to give the client very limited abilities to hex-it game code.