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.
The capture inventory in docs/screenshots/README.md records each current image and the next game states to capture.
- 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.
- The host creates a room and configures the match.
- Each player receives a hidden Human or Parasite role.
- Humans move through the station, complete their real tasks, fix sabotages, and investigate clues.
- Parasites eliminate players, perform fake tasks, sabotage the station, and avoid suspicion.
- 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.
| 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 |
| 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.
- Node.js 18 or newer
- npm
npm install
npm startOpen http://localhost:3000 in one or more browser windows. The server accepts PORT when you need a different port.
$env:PORT = "8080"
npm startRun the fast baseline suite:
npm test
npm run check:syntaxRun 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:evidenceUse MANUAL_QA.md for the final browser checklist across lobby settings, gameplay, meetings, role abilities, reconnect recovery, evidence, and mobile layouts.
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 startparasite/
|-- 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
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.
This repository does not currently declare a license.




