Skip to content

khannasujaan/nerdsfornerdss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Quiz Battle - Real-Time Multiplayer Quiz Game

A fast-paced, competitive quiz game where two players race to answer questions first. Built with React and Firebase for real-time synchronization.

Quiz Battle Demo React Firebase


🎯 Features

Core Gameplay

  • First to Answer Wins - Race against your opponent to answer first
  • ⏱️ 15-Second Timer - Answer before time runs out
  • 🎲 Random Question Pool - 10 questions selected from 50+ question bank
  • 🔀 Question Shuffle - Questions appear in random order each game
  • 📊 Live Score Tracking - See scores update in real-time

Visual Effects

  • 🎬 Flash Animations - Dramatic full-screen notifications when someone answers
  • 💫 Score Animations - Watch scores change with smooth transitions
  • Correct Answer Highlight - Green glow effect on correct answers
  • 🔊 Sound Effects - Audio feedback for correct/wrong answers and timer

Real-Time Features

  • 👥 Live Multiplayer - Both players see updates instantly
  • 🔄 Real-Time Sync - Powered by Firebase Firestore
  • 📱 Cross-Device Support - Play on desktop, tablet, or mobile
  • 🎪 Progress Bar - Visual progress through questions

🚀 Quick Start

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Firebase account

Installation

  1. Clone the repository
git clone https://github.com/yourusername/quiz-battle.git
cd quiz-battle
Install dependencies

npm install

Set up Firebase

Go to Firebase Console
Create a new project
Enable Firestore Database (Start in test mode)
Copy your Firebase configuration


Create .env file
# In the root directory, create .env file
REACT_APP_FIREBASE_API_KEY=your_api_key
REACT_APP_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
REACT_APP_FIREBASE_APP_ID=your_app_id

Start the development server

npm start
The app will open at http://localhost:3000



3000

🎮 How to Play
Creating a Game

Click "Create Room" on the home screen
Share the 6-character room code with your friend
Wait for them to join
Game starts automatically when both players are ready

Joining a Game

Click "Join Room" on the home screen
Enter the room code from your friend
Click "Join"
Game starts immediately

Gameplay

Read the question carefully
Click your answer as fast as possible
First to answer gets the point (if correct)
Wrong answer = -1 point
No answer (timeout) = 0 points for that question
After 10 questions, the player with the most points wins!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors