How dgreenheck/tidewater works
Tidewater is a browser-based WebGPU island fishing game. The player explores on foot or by boat, fishes in location- and time-dependent water, fights and records catches, then sells fish and buys gear. The runtime also builds a detailed island, ocean, sky and wildlife scene, with audio and post-processing. The graph follows the documented capabilities and sampled startup/rendering code; some game and world wiring is documented in the README but its implementation was not sampled.
Main entry points: App.js Game orchestrator · main.js Browser entry · Game.js Fishing and trade · WorldLayout.js Island world
Components 23
Gameplay
- Player and boat
src/player/Player.js - Boat physics
src/player/BoatController.js - Fishing and trade
src/game/Game.js - Game progress
src/game/GameState.js
Island and ocean
- Fish and species
src/world/Fish.js - Island world
src/world/WorldLayout.js - Terrain
src/world/Terrain.js - Ocean surface
src/ocean/WaterSurface.js - Water queries
src/ocean/WaterQuery.js - Ocean simulation
src/ocean/OceanFFT.js - Shore and wakes
src/ocean/ShoreSim.js - Sky and clouds
src/sky/Sky.js - Wildlife
src/world/wildlife/Wildlife.js
Rendering engine
- Game orchestrator
src/App.js - WebGPU engine
src/engine/Engine.js - Scene renderer
src/engine/render/SceneRenderer.js - Post-processing
src/post/PostFX.js
UI and audio
- Browser entry
src/main.js - Game UI
src/ui/UI.js - Settings UI
src/ui/AppUI.js - Soundscape
src/audio/SoundScape.js
Other components
- Player
- Browser GPU
Connections 26
- Player → Player and boat: controls
- Browser entry → Game orchestrator: starts
- Browser entry → Game UI: creates
- Browser entry → Settings UI: creates
- Game orchestrator → WebGPU engine: initializes
- WebGPU engine → Browser GPU: requests WebGPU
- Game orchestrator → Fishing and trade: creates
- Game orchestrator → Soundscape: creates
- Game orchestrator → Post-processing: creates
- Game orchestrator → Ocean surface: creates
- Game orchestrator → Scene renderer: renders scene
- Game orchestrator → Sky and clouds: sets up
- Game orchestrator → Island world: sets up
- Game orchestrator → Shore and wakes: sets up
- Game orchestrator → Ocean simulation: sets up
- Ocean surface → Ocean simulation: samples
- Water queries → Ocean surface: queries surface
- Water queries → Terrain: reads seabed
- Boat physics → Water queries: reads water state
- Player and boat → Boat physics: controls
- Fishing and trade → Fish and species: uses species
- Fishing and trade → Game progress: tracks progress
- Island world → Terrain: builds on
- Island world → Wildlife: includes
- Scene renderer → Post-processing: feeds post chain
- Soundscape → Browser GPU: plays audio