Skip to content

Server and Client Interactions

RoboThePichu edited this page Jan 9, 2014 · 5 revisions

A client (already registered) going from launch to game and finish game (we are going to assume everything goes as planned)


  1. User: Launches the game

  2. User: Enters and submits log in credentials (username and password)

  3. Client: Checks to make sure there is characters in the submitted username and password

  4. Client: Encrypts password and sends credentials by HTTP POST to Game Web Server(GWS)

  5. GWS: Receives credentials from client by HTTP POST

  6. GWS: Encrypts password again

  7. GWS: Checks Database for matching username & Password

  8. GWS: Generates unique log in token based off of somthing and their username

  9. GWS: Stores log in token in databasee

  10. GWS: Sends Log in token back to client in JSON

  11. Client: Receives Log in token from GWS.

  12. Client: Stores Log in token.

  13. Client: Connects to Master Server (MS) with log in token as parameter.

  14. MS: Receives connection from Client

  15. MS: Checks log in token by sending HTTP POST with Log in token to GWS

  16. MS: Receives Success and User's details from MS

  17. MS: Uses algorithm (To be thought up) to choose a lobby server(LS) to send the User to.

  18. MS: sends to client data telling it which server to connect to using JSON.

  19. Client: Receive server data from MS from JSON

  20. Client: Connect to LS from server data with Log in token (JSON)

  21. LS: Receive connection from Client with Log in token (JSON)

  22. LS: Sends Log in token to GWS to be confirmed (see below) and recieves back user data

  23. LS: Send client level data

  24. Client: Receive level data from LS

  25. Client: Set up level data

  26. Client: Report finished setting up level to LS

  27. LS: Receive report from client saying level is set up

  28. LS: Send setup commands to client (See setup commands)

  29. Client: Receives and executes set up commands. Reports back to LS

  30. LS: Receives report back from Client.

  31. LS: Sends network buffer to Client.

  32. Client: Receives network buffer from Server.

  33. 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.
Clone this wiki locally