Lobby message protocol examples
Flow
Guest human player
-
main page (From LandingPageController)
-
(client to server) select an avatar type; enterAvatarSelectionPage.json
-
(server to client) go to a page of an avatar list; humanPlayerSelectionPage.json
-
(client to server) select an avatar; enterLobbyForHumanPlayer.json
-
(server to client) go to a page of a village list; lobbyForHumanPlayer.json
-
(client to server) get avatar info; getAvatar.json
-
(server to client) send avatar info; avatar.json
-
(client to server) select a village; selectVillage.json
-
(server to client) go to a waiting page; waitingPage.json
-
(server to client) ping ping.json
-
(client to server) pong pong.json
-
a host player pushes a start button (To GameController)
-
(client to server) start a game play.json
-
(server to client) played.json
-
move from /lobby to /village
-
(client to server) ready.json
(client to server) leave a waiting page leaveWaitingPage.json
Host human player
-
main page (From LandingPageController)
-
(client to server) select an avatar; enterLobbyForHumanPlayer.json
-
(server to client) go to a page of an avatar list; humanPlayerSelectionPage.json
-
(client to server) select an avatar; enterLobbyForHumanPlayer.json
-
(server to client) go to a page of a village list; lobbyForHumanPlayer.json
-
(client to server) get avatar info; getAvatar.json
-
(server to client) send avatar info; avatar.json
-
(client) push a button for building a village
-
(client) go to a page for building a village
-
(client to server) build a village; buildVillage.json
-
(server to client) go to a waiting page; waitingPage.json
-
(server to client) ping ping.json
-
(client to server) pong pong.json
-
a host player pushes a start button (To GameController)
-
(server to client) played.json
-
move from /lobby to /village
-
(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
-
settings page (From main page)
-
(client to server) get settings info; getSettings.json
-
(server to client) send settings info; settings.json
-
change settings info:
-
(client to server) change user’s name; changeUserName.json
-
(client to server) change user’s email address; changeUserEmail.json
-
(client to server) change user’s password; changeUserPassword.json
-
(client to server) change locale; changeLanguage.json
-
-
(server to client) send settings info; settings.json
-
leave settings page (To main page)