How stewie1570/sailing works
Lake Windermere is a browser-based 3D sailing and docking simulator with solo play, multiplayer rooms, navigation/AIS features, and sailing theory. The player enters through the menu, starts or joins a session, then steers and trims a locally simulated boat through the rendered lake; multiplayer sessions relay room, wind, and boat updates. The map generator prepares chart-derived runtime assets. Edges reflect shown imports/calls or README descriptions; several unsampled UI, rendering, and server details are therefore represented only at subsystem level.
Main entry points: Scene.tsx Scene composer · App.tsx App flow · session.ts Session manager · mapData.ts Map loader
Components 27
Player experience
- App flow
client/src/App.tsx - Menu
client/src/ui/Menu.tsx - HUD
client/src/ui/Hud.tsx - Sailing controls
client/src/ui/SailingControls.tsx - Controller setup
client/src/ui/ControllerSetup.tsx - Navigation map
client/src/ui/NavMap.tsx - Sailing theory
client/src/ui/theory/Theory.tsx
Sailing simulation
- Local boat
client/src/scene/boat/Boat.tsx - Remote boats
client/src/scene/boat/RemoteBoat.tsx - Boat physics
client/src/scene/boat/physics.ts - Motion dynamics
client/src/scene/boat/dynamics.ts - Sail forces
client/src/scene/boat/sail.ts - Helm state
client/src/scene/boat/helm.ts
Lake world
- Scene composer
client/src/scene/Scene.tsx - Lake environment
client/src/scene/environment.ts - Map loader
client/src/map/mapData.ts - Terrain renderer
client/src/scene/Terrain.tsx - Water renderer
client/src/scene/Water.tsx - Harbors and buoys
client/src/scene/Harbors.tsx
Multiplayer
- Session manager
client/src/net/session.ts - Room protocol
client/src/net/protocol.ts - AIS messages
client/src/net/aisMail.ts - Game relay
server/Sailing.Server/Hubs/GameHub.cs - Server host
server/Sailing.Server/Program.cs
Map assets
- Chart map generator
tools/mapgen/mapgen.mjs - World endpoint
server/Sailing.Server/World/WorldInfo.cs
Other components
- Sailor
Connections 33
- Sailor → App flow: opens
client/src/App.tsx - App flow → Session manager: uses session
client/src/App.tsx - App flow → Scene composer: shows sailing
client/src/App.tsx - App flow → HUD: shows HUD
client/src/App.tsx - App flow → Menu: shows menu
client/src/App.tsx - App flow → Sailing theory: opens lessons
client/src/App.tsx - Sailor → Menu: chooses session
README.md - HUD → Sailing controls: presents controls
client/src/ui/Hud.tsx - HUD → Navigation map: presents map
client/src/ui/Hud.tsx - HUD → Session manager: reads session
client/src/ui/Hud.tsx - Sailing controls → Helm state: updates helm
client/src/ui/SailingControls.tsx - Controller setup → Helm state: configures helm
client/src/ui/ControllerSetup.tsx - Navigation map → Session manager: reads ships
client/src/ui/NavMap.tsx - Navigation map → AIS messages: opens messages
client/src/ui/NavMap.tsx - Session manager → Room protocol: uses messages
client/src/net/session.ts - Session manager → Game relay: relays room traffic
README.md - Server host → Game relay: hosts hub
server/Sailing.Server/Program.cs - Server host → World endpoint: serves world data
server/Sailing.Server/Program.cs - Scene composer → Map loader: loads map
client/src/scene/Scene.tsx - Scene composer → Local boat: renders boat
client/src/scene/Scene.tsx - Scene composer → Remote boats: renders fleet
client/src/scene/Scene.tsx - Scene composer → Terrain renderer: renders terrain
client/src/scene/Scene.tsx - Scene composer → Water renderer: renders water
client/src/scene/Scene.tsx - Scene composer → Harbors and buoys: renders harbors
client/src/scene/Scene.tsx - Local boat → Boat physics: steps motion
client/src/scene/boat/Boat.tsx - Local boat → Sail forces: computes sail state
client/src/scene/boat/Boat.tsx - Local boat → Helm state: reads controls
client/src/scene/boat/Boat.tsx - Boat physics → Motion dynamics: steps dynamics
client/src/scene/boat/physics.ts - Scene composer → Lake environment: uses environment
client/src/scene/Scene.tsx - Terrain renderer → Map loader: reads map
client/src/scene/Terrain.tsx - Water renderer → Map loader: reads map
client/src/scene/Water.tsx - Harbors and buoys → Map loader: reads map
client/src/scene/Harbors.tsx - Chart map generator → Map loader: generates runtime assets
README.md