How to Make a Trivia Quiz Game
A trivia game is a question bank wrapped in a timer. Here is how to structure the questions, score speed fairly, and run a room of players without leaking answers.

Key takeaways
- Treat questions as data with category, difficulty, a source and a one-line explanation. The bank is the product.
- Score correctness first and speed second, so fast guessing never beats knowing.
- In multiplayer, the server owns the timer and the answer. Clients never receive the correct answer before the reveal.
To make a trivia quiz game you need a well-structured question bank, a round format with a timer, a scoring rule that rewards knowledge and some speed, and, if friends play together, a room where one screen shows the questions and phones act as buzzers. The code is short; the question bank and the fairness rules are where trivia games succeed or fail. Here is how to build each part, solo first, then multiplayer.
Design the question bank first
Every question should be a record, not a line of text in code. A good schema:
- prompt: the question, one or two lines, readable on a phone.
- choices: four options for multiple choice (or a typed answer with accepted spellings for free-text rounds).
- answer: which choice is correct.
- category and difficulty (1 to 3 is enough).
- explanation: one sentence shown after the reveal. This is where players learn something, and it is what makes a trivia game feel generous.
- source: where the fact came from, for you, so disputed questions can be checked.
- media (optional): an image or a short audio clip for picture and music rounds.
How many questions? A round of 10 drawn from a bank of 30 feels repetitive by the third game. Aim for at least 10 times as many questions per category as a game uses, and track which questions each player has seen recently so they do not repeat.
Writing questions that are fair
- One correct answer, beyond dispute. “Largest desert” has two defensible answers (Antarctica or the Sahara) depending on definition. Rewrite or cut.
- Plausible wrong answers. Distractors from the same category and scale. “Which planet has the most moons?” with Saturn, Jupiter, Uranus and Neptune is a real question. With Saturn, Banana, Paris and 7 it is not.
- Shuffle choice order every time, and never let the correct answer be the longest choice by habit.
- Date your facts. Records, populations and “current” anything go stale. Avoid them or note the year in the question.
Timers and speed scoring
A timer turns a quiz into a game. Ten to twenty seconds per question is the common range; picture and audio questions need a few more. Show the countdown as a shrinking bar rather than only a number, so players feel it in their peripheral vision.
For scoring, reward being right far more than being fast. A formula that works: a correct answer is worth 500 points plus up to 500 more for speed, scaled linearly from a full bonus at 0 seconds to none at the time limit. A wrong answer scores 0, and no answer scores 0. A player who knows the answer and takes 8 seconds still beats one who guessed wrong in 1. Kahoot popularized speed-weighted scoring; whatever formula you choose, show the points earned after each question so players understand it.
Streaks and rounds
- Streak bonus: +100 points per consecutive correct answer, capped at 3 or 5 in a row, so a streak is exciting but not decisive.
- Round structure: 3 rounds of 5 to 8 questions, each round a different category or format, keeps a 10-minute game varied.
- Final question: double points or a wager round, so whoever is behind still has a chance at the end.
Multiplayer rooms: one screen, many phones
Trivia is at its best in a room full of friends. The proven shape: a host screen (a TV, a laptop, a projector in a classroom) shows the question, the timer and the scoreboard, and every player joins from their phone with a short room code and becomes a buzzer with four colored buttons. See our multiplayer game guide for how rooms work on Startbase in general.
- 01Lobby: host creates a room and shows a four-letter code and a QR code; players enter a name and join. The host sees names appear and starts when ready.
- 02Question phase: the server sends the prompt and choices to everyone and starts the timer. Phones show only the four buttons (the question is on the big screen, which keeps everyone looking up together).
- 03Lock-in: each answer is sent to the server with the time it arrived. The phone shows “locked in.”
- 04Reveal: when the timer ends or everyone has answered, the server reveals the correct answer, the explanation, who got it right and the updated scoreboard.
- 05End: a podium for the top three, then Play again with the same room.
Two rules keep it fair. The server owns time: answers are timed when the server receives them, not by each phone’s clock. And the correct answer never reaches the clients before the reveal. If the answer is in the data sent to phones, someone will open the developer tools and find it. Lobbies, presence and live boards like this run on Startbase Cloud’s realtime channels; see Multiplayer in the Cloud docs. Realtime features explained covers what live updates are and when you need them.
- Late joiners join at the next question with zero points (or the lowest current score, which is kinder).
- Dropped phones reconnect to the same player by a stored id, keeping their score.
- Names need a length limit and, for public rooms, a basic filter. For classrooms, let the host remove a player.
The brief to paste
A multiplayer trivia game for game nights. The host opens the game on a laptop or TV and creates a room with a four-letter code and a QR code; players join on their phones with a name. Each game is 3 rounds of 6 questions from a question bank stored in the database (prompt, four choices, answer, category, difficulty 1 to 3, one-line explanation, source). The big screen shows the question and a 15-second shrinking timer bar; phones show four large colored answer buttons. Scoring: 500 for correct plus up to 500 for speed, measured when the server receives the answer; +100 streak bonus per consecutive correct answer up to 3. The correct answer is never sent to phones before the reveal. After each question show the answer, the explanation and the scoreboard. Final question is worth double. Podium at the end, Play again keeps the room. Also a solo mode on one phone with the same questions. Seed 150 questions across 5 categories with sources.
Formats beyond four buttons
- Closest number wins: “How tall is the Eiffel Tower in meters?” Everyone types a number; closest scores. Great for mixed-knowledge groups.
- Picture rounds: zoomed-in photos that slowly zoom out, logos, maps.
- Audio rounds: a few seconds of a sound. Use sounds you have rights to; the agent can generate sound effects for you.
- Daily quiz: five questions a day, the same for everyone, with a shareable score. It turns a party game into a habit.
Teachers use exactly this shape for review games; the games use case shows more of what people build. Test with two phones and a laptop before game night, including a phone that locks mid-round. For classroom versions, see classroom games for teachers, and for stream chat, games for streamers and their viewers.
Frequently asked questions
How many questions does a trivia game need?
Enough that players rarely see repeats. A good rule is at least ten times the questions per category that one game uses, plus tracking of recently seen questions per player.
How do I stop players cheating in an online quiz?
Keep the correct answer on the server until the reveal, time answers when the server receives them, and accept only one answer per player per question.
Can AI write my trivia questions?
It can draft them quickly, but facts can be wrong. Ask for a source with each question and check numbers, dates and superlatives before you publish.
How long should the timer be in a quiz game?
Ten to twenty seconds suits most multiple-choice questions. Give picture, audio or number-guess questions a few seconds more.

