Skip to content
M

MCQ Royale

Battle to survive the MCQ Royale

Created on 7th September 2025

•

M

MCQ Royale

Battle to survive the MCQ Royale

The problem MCQ Royale solves

MCQ Royale

MCQ Royale is a multiplayer trivia game built with the MERN stack and Socket.IO. Players compete in real time by answering multiple-choice questions. Each player has three lives, one minute per question, and elimination occurs on wrong answers. The last remaining player wins.


Features

  • Multiplayer support with Socket.IO.
  • Built using the MERN stack (MongoDB, Express, React, Node.js).
  • Game rules:
    • Each question has a one-minute timer.
    • Each player starts with three lives.
    • Wrong answer deducts one life.
    • Players are eliminated when lives reach zero.
  • Elimination feed and leaderboard.
  • Option to host a game and create custom quizzes.
  • Bulk question upload through CSV.

Tech Stack

  • Frontend: React + Tailwind CSS
  • Backend: Node.js + Express
  • Database: MongoDB (Mongoose)
  • Real-time: Socket.IO

How It Works

  1. A game host creates a quiz with a name, start time, and questions (manual entry or CSV upload).
  2. Players join the game through a room code.
  3. During gameplay:
    • Each question is shown with a one-minute timer.
    • Wrong answers reduce lives.
    • Players with zero lives are eliminated.
    • Eliminations are updated in real time.
  4. The game continues until only one player remains.

Challenges I ran into

Challenges I Ran Into

As a solo developer, building a multiplayer game with sockets came with its own set of challenges.

  • Designing the game flow was harder than expected. Unlike a normal app, I had to think about what happens to all players at the same time: when a question is sent, when someone answers, and when eliminations are broadcast.
  • Keeping track of multiple players was tricky. I had to store user states like lives left, whether they answered, and whether they were eliminated, all in real time.
  • Handling the timing for each question was a big learning curve. At first I tried using simple loops, but making sure every client stayed in sync required a more careful approach.
  • Testing alone was slow. Multiplayer features are difficult to test without multiple devices, so I had to simulate multiple players to see how the system behaved.

Discussion

Builders also viewed

See more projects on Devfolio