We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made this on to define once and for all a basic and extensible protocol for UTL related stuff
I prefixed all the "message" with an identifier, so redux code will be easier to segment.
ON - connection : (client)
connection
(client)
ON - disconnect : EMIT - lobby/update && if connected to channel channel/update && (if don't reconnected => disconnect from game after 45 s)
disconnect
lobby/update
channel/update
ON - init/createPlayer : ({player})
init/createPlayer
({player})
init/playerCreated
() => ({player})
ON - channel/create : ({channel})
channel/create
({channel})
channel/created
ON - channel/join : ({channelId})
({channelId})
() => ({lobby})
ON - utl/nextRound : ()
utl/nextRound
()
ON - utl/selectedAnswers : ({answers})
utl/selectedAnswers
({answers})
ON - utl/selectedJudgment : ({judgment})
utl/selectedJudgment
({judgment})
We should also strictly define and serialize response message sent from the server in order to avoid ppl looking trough js code to find opponents card
{ $id: 'lobby', type: 'object', properties: { lobbyUsers: { type: 'User', default: '' }, channels: { name: {type: 'string', default: '' }, id: {type: 'integer', default: '' }, }, };
{ $id: 'channel', type: 'object', properties: { id: {type: 'integer', default: '' }, name: {type: 'string', default: '' }, admin: {type: PLAYER (NEED TO BE CHANGED)}, players: { id: {type: 'integer', default: '' }, name: {type: 'string', default: '' }, score: {type: 'integer', default: '0' }, hand: {type: Answer, default: '' }, answers: {type: Array[type: 'integer'], default: '0' }, isGameMaster: {type: 'boolean', default: '0' }, }, currentStatus: {type: 'string', default: 'IDLE' }, timer: {type: 'integer', default: '0' }, deckQuestion: {type: 'string', default: '' }, }, };
This is the UTL games definition of a channel.
EMIT/ON/EMIT - INITIATOR ONLY : BROADCAST/ON NEW REQ RECEIVED/SEND RES ONLY TO THE SPECIFIC CLIENT
The text was updated successfully, but these errors were encountered:
I started to update the protocol as they are set today.
Sorry, something went wrong.
Thenkei
arnaud-moncel
jeffladiray
No branches or pull requests
Made this on to define once and for all a basic and extensible protocol for UTL related stuff
I prefixed all the "message" with an identifier, so redux code will be easier to segment.
ON -
connection
:(client)
ON -
disconnect
: EMIT -lobby/update
&& if connected to channelchannel/update
&& (if don't reconnected => disconnect from game after 45 s)ON -
init/createPlayer
:({player})
init/playerCreated
:() => ({player})
# Send created userON -
channel/create
:({channel})
lobby/update
# Update lobby with new channelchannel/created
channel/update
# Contains info to redirect the user to the correct pageON - channel/join :
({channelId})
lobby/update
:() => ({lobby})
# Update lobby, without initiatorchannel/update
: # Update current channel for all player # contains info to redirect the user to the correct pageON -
utl/nextRound
:()
channel/update
# Update current channel for all playerON -
utl/selectedAnswers
:({answers})
channel/update
: # Update current channel for all playerON -
utl/selectedJudgment
:({judgment})
channel/update
: # Update current channel for all playerWe should also strictly define and serialize response message sent from the server in order to avoid ppl looking trough js code to find opponents card
EMIT -
lobby/update
EMIT -
channel/update
(UTLGame & UTLPlus (protocol)This is the UTL games definition of a channel.
EMIT/ON/EMIT - INITIATOR ONLY : BROADCAST/ON NEW REQ RECEIVED/SEND RES ONLY TO THE SPECIFIC CLIENT
The text was updated successfully, but these errors were encountered: