Skip to content

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PARASITE

PARASITE is a real-time browser social-deduction game set aboard a failing space station. Create a private room, bring together four to ten players, discover your role, and survive the round through tasks, deception, meetings, votes, and sabotage.

It is built with Node.js, Express, Socket.IO, worker-thread game engines, and vanilla HTML, CSS, and JavaScript.

Screenshots

Mission entry

PARASITE mission entry screen

Create-room flow

PARASITE create-room screen

Desktop command deck

PARASITE gameplay command deck

Communications

PARASITE desktop communications panel

PARASITE mobile communications panel

The capture inventory in docs/screenshots/README.md records each current image and the next game states to capture.

What Players Can Do

  • Create or join private rooms for 4-10 players.
  • Play on Station Core or Outpost Ring, including map-specific movement and vent routes.
  • Complete interactive tasks, report bodies, call meetings, and vote suspects out.
  • Sabotage lights, reactor, doors, or communications as a parasite.
  • Use role variants: Medic, Engineer, Detective, Alpha, and Janitor.
  • Collect witness-scoped clues from reports, vents, camera traces, and inspections.
  • Use live communications while alive and ghost chat after death.
  • Reconnect during an active round and recover role, tasks, cooldowns, and meeting context.
  • Review a post-game Truth Timeline that reveals hidden actions after the match.

How A Round Works

  1. The host creates a room and configures the match.
  2. Each player receives a hidden Human or Parasite role.
  3. Humans move through the station, complete their real tasks, fix sabotages, and investigate clues.
  4. Parasites eliminate players, perform fake tasks, sabotage the station, and avoid suspicion.
  5. Reports or emergency calls open a meeting. Players discuss, vote, and return to the station unless the game ends.

Humans win by completing all real tasks or eliminating all parasites. Parasites win by reaching parity with humans or by allowing a reactor meltdown to expire.

Roles

Team Base role Variant abilities
Human Complete tasks, fix sabotages, report, discuss, and vote Medic protects a player, Detective inspects room visitors, Engineer fixes sabotage faster
Parasite Eliminate players, fake tasks, sabotage, deceive, and vote Alpha has a reduced kill cooldown, Janitor can clean one body

Maps

Map Style Special feature
Station Core Compact, highly connected station Fast rotations between all rooms
Outpost Ring Restricted circular route Parasite vent routes between Reactor/MedBay and Lab/Storage

The station contains Lab, Reactor, Security, Storage, MedBay, and Communications. Security provides surveillance information; sabotages affect different areas of play.

Run Locally

Requirements

  • Node.js 18 or newer
  • npm

Install and start

npm install
npm start

Open http://localhost:3000 in one or more browser windows. The server accepts PORT when you need a different port.

$env:PORT = "8080"
npm start

Test And Verify

Run the fast baseline suite:

npm test
npm run check:syntax

Run multiplayer and feature coverage with the server running:

npm run test:smoke
npm run test:full-flow
npm run test:features
npm run test:tasks
npm run test:reconnect
npm run test:evidence

Use MANUAL_QA.md for the final browser checklist across lobby settings, gameplay, meetings, role abilities, reconnect recovery, evidence, and mobile layouts.

Configuration

Gameplay defaults live in server/utils/Constants.js. Hosts can configure parasite count, tasks per human, map, role variants, kill cooldown, meeting duration, voting duration, and anonymous voting for a new room.

Setting Default
Players per room 4-10
Task cooldown 3 seconds
Kill cooldown 45 seconds
Meeting duration 30 seconds
Voting duration 20 seconds
Evidence lifetime 60 seconds

For rapid local evidence testing, set PARASITE_BODY_DECAY_MS to a value no lower than 1000 before starting the server.

$env:PARASITE_BODY_DECAY_MS = "5000"
npm start

Project Layout

parasite/
|-- server.js                 # HTTP/Socket.IO entry point and worker routing
|-- public/                   # Vanilla browser client, UI, audio, and assets
|-- server/
|   |-- core/                 # Game state, phases, and validation
|   |-- systems/              # Tasks, sabotages, and voting
|   |-- rooms/ and state/     # Room and player lifecycle
|   `-- PersistenceManager.js # Restart snapshots and recovery
|-- docs/screenshots/         # Current README captures and capture guide
|-- MANUAL_QA.md              # Browser verification checklist
`-- *_test.js                 # Unit, static, smoke, flow, and feature checks

Architecture And Safety

The browser client communicates through Socket.IO with a Node.js edge server. Room-affinity routing keeps each match on one worker-thread engine. The server validates socket ownership, room IDs, player names, game phase, and action targets before updating game state.

Active rooms are persisted to data/game_state.json for restart recovery, and disconnected players receive a short reconnect grace period. Player-originated chat and display values are escaped before browser rendering.

For an internet-facing deployment, add authentication, rate limiting, trusted Socket.IO origins, HTTPS, centralized persistence, monitoring, and an operations policy before accepting untrusted public traffic.

License

This repository does not currently declare a license.

About

Parasite - A lightweight social deduction multiplayer web game. Trust no one. Survive. Built with Node.js, Express, and Socket.IO.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages