How singhaman21/tag works
Rushout is a browser-based arcade tag game with two play modes: same-device local multiplayer and online Colyseus rooms. Players choose a mode or create/join a coded room; online play proceeds through a configurable lobby, authoritative timed arena simulation, and rendered HUD/results, while local play runs its simulation entirely in the browser. Shared maps, gameplay constants, power-up definitions, and room-state schemas support both sides. The graph reflects documented features where source excerpts were unavailable; those limits prevent asserting unsampled page-to-page or server internals wiring.
Main entry points: TagRoom.ts Room Server · OnlineGame.tsx Online Play · engine.ts Local Simulation · LocalPlay.tsx Local Setup
Components 20
Browser Client
- Route App
client/src/App.tsx - Mode Menu
client/src/pages/MainMenu.tsx - Local Setup
client/src/pages/LocalPlay.tsx - Touch Controls
client/src/components/TouchJoystick.tsx
Online Rooms
- Online Play
client/src/pages/OnlineGame.tsx - Create Room
client/src/pages/CreateRoom.tsx - Join Room
client/src/pages/JoinRoom.tsx - Room Lobby
client/src/pages/RoomLobby.tsx - Room Server
server/src/rooms/TagRoom.ts - Server Registry
server/src/index.ts
Game Runtime
- Keyboard Inputs
client/src/hooks/useLocalInputs.ts - Local Simulation
client/src/game/engine.ts - Canvas Renderer
client/src/game/renderer.ts
Shared Domain
- Arena Maps
shared/src/maps.ts - Power-Up Rules
shared/src/powerups.ts - Game Constants
shared/src/constants.ts - Room Schema
shared/src/schema.ts - Game Types
shared/src/types.ts
Other components
- Player
- Colyseus Service
Connections 30
- Player → Route App: opens game
- Route App → Mode Menu: routes to
- Mode Menu → Local Setup: chooses local
- Mode Menu → Create Room: creates room
- Mode Menu → Join Room: joins room
- Local Setup → Keyboard Inputs: reads keys
- Local Setup → Local Simulation: updates simulation
- Local Setup → Canvas Renderer: renders state
- Keyboard Inputs → Local Setup: supplies controls
- Create Room → Room Lobby: opens room
- Join Room → Room Lobby: opens room
- Room Lobby → Online Play: starts play
- Online Play → Colyseus Service: connects
- Colyseus Service → Server Registry: accepts WebSockets
- Server Registry → Room Server: registers room
- Online Play → Room Server: sends inputs
- Room Server → Online Play: broadcasts state
- Online Play → Canvas Renderer: renders state
- Touch Controls → Online Play: supplies controls
- Local Simulation → Arena Maps: uses maps
- Local Simulation → Power-Up Rules: uses power-ups
- Local Simulation → Game Constants: uses constants
- Room Server → Arena Maps: uses maps
- Room Server → Power-Up Rules: uses power-ups
- Room Server → Game Constants: uses constants
- Room Server → Room Schema: updates state
- Online Play → Room Schema: reads state shape
- Canvas Renderer → Power-Up Rules: uses display config
- Local Simulation → Game Types: uses types
- Room Server → Game Types: uses types