-
Notifications
You must be signed in to change notification settings - Fork 0
Server and Client Interactions
A client (already registered) going from launch to game and finish game (we are going to assume everything goes as planned)
-
User: Launches the game
-
User: Enters and submits log in credentials (username and password)
-
Client: Checks to make sure there is characters in the submitted username and password
-
Client: Encrypts password and sends credentials by HTTP POST to Game Web Server(GWS)
-
GWS: Receives credentials from client by HTTP POST
-
GWS: Encrypts password again
-
GWS: Checks Database for matching username & Password
-
GWS: Generates unique log in token based off of somthing and their username
-
GWS: Stores log in token in databasee
-
GWS: Sends Log in token back to client in JSON
-
Client: Receives Log in token from GWS.
-
Client: Stores Log in token.
-
Client: Connects to Master Server (MS) with log in token as parameter.
-
MS: Receives connection from Client
-
MS: Checks log in token by sending HTTP POST with Log in token to GWS
-
MS: Receives Success and User's details from MS
-
MS: Uses algorithm (To be thought up) to choose a lobby server(LS) to send the User to.
-
MS: sends to client data telling it which server to connect to using JSON.
-
Client: Receive server data from MS from JSON
-
Client: Connect to LS from server data with Log in token (JSON)
-
LS: Receive connection from Client with Log in token (JSON)
-
LS: Sends Log in token to GWS to be confirmed (see below) and recieves back user data
-
LS: Send client level data
-
Client: Receive level data from LS
-
Client: Set up level data
-
Client: Report finished setting up level to LS
-
LS: Receive report from client saying level is set up
-
LS: Send setup commands to client (See setup commands)
-
Client: Receives and executes set up commands. Reports back to LS
-
LS: Receives report back from Client.
-
LS: Sends network buffer to Client.
-
Client: Receives network buffer from Server.
-
LS:
Log in Token confirmed process (GWS)
- GWS: Receives log in token through HTTP POST
- GWS: Checks Database for a matching log in token
- GWS: Sends back appropriate user info to server which sent log in token to be confirmed.