Open chanpham97 opened 3 years ago
Following is what happens as soon as the server receives a websocket connection:
This was introduced to ensure that the server registers a player even if the client forgets to send the REGISTER_PLAYER message. So the users are allowed to click the start game button directly.
I am thinking that maybe we allow players to upgrade their type to a robot. With an UPGRADE_TO_ROBOT message.
Q: can you send REGISTER_ROBOT message right away? or does that happen after REGISTER_PLAYER
REGISTER_ROBOT / UPGRADE_TO_ROBOT - can be sent anytime after the socket is opened
Q. robot client send UPDATE_ROBOT_INFO message to server
I would recommend sending this information as part of the the UPGRADE_TO_ROBOT message
Alternatively we could change the current behavior to make the client always start off by sending a REGISTER_PLAYER message
Set up messages and connections to enable the following message flow: