How adityaagurav/oceancleanup2 works
Ocean Cleanup 2 is a browser-based ocean-cleaning game. The player starts through the React app, enters the Three.js game orchestrated by Engine, explores on foot or by boat, and interacts with cleanup and wildlife systems; Engine callbacks return gameplay updates to the UI. The tree also shows progression, building, exploration, and environmental features. Several system implementations and the main loop were not sampled, so the map includes documented capabilities but omits uncertain internal wiring and persistence details.
Main entry points: Engine.js Game Engine · App.jsx Game App · ChunkManager.js Chunk Streaming · TerrainGenerator.js Terrain Generation
Components 31
App and UI
- Game App
src/App.jsx - Main Menu
src/ui/MainMenu.jsx - Gameplay HUD
src/ui/HUD.jsx - Game Over
src/ui/GameOver.jsx - Creature Collection
src/ui/Pokedex.jsx - Settings
src/ui/Settings.jsx - Leaderboard
src/ui/Leaderboard.jsx - How to Play
src/ui/HowToPlay.jsx
Game Runtime
- Game Engine
src/engine/Engine.js - Game Loop
src/core/GameLoop.js - Input Manager
src/player/InputManager.js - Character Controller
src/player/CharacterController.js - Boat Control
src/player/BoatController.js - Camera Control
src/player/CameraController.js
World and Encounters
- Chunk Streaming
src/world/ChunkManager.js - Terrain Generation
src/world/TerrainGenerator.js - Biome Rules
src/world/BiomeManager.js - Water Rendering
src/world/StylizedWater.js - Trash Cleanup
src/world/TrashSystem.js - Fish Encounters
src/world/FishSystem.js - Wildlife
src/world/WildlifeSystem.js - Underwater World
src/world/UnderwaterSystem.js
Interaction and Progression
- Interaction System
src/player/InteractionSystem.js - Building System
src/world/BuildingSystem.js - Treasure System
src/world/TreasureSystem.js - Companion System
src/world/CompanionSystem.js
Runtime Services
- Time and Weather
src/core/TimeSystem.js - Weather System
src/core/WeatherSystem.js - Sound Effects
src/audio/AudioManager.js - Asset Cache
src/engine/AssetManager.js
Other components
- Player
Connections 31
- Player → Game App: starts game
- Game App → Main Menu: renders
- Game App → Game Engine: creates
- Game App → Gameplay HUD: renders
- Game App → Game Over: renders
- Game App → Creature Collection: renders
- Game App → Settings: renders
- Game App → Leaderboard: renders
- Game App → How to Play: renders
- Game Engine → Game App: reports events
- Game App → Gameplay HUD: updates display
- Game App → Sound Effects: plays pickup sound
- Game Engine → Input Manager: creates
- Game Engine → Character Controller: creates
- Game Engine → Boat Control: creates
- Game Engine → Camera Control: creates
- Game Engine → Trash Cleanup: creates
- Game Engine → Fish Encounters: creates
- Game Engine → Wildlife: creates
- Game Engine → Underwater World: creates
- Game Engine → Time and Weather: creates
- Game Engine → Weather System: creates
- Game Engine → Interaction System: initializes
- Game Engine → Game Loop: coordinates
- Game Engine → Chunk Streaming: initializes
- Chunk Streaming → Terrain Generation: generates chunks
- Terrain Generation → Biome Rules: uses biome rules
- Chunk Streaming → Underwater World: provides terrain generator
- Game App → Companion System: selects companion
- Game App → Building System: opens building UI
- Game Engine → Asset Cache: loads assets