multiplayer-game
Pragmatic patterns for building multiplayer games: matchmaking, tick loops, realtime state, interest management, and validation.
- Includes starter code and architecture patterns for 10 game types (battle royale, arena, IO style, open world, party, physics 2D/3D, ranked, turn-based, idle) with actor topology, lifecycle diagrams, and netcode strategies.
- Covers server simulation fundamentals: fixed realtime loops vs. action-driven updates, physics engine selection (Rapier 2D/3D), and spatial indexing (rbush, flatbush, d3-quadtree).
- Describes hybrid and server-authoritative netcode models, snapshot/diff broadcasting, shared simulation logic for client prediction, and per-player replication filters for bandwidth control.
- Provides baseline security checklist: identity binding through server-issued tickets, authorization validation, input clamping, rate limiting, and movement validation with speed caps and teleport rejection.
Multiplayer Game
IMPORTANT: Before doing anything, you MUST read BASE_SKILL.md in this skill's directory. It contains essential guidance on debugging, error handling, state management, deployment, and project setup. Those rules and patterns apply to all RivetKit work. Everything below assumes you have already read and understood it.
Patterns for building multiplayer games with RivetKit, intended as a practical checklist you can adapt per genre.
Starter Code
Start with one of the working examples on GitHub and adapt it to your game. Do not start from scratch for matchmaking and lifecycle flows.
| Game Classification | Starter Code | Common Examples |
|---|---|---|
| Battle Royale | GitHub | Fortnite, Apex Legends, PUBG, Warzone |
| Arena | GitHub | Call of Duty TDM/FFA, Halo Slayer, Counter-Strike casual, VALORANT unrated, Overwatch Quick Play, Rocket League |
| IO Style | GitHub | Agar.io, Slither.io, surviv.io |
| Open World | GitHub | Minecraft survival servers, Rust-like worlds, MMO zone/chunk worlds |
| Party | GitHub | Fall Guys private lobbies, custom game rooms, social party sessions |
| Physics 2D | GitHub | Top-down physics brawlers, 2D arena games, platform fighters |
| Physics 3D | GitHub | Physics sandbox sessions, 3D arena games, movement playgrounds |
More from rivet-dev/skills
sandbox-agent
Deploy, configure, and integrate Sandbox Agent - a universal API for orchestrating AI coding agents (Claude Code, Codex, OpenCode, Amp) in sandboxed environments. Use when setting up sandbox-agent server locally or in cloud sandboxes (E2B, Daytona, Docker), creating and managing agent sessions via SDK or API, streaming agent events and handling human-in-the-loop interactions, building chat UIs for coding agents, or understanding the universal schema for agent responses.
6.1Krivetkit
RivetKit backend and Rivet Actor runtime guidance. Use for building, modifying, debugging, or testing Rivet Actors, registries, serverless/runner modes, deployment, or actor-based workflows.
5.7Krivetkit-client-javascript
RivetKit JavaScript client guidance. Use for browser, Node.js, or Bun clients that connect to Rivet Actors with rivetkit/client, create clients, call actions, or manage connections.
5.5Krivetkit-client-react
RivetKit React client guidance. Use for React apps that connect to Rivet Actors with @rivetkit/react, create hooks with createRivetKit, or manage realtime state with useActor.
5.5Krivetkit-client-swiftui
RivetKit SwiftUI client guidance. Use for SwiftUI apps that connect to Rivet Actors with RivetKitSwiftUI, @Actor, rivetKit view modifiers, and SwiftUI bindings.
5.3Krivetkit-client-swift
RivetKit Swift client guidance. Use for Swift clients that connect to Rivet Actors with RivetKitClient, create actor handles, call actions, or manage connections.
5.3K