add initial design notes
This commit is contained in:
parent
746701cfbf
commit
0c191fb691
218
DESIGN.org
Normal file
218
DESIGN.org
Normal file
@ -0,0 +1,218 @@
|
||||
#+TITLE: Design Notes
|
||||
|
||||
* Messages
|
||||
|
||||
** State Update
|
||||
|
||||
*** Start Game State
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"state": "BEGIN_GAME",
|
||||
"players": {"name":{},"name2":{}}
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Ready To Play
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"state":"READY_TO_PLAY",
|
||||
"players": {"name":{},"name2":{}}
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Text Prompting
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"state":"TEXT_PROMPT",
|
||||
"players": {"name":{"complete": false},"name2":{"complete":true}},
|
||||
"initialPromptId":"id goes here",
|
||||
"answerId":"",
|
||||
"prompt": "text prompt here"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Drawing Prompting
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"state":"IMAGE_PROMPT",
|
||||
"players": {"name":{"complete": false},"name2":{"complete":true}},
|
||||
"initialPromptId":"id goes here",
|
||||
"answerId":"",
|
||||
"url": "image.png"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Showing Prompts
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"state":"RESULTS",
|
||||
"initialPlayer":"name",
|
||||
"initialPrompt":"text prompt",
|
||||
"player":"name",
|
||||
"type":"image|text",
|
||||
"text": "text goes here",
|
||||
"url":"image.png",
|
||||
"initialPromptId":"id goes here",
|
||||
"answerId":"",
|
||||
"reactions":{"name":""}
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** Client Actions
|
||||
|
||||
*** Join Game
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"JOIN",
|
||||
"playerName":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Start Game
|
||||
|
||||
Person who starts the game is the 'leader'
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"START",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Reconnect As Player
|
||||
|
||||
Allows reconnnection of a previously connected player.
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"RECONNECT",
|
||||
"playerName":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Reconnect As Player
|
||||
|
||||
Allows reconnnection of a previously connected player.
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"RECONNECT",
|
||||
"playerName":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Disconnect a player
|
||||
|
||||
This is hopefully detected automatically, and the game will just automatically remove them from play for the next round,
|
||||
and treat them as skippable in this game.
|
||||
|
||||
*** Reconnect As Player
|
||||
|
||||
Allows reconnnection of a previously connected player (who has not been dropped)
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"RECONNECT",
|
||||
"playerName":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Drop a Player
|
||||
|
||||
Drops a disconnected player from the game (permanently), leader only.
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"DROP_PLAYER",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Text Prompt Answer
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"TEXT_PROMPT_ANSWER",
|
||||
"player":"name",
|
||||
"imageData":"data:image/png;base64,..."
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Image Prompt Answer
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"IMAGE_PROMPT_ANSWER",
|
||||
"player":"name",
|
||||
"text":"answer text here"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Skip Player
|
||||
|
||||
If a player has disconnected, they can be skipped in this round, and the next player will get their prompt,
|
||||
and once they've completed it, we'll continue the game as before. Can only be sent by current leader.
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"SKIP_PLAYER",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Show Next Answer
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"NEXT_ANSWER",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
*** Show Previous Answer
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"PREVIOUS_ANSWER",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Reaction To Answer
|
||||
|
||||
* possible reactions are:
|
||||
|
||||
- Like
|
||||
- LOL
|
||||
- Thumbs Down
|
||||
- Man Facepalming
|
||||
- Woman Facepalming
|
||||
|
||||
points gained for most Likes, most LOLs, most negative reactions (thumbs down/facepalm), and most reactions
|
||||
|
||||
You cannot react to your own response to a prompt, each player can only have one reaction to any given answer.
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"REACT",
|
||||
"reaction":"LIKE",
|
||||
"initialPromptId":"",
|
||||
"answerId":"",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Next Player
|
||||
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"action":"NEXT_PLAYER",
|
||||
"player":"name"
|
||||
}
|
||||
#+END_SRC
|
||||
Loading…
x
Reference in New Issue
Block a user