Lobby message protocol examples

Flow

Guest human player

  1. main page (From LandingPageController)

  2. (client to server) select an avatar type; enterAvatarSelectionPage.json

  3. (server to client) go to a page of an avatar list; humanPlayerSelectionPage.json

  4. (client to server) select an avatar; enterLobbyForHumanPlayer.json

  5. (server to client) go to a page of a village list; lobbyForHumanPlayer.json

  6. (client to server) get avatar info; getAvatar.json

  7. (server to client) send avatar info; avatar.json

  8. (client to server) select a village; selectVillage.json

  9. (server to client) go to a waiting page; waitingPage.json

  10. (server to client) ping ping.json

  11. (client to server) pong pong.json

  12. a host player pushes a start button (To GameController)

  13. (client to server) start a game play.json

  14. (server to client) played.json

  15. move from /lobby to /village

  16. (client to server) ready.json

(client to server) leave a waiting page leaveWaitingPage.json

Host human player

  1. main page (From LandingPageController)

  2. (client to server) select an avatar; enterLobbyForHumanPlayer.json

  3. (server to client) go to a page of an avatar list; humanPlayerSelectionPage.json

  4. (client to server) select an avatar; enterLobbyForHumanPlayer.json

  5. (server to client) go to a page of a village list; lobbyForHumanPlayer.json

  6. (client to server) get avatar info; getAvatar.json

  7. (server to client) send avatar info; avatar.json

  8. (client) push a button for building a village

  9. (client) go to a page for building a village

  10. (client to server) build a village; buildVillage.json

  11. (server to client) go to a waiting page; waitingPage.json

  12. (server to client) ping ping.json

  13. (client to server) pong pong.json

  14. a host player pushes a start button (To GameController)

  15. (server to client) played.json

  16. move from /lobby to /village

  17. (client to server) ready.json

(client to server) leave a waiting page leaveWaitingPage.json Then, a host of a waiting page is selected from remaining players if they exist.

(client to server) kick out a player kickOutPlayer.json The kicked out player moves to a lobby with an error message that a host kicked out the player

Settings

  1. settings page (From main page)

  2. (client to server) get settings info; getSettings.json

  3. (server to client) send settings info; settings.json

  4. change settings info:

    1. (client to server) change user’s name; changeUserName.json

    2. (client to server) change user’s email address; changeUserEmail.json

    3. (client to server) change user’s password; changeUserPassword.json

    4. (client to server) change locale; changeLanguage.json

  5. (server to client) send settings info; settings.json

  6. leave settings page (To main page)

Flows in a human player selection page

Select a human player

  1. client to server

  2. server to client

Flows in an onymous audience selection page

Select an onymous audience

Flows in a robot player selection page

Renew an avatar token

  1. client to server

  2. server to client

Run in the foreground

  1. client to server

  2. server to client

Run in the background

Stop

  1. client to server

  2. server to client

Lobby message protocol examples for unit testing

Lobby message protocol schemata