You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the owner of a lobby configures everything and then starts a game. Other players can (currently) change settings, but they are not sent anywhere and not usable anywhere.
What I have in mind: the owner changes something and then sends the current game setup info as WebSocket message to the server, which just relays it to the clients. Then the clients can update their view. How such game setup info looks like? See here.
And a second thing: a user should be able to choose their own civ. No other settings. Therefore, they should send a WebSocket message containing lobby ID, user ID and selected civ to the server which just relays it to the lobby owner (other players optional), because then the lobby owner updates the game setup info and sends it as "current state" to the server (see above).
The reasons for this "two-step way": the lobby owner is the single point of truth and the lobby owner can check if the change of selected civ is legit (according to ruleset, mods, ...). The game setup info includes all players, therefore this update needs to be done when a player joins/leaves the lobby or if AI players are added/removed, which is kind of ugly (duplicate WebSocket messages). I'm open for suggestions here.
Of course, this is far ahead of the road map, but it's a nice idea, I think.
Besides, one could even use diffs of the config and have the single point of truth at the server side. But the client-side handling stuff is obviously easier.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment, the owner of a lobby configures everything and then starts a game. Other players can (currently) change settings, but they are not sent anywhere and not usable anywhere.
What I have in mind: the owner changes something and then sends the current game setup info as WebSocket message to the server, which just relays it to the clients. Then the clients can update their view. How such game setup info looks like? See here.
And a second thing: a user should be able to choose their own civ. No other settings. Therefore, they should send a WebSocket message containing lobby ID, user ID and selected civ to the server which just relays it to the lobby owner (other players optional), because then the lobby owner updates the game setup info and sends it as "current state" to the server (see above).
The reasons for this "two-step way": the lobby owner is the single point of truth and the lobby owner can check if the change of selected civ is legit (according to ruleset, mods, ...). The game setup info includes all players, therefore this update needs to be done when a player joins/leaves the lobby or if AI players are added/removed, which is kind of ugly (duplicate WebSocket messages). I'm open for suggestions here.
Of course, this is far ahead of the road map, but it's a nice idea, I think.
Besides, one could even use diffs of the config and have the single point of truth at the server side. But the client-side handling stuff is obviously easier.
Beta Was this translation helpful? Give feedback.
All reactions