-
Notifications
You must be signed in to change notification settings - Fork 0
Multiplayer and Networking
Dominik Burger edited this page Jun 7, 2026
·
5 revisions
Online multiplayer is live at tamersquest.com — one combined Node service serves the client and runs the authoritative WebSocket game on the same origin.
- Up to 16 players share one round on one map instance; multiple rounds run concurrently.
- Authoritative server owns all state (positions, monsters, combat, zone). Clients send inputs & render snapshots — never trusted (see Anti-cheat).
- Map by seed: the server picks a seed and sends only that; clients regenerate the identical map deterministically (seeded RNG).
-
Sessions: guest play with a nickname (the profile carries an
isGuestflag); the server issues an opaque token the client stores to resume the same profile on reconnect. Google/Discord/email sign-in is now available (see Onboarding and Title) and yields the same kind of token. - Visibility: the server filters each snapshot to an area of interest — some monsters spawn hidden and only reveal at close range (ambush).
The client never owns truth — it sends intent and renders what the server reports:
sequenceDiagram
participant C as Client
participant S as Authoritative Server
C->>S: input (move direction, action)
Note over S: integrate at 15 Hz<br/>collision, combat, zone
S-->>C: filtered snapshot (~7.5 Hz)
Note over C: interpolate & render<br/>(no prediction yet)
| Aspect | Value / rule |
|---|---|
| Tick rate | 15 Hz authoritative simulation |
| Snapshot rate | ~7.5 Hz (every other tick), per-player |
| Area of interest | visible monsters within 900px; hidden monsters only within 220px |
| Hidden monster split | ~35% of a round's monsters start hidden (deterministic from id) |
| Client rendering | interpolates self + others toward the latest snapshot (no prediction yet) |
| Movement authority | client sends a direction only; server integrates at BASE_SPEED (200px/s), clamps the axis to [-1,1] (NaN/∞-safe), normalizes diagonals |
| Tile collision | server per-axis: a move applies only if the destination tile is walkable → slide along walls |
| Map bounds | positions clamped to the map; no walking off into the void |
| Combat actions | server honors only the active monster's own attacks (off-roster names → a skipped turn); a player can only act on their own combat |
A dropped connection mid-round shows a "Connection lost" overlay → return to menu. True reconnection (resume the round) is pending a design decision (Q12).
Tamer's Quest — game-logic wiki. This GitHub Wiki is the canonical, code-mirrored spec (it superseded the in-app public/wiki.html, now archived, on 2026-06-11). Pair with docs/IMPLEMENTATION_PLAN.md and docs/REQUIREMENTS.md in the repo.
Tamer's Quest Game Logic Wiki
- Home
- Onboarding and Title
- Multiplayer and Networking
- Movement and Sprint
- Monsters Stats and Elements
- Combat and Taming
- Spirit Chains
- Progression
- Map and Biomes
- Extraction Round
- Rendering and HUD
- Open Questions
Legend
[CURRENT] implemented
[PLANNED] vision
[OPEN] undecided