/quizrt-ge

Game Engine for QuizRT

Primary LanguageJavaScript

Quiz RT

Contains both packages:

  • Game Engine (gE)
  • Matching Engine (mE)

Package details

gE contains Game Engine code pointing to PORT: 3000
mE contains Matching Engine code pointing to PORT: 3001
gE swagger endpoints

How to install

npm i from inside both packages to install dependencies

How to run

  • npm start from inside both packages to start local servers from 3000 & 3001
  • open browser & launch http://localhost:3001/startgame
    • Click 'Start Game' button as player atleat 2 times to begin game (post 20 secsonds of first player joining). On 4 clicks a game will start instantly.

Events

  • "INITIATEGAME": "Client Event trigger to start game"
  • "GAMEID": "Server Event trigger on generating game ID"
  • "STARTQUIZ": "Client Event trigger to fetch questions"
  • "QUESTION": "Server Event trigger on sending across question"
  • "ENDGAME": "Client Event trigger to abruptly end game"

Design Doc

Detailed design is present in Design