Skip to content
This repository was archived by the owner on Aug 9, 2026. It is now read-only.

Repository files navigation

The Imposter

A social deduction card game where players figure out who the imposter (and troll) are based on hints and voting. Frankly I made this because of all the stupid imposter games on play store that have too many ads.

Status: This project was interrupted mid-development. A significant portion was built using Claude as the lead architect — the core mechanics work and the structure is solid, but development was cut short. It's fully playable, just not 100% feature-complete.


How It Works

Roles

  • Crewmate: Knows the secret word. Tries to deduce and vote out the imposter.
  • Imposter: Doesn't know the word. Gets a hint and tries to blend in without being caught.
  • Troll (optional): Appears to be crewmate, but tries to make the crew lose.

Game Loop

  1. Setup: Players join, settings are configured (word pack, number of imposters, hint mode).
  2. Role Assignment: Players are randomly assigned roles. Crewmates and the imposter see the word/hint on their screens.
  3. Discussion: Players discuss who they think the imposter is (in real life or via chat).
  4. Voting: Players vote to eliminate someone.
  5. Reveal: The voted-out player is revealed. If they were the imposter, crew wins. If not, the imposter keeps playing until voted out or time runs out.

Features

  • Single-player mode: Play locally with your friends on one device.
  • Server mode: Firebase integration for online multiplayer (database rules and config included).
  • Multiple word packs: Office, Animals, Food, Movies, and more.
  • Custom words: Use your own secret words instead of pre-made packs.
  • Hint modes: Full hint or no hint for imposters.
  • Troll role: Add chaos with an optional troll player.
  • PWA-ready: Installable as a progressive web app (manifest.json included).

Setup

Local Development

git clone https://github.com/DaEpickid540/imposter.git
cd imposter
# Open index.html in a browser or use a local server
python3 -m http.server 8000
# Navigate to http://localhost:8000

Firebase Setup (for online multiplayer)

  1. Create a Firebase project at https://firebase.google.com.
  2. Update firebase-config.js with your project credentials.
  3. Deploy rules using firebase deploy (requires Firebase CLI).

Project Structure

imposter/
├── index.html          # UI layout (game setup, screens, player views)
├── app.js              # Core game logic (40KB of state management and voting)
├── style.css           # Dark theme styling
├── word-packs.js       # Pre-built word lists (Office, Animals, Food, etc.)
├── firebase-config.js  # Firebase authentication & database config
├── manifest.json       # PWA metadata (installable on mobile)
├── database.rules.json # Firebase Realtime DB security rules
├── firebase.json       # Firebase deployment config
├── icons/              # App icons (192x192, 512x512 for PWA)
└── CHANGES.md          # Development notes

Key Files Explained

app.js

The heart of the game. Contains:

  • Global state object tracking players, roles, and game progress.
  • Role assignment and word/hint distribution.
  • Voting logic and elimination flow.
  • UI rendering for each game phase.

word-packs.js

Pre-built word arrays:

  • wordPacks.office → ["Email", "Meeting", "Deadline", ...]
  • wordPacks.animals → ["Lion", "Penguin", ...]
  • wordPacks.food → ["Pizza", "Sushi", ...]
  • Custom words can be toggled in settings.

style.css

Dark theme with clear role-based colors:

  • Crewmate: Blue
  • Imposter: Red
  • Troll: Purple (when revealed)

firebase-config.js

Handles authentication and Realtime Database connections for online play.


Usage

  1. Start a game: Input player names and select settings.
  2. Assign roles: Click "Start Game" — roles are randomly distributed.
  3. Discuss: Each player sees their role and word/hint. Discuss in person to find the imposter.
  4. Vote: Players vote to eliminate someone.
  5. Reveal & Repeat: Voted player is revealed. If imposter, crew wins. Otherwise, next round.

Settings

  • Imposter Count: 1–3 imposters per game.
  • Hint Mode: Imposter sees full hint or no hint.
  • Troll Enabled: Add an optional troll role.
  • Word Pack: Select from pre-built packs or use custom words.

Technologies

  • Frontend: Vanilla JavaScript, HTML5, CSS3
  • Backend: Firebase Realtime Database
  • PWA: Service Worker, manifest.json
  • Architecture: Single-file state management (no frameworks)

License

Not specified in repo. Check with the author.


Questions?

Open an issue or reach out to @DaEpickid540.

Enjoy finding imposters! 🎭

About

Social deduction game - Imposter

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages