Skip to content

Project Structure ​

What lives where inside this submodule. Paths are relative to the submodule root (src/games/fps/ from the engine repo's perspective).

Paths below are relative to src/games/fps/.

AreaFiles and responsibility
RootGame.ts owns the active game host; FPSPlayer.ts wires the player; ClientEntityKey.ts defines stable client keys; index.ts exports the game API; game.json describes the module
client/ — lobbyLobbyPanel.ts, ProfileView.ts, LeaderboardView.ts, DemosView.ts, WelcomeOverlay.ts, RoomChatView.ts
client/ — engine adaptersFpsLobbyService.ts, FpsMapLauncher.ts, FpsNetworkConnector.ts
client/ — gameplayV2NetworkClient.ts handles prediction/snapshots; GameEvents.ts handles events; remote-player, ragdoll, gib and audio systems present the world
client/ — watchingDemoService.ts, DemoViewer.ts, Spectator*.ts, Spectate*.ts
client/hud/, client/settings/, client/styles/HUD widgets, settings pages and game UI styles
console/index.ts discovers game commands in commands/
server/GameServer.ts, SnapshotBuilder.ts, SnapshotBroadcaster.ts, DemoRecorder.ts, MovementValidator.ts, AuthorityGuards.ts, SuspendedSessions.ts
server/gametypes/GametypeController.ts, MatchState.ts, BaseGametype.ts; Duel, Amphi, Deathmatch and Search & Destroy; awards and spawn strategies
server/systems/Pickup, weapon, projectile, combat, dropped-weapon, movement and liquid subsystems
simulation/FPSSimulation.ts, MovementProfile.ts, Acceleration.ts, slide/wall-jump/ledge-grab/ladder/swim mechanics and collision/ — shared by client and server
liquid/Water, slime and lava state shared by simulation, server and client
models/Trained bot model weights
world/FPSPickup.ts, InventoryManager.ts, PickupPrompt.ts, pickups/procedural/
docs/manual/This VitePress manual
__tests__/ foldersTests alongside the systems they cover

Weapon and projectile definitions are not in this repo: they live in the engine at src/shared/entities/definitions/. See Adding a Weapon.

Where things plug into the engine ​

Submodule fileEngine extension point
client/FpsNetworkConnector.tsNetworkConnector registry (src/engine/ui/components/NetworkConnector.ts)
client/FpsMapLauncher.tsGameplayMapLauncher registry (src/engine/console/GameplayMapLauncher.ts)
console/commands/*CommandRegistry via registerFpsCommands()
world/FPSPickup.tsSubclasses engine Pickup (src/engine/world/Pickup.ts)
simulation/FPSSimulation.tsImplements engine Simulation<State, Input>
server/GameServer.tsWraps engine networking transports + tick loop

Bot Intelligence Server lives outside this submodule ​

The bot system runs as a separate Node.js process and lives at src/bot/ in the engine repo (not in this submodule). See Tools → Bot Server.

Built on the SHAG Engine.