A realtime multiplayer game where players take turn answering trivia questions.
Website »
Table of Contents
Players can create lobbies (private or public) and invite their friends to play via URL. The game involves 2 main stages: answering and betting. During the answering phase, a single player answers a trivia question. During the betting phase, all the other players will place bets hoping that the answerer got the trivia question wrong: the higher the bet, the more money they can steal from the answerer. Look below for rules and example.
Frontend:
Backend:
Host:
Rules
Players take turns answering trivia questions.
On your turn:
- Answer the trivia question displayed. (multiple choice)
- All other players can place bets hoping that you answered incorrectly.
- If their prediction was right (you got the question wrong), you will have to pay however much they betted on you.
- However, if you proved them wrong and answered correctly, you will earn $1000 AND everyone who didn't believe in you will have to pay their bets to you!
Example
- Bob answers the question: What is 1+1? Bob bluffs that he can't do math.
- John believes that Bob is indeed bad at math and bets $500 that Bob will answer incorrectly.
- No way! Bob guessed correctly and won $1000. Additionally, because John made an incorrect prediction, $500 is deducted from his balance and given to Bob!
It's Bob's turn to answer:
Here is a guide if you want to clone my website and modify it for yourself, all the way to deployment.
- Clone the repo
git clone https://github.com/troygamedev/bet-you-dont-know.git
- Install packages
yarn cd client yarn cd ../server yarn
- Create a
.env
file in the /server folder and fill in the following info for the backend to function properlySESSION_SECRET= ADMIN_PASSWORD=
To run the development server
yarn dev
Then head over to localhost:3000
- Publish the site on Heroku using continuous git integration.
- Enter in the environment variables (from
.env
) to Heroku via Heroku's CLI or through the website dashboard.
Distributed under the MIT License. See LICENSE
for more information.
Ajay Liu - [email protected]
Project Link: https://github.com/troygamedev/bet-you-dont-know