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
It's a bit awkward that player information is only available at the endpoint /games/[game]/[matchID]. I want to be able to access the players' name and isConnected properties to provide a better UI experience. Right now I have to rely on separately making a call to the REST endpoint only to capture the data about the match I'm in!
For example, the Board defined in the Client's documentation should receive an additional prop (in the case of React) called players containing their ID, name, and online status. This way we could add elements around the board to make it clear who is playing and whose turn is it by highlighting different areas of the UI outside the board itself that is, we could make a dedicated player card for each player.
This would also make it trivial to pass the names of the players to the Chat component, as it is currently only possible to post "Player 0 says..." instead of their name, but the name is required to join a match! Ideally, the chatMessages prop would also be expanded to include the name alongside id (msg ID), sender (player ID) and payload (which I realize can include the name, but it still doesn't make it available to the Board).
I might put some work towards creating a push request if the idea is approved. This wouldn't break backwards compatibility.
The text was updated successfully, but these errors were encountered:
It's possible! I was looking for a players field... I haven't gotten a chance to continue working on my project to test whether this solves my issue, but I'll get back to you soon
It's a bit awkward that player information is only available at the endpoint
/games/[game]/[matchID]
. I want to be able to access the players'name
andisConnected
properties to provide a better UI experience. Right now I have to rely on separately making a call to the REST endpoint only to capture the data about the match I'm in!For example, the
Board
defined in the Client's documentation should receive an additional prop (in the case of React) calledplayers
containing their ID, name, and online status. This way we could add elements around the board to make it clear who is playing and whose turn is it by highlighting different areas of the UI outside the board itself that is, we could make a dedicated player card for each player.This would also make it trivial to pass the names of the players to the
Chat
component, as it is currently only possible to post "Player 0 says..." instead of their name, but the name is required to join a match! Ideally, thechatMessages
prop would also be expanded to include the name alongsideid
(msg ID),sender
(player ID) and payload (which I realize can include the name, but it still doesn't make it available to theBoard
).I might put some work towards creating a push request if the idea is approved. This wouldn't break backwards compatibility.
The text was updated successfully, but these errors were encountered: