Skip to content

Tracking Player and Game state #2

@zatkiller

Description

@zatkiller

We should decide on the specifications we need to track for a game and player, as this will be needed to track the scores and for player who are trying to reconnect to the game in offline mode.

Specifications (Outdated, see latest comment)

Game state:

  • Game ID

    • Game / Room ID because there can be multiple rooms / games occurring at once
    • Can be done using the Socket ID of the host (will be unique) wish some string concatenation / hashing for lower chance of collision
  • Phase (enum):

    • Following the flow of Chester's wireframe, it can be something like
      Lobby -> Awaiting Answer -> Choosing Person -> Answer Reveal -> To Next Question -> End Game
  • Order of guessing

    • The order of guessing till the question # of guessers left = 1, to make our lives easier, we can generate a random order at every question
  • Current Guesser:

    • Linked to previous, can be implemented in multiple ways
  • Current Question

    • Linked to previous, really depends on implementation and how we want the questions to be displayed (randomized, etc)
  • Player Count

    • End game when count drops below 3
  • Players of the game

    • Player have dynamic IDs, determined by their socket ID
  • Current Answer

    • When user does a match, n

Player State:

  • ID
  • Can use their SocketID, which changes every time browser refreshes
    • Switching to UUID generator for clientId
  • Name
  • isGuesser
  • isHost
  • Score
  • Choice (If Guesser)
  • Answer for current question

Any other specifications you guys think we can cut out, or any specification we are missing, especially the FE pros, as I only have a rough idea of how it will be implemented on FE @chesterhow @AudreyFelicio @wenhaogoh

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions