Skip to main content

Overview

The multiplayer quiz flow in IntelliQ involves several API endpoints that handle quiz generation, submission, and leaderboard functionality. This guide explains the complete flow from quiz creation to viewing results.

Flow Diagram

Response Examples

Scoring Mechanics

The time-based scoring system rewards both accuracy and speed:
  1. Base Formula: points = Math.round((1 - (timeTaken / timeLimit) / 2.2) * 1000)
  2. Fast Answer Bonus: +50 points for answers under 10% of the time limit
  3. Minimum Points: All correct answers earn at least 100 points
  4. Incorrect Answers: 0 points
Each user’s total score accumulates as they answer questions, and their submission record is updated rather than creating multiple records.

Error Handling

The API will return appropriate error codes and messages if:
  • The quiz generation parameters are invalid
  • The room ID doesn’t exist
  • The question ID is invalid or doesn’t belong to the quiz
  • The user is not authorized to access the room
Written by Ricky Raveanu