How kinncj/mindcraft works
MindCraft is a browser-only, kid-friendly creative voxel game. A player uses the on-screen controls to explore an infinite world, place and shape blocks, and interact with creatures; the game engine handles simulation and rendering while the game store saves world state locally. The README also documents building tools, crafting, dress-up, vehicles, weather, and villager-driven construction. Some subsystems are represented from documented capabilities and the source index; unsampled implementation details and their internal links are not assumed.
Main entry points: Engine.ts Game engine · gameStore.ts Game state · worldStore.ts World persistence · ChunkManager.ts Chunk streaming
Components 23
Game interface
- Game interface
src/app/App.tsx - Game canvas
src/game/GameCanvas.tsx - Game state
src/game/gameStore.ts - World menu
src/components/MenuPanel.tsx
World simulation
- Game engine
src/engine/core/Engine.ts - Creatures and player
src/engine/entities/EntitySystem.ts - Player physics
src/engine/entities/PlayerAvatar.ts
Voxel world
- Block definitions
src/engine/blocks/blocks.ts - Voxel world
src/engine/world/VoxelWorld.ts - World chunks
src/engine/world/Chunk.ts - Chunk streaming
src/engine/world/ChunkManager.ts - Terrain generation
src/engine/world/generation/InfiniteGenerator.ts - Voxel lighting
src/engine/lighting/LightEngine.ts - Chunk meshing
src/engine/render/ChunkMesher.ts
Creative features
- Villager chat
src/engine/chat/ChatAgent.ts - Creative tools
src/engine/tools/buildTools.ts
Local persistence
- World persistence
src/storage/worldStore.ts - Browser database
src/storage/db.ts - Chunk codec
src/storage/chunkCodec.ts - World settings
src/storage/settingsRepository.ts - World import and export
src/importExport/exportWorld.ts - Import validation
src/importExport/validateWorldImport.ts
Other components
- Player
Connections 31
- Player → Game interface: uses
- Game interface → Game canvas: shows
src/app/App.tsx - Game interface → Game state: reads state
src/app/App.tsx - Game interface → World menu: shows
src/app/App.tsx - World menu → Game state: updates
src/components/MenuPanel.tsx - Game state → Game engine: accesses
src/game/gameStore.ts - Game state → World persistence: saves worlds
src/game/gameStore.ts - Game state → World import and export: exports worlds
src/game/gameStore.ts - Game state → Import validation: validates imports
src/game/gameStore.ts - Game engine → Creatures and player: runs
src/engine/core/Engine.ts - Game engine → Player physics: runs
src/engine/core/Engine.ts - Game engine → Villager chat: uses
src/engine/core/Engine.ts - Game engine → Voxel world: manages
src/engine/core/Engine.ts - Game engine → Block definitions: resolves blocks
src/engine/core/Engine.ts - Game engine → Creative tools: provides tools
src/engine/core/Engine.ts - Chunk streaming → Terrain generation: requests terrain
src/engine/world/ChunkManager.ts - Chunk streaming → World chunks: creates
src/engine/world/ChunkManager.ts - Chunk streaming → Chunk meshing: requests meshes
src/engine/world/ChunkManager.ts - Chunk streaming → Voxel lighting: uses lighting
src/engine/world/ChunkManager.ts - Chunk meshing → World chunks: reads
src/engine/render/ChunkMesher.ts - Chunk meshing → Block definitions: reads definitions
src/engine/render/ChunkMesher.ts - Voxel world → World chunks: stores blocks
src/engine/world/VoxelWorld.ts - Voxel lighting → Voxel world: reads blocks
src/engine/lighting/LightEngine.ts - World persistence → Browser database: reads and writes
src/storage/worldStore.ts - World persistence → Chunk codec: encodes chunks
src/storage/worldStore.ts - World persistence → World chunks: loads chunks
src/storage/worldStore.ts - World persistence → World settings: uses defaults
src/storage/worldStore.ts - World import and export → Browser database: reads worlds
src/importExport/exportWorld.ts - Import validation → World persistence: prepares world data
src/importExport/validateWorldImport.ts - Player → Creative tools: builds with
- Player → Villager chat: requests builds