I have to write an authentication server

However, I don’t know where to start. I’m looking online to get a better understanding, but I’m not getting anywhere. Can someone please point me in the right direction? Thank you.

What kind of game are you doing?

Let’s suppose it’s a chess, the server will be keeping the board data and when a client wants to make a move sends an ‘IWantToMakeMoveTo( int row, int col )’ RPC only to te server. Server will check if the movement its posible, update the board data, and then sends and RPC to all the clients to anim the piece.

The thing is that the clients acts only as input. The server must process client’s input, physics, rules, etc.

authentification server or authoritative server?

Not really the same, please explain a little more what you want to do…

Ohh f***, I thought he meant authoritative server. :frowning:

Hi Kinos,

Take a look at using web services in Unity.
http://wiki.unity3d.com/index.php?title=Webservices_In_Unity

Basically they are methods hosted on your web server.
Your Unity client talks to this online method, and the method talks to the authentication database.

So you pass in the username and password to the web method, the web method talks to the database to authenticate, then your method returns a userID or an error if the username/password cannot be found.

Also, you can use WWW and WWWForm to call on php or python scripts.

I’m coding a Sims like mp game, and I was told to code an authentication server. This is the exact detail, “We need to have an auth server that can keep track of sessions, so the client could then use the session id to connect to other servers.” I’m not sure if this should be a auth or authoritative server.

Sounds like your client needs to be more specific. Get more information from them before you start wasting your time.