Skip to content

alexsmartens/HQ-Trivia

Repository files navigation

HQ-Trivia II Game

Heroku Flask-SocketIO Redis Eventlet Gunicorn

Check out this game on Heroku.

Check out game architecture presentation on Prezi.

Game Intro

UI

alt text

Insights

  • type in your favourite nickname and press "Log in" to start playing;
  • a player with any name can join a game as long as there is no player with the same name already exists in this gaming room;
  • game starts when at least 2 players joined;
  • there is a 10 sec waiting time for other players to join the game after the minimum number of players have joined the game;
  • the first round starts after the initial 10 sec waiting time;
  • the game ends when there is only one player in the game (or none players if everyone lost);
  • each game runs in a separate gaming room. When a game or multiple games is/are already running then a new gaming room is created.

Game Architecture Presentation

Intro

alt text

Outline & Requirements

alt text

Wireflow

alt text

Server-Client Communication for Real-Time Browser Game

alt text

Stack

alt text

How to scale?

alt text

UML Class Diagram

alt text

Flowchart

alt text

Running locally

  1. Download/clone the project.
  2. Navigate to the project directory.
  3. Install all the dependencies from requirements.txt.
  4. Launch the server with gunicorn --worker-class eventlet -w 1 game_server:app.
  5. Open http://127.0.0.1:8000/ in your favourite browser and start gaming.

Deploying on Heroku with Git

Refer to deploying with Git.