How warshoow/game-engine works
This is a Bevy voxel game backed by a hand-written Rust voxel core. The main player workflow is: generate and stream terrain around the player, render chunks, then move, target blocks, and edit them; inventory, dropped items, crafting, and data-defined block behavior extend that loop. Content loading, generated textures, lighting, liquids, and persistence are distinct capabilities. The README documents several subsystems whose implementation details were not sampled; their paths and links are shown only where supported by the tree or documentation.
Main entry points: main.rs Bevy application · interact.rs Block interaction · world.rs World and chunks · inventory.rs Inventory and crafting
Components 26
Bevy game
- Chunk streaming
src/streaming.rs - Game UI
src/ui.rs - Bevy application
src/main.rs
Voxel world core
- Terrain generation
crates/voxel_core/src/worldgen.rs - World and chunks
crates/voxel_core/src/world.rs - Palette chunks
crates/voxel_core/src/chunk.rs - Greedy meshing
crates/voxel_core/src/mesher.rs - Block lighting
crates/voxel_core/src/light.rs - Liquid simulation
crates/voxel_core/src/liquids.rs - Voxel raycast
crates/voxel_core/src/raycast.rs - Block rules
crates/voxel_core/src/rules.rs - Block ticks
crates/voxel_core/src/ticks.rs - Collision physics
crates/voxel_core/src/physics.rs - Recipe logic
crates/voxel_core/src/crafting.rs - World serialization
crates/voxel_core/src/save.rs
Player gameplay
- FPS controller
src/player.rs - Block interaction
src/interact.rs - Inventory and crafting
src/inventory.rs - Dropped items
src/items.rs
Content and persistence
- Content registry
crates/voxel_core/src/registry.rs - Content loading
src/content.rs - Generated textures
crates/voxel_core/src/texgen.rs - Save system
src/save.rs - Generated blocks
src/generate.rs
Other components
- Claude CLI
- Save files
Connections 40
- Bevy application → Chunk streaming: starts
src/main.rs - Bevy application → FPS controller: registers
src/main.rs - Bevy application → Block interaction: registers
src/main.rs - Bevy application → Inventory and crafting: registers
src/main.rs - Bevy application → Dropped items: registers
src/main.rs - Bevy application → Content loading: loads
src/main.rs - Bevy application → Save system: loads
src/main.rs - Bevy application → Game UI: registers
src/main.rs - Bevy application → Generated blocks: registers
src/main.rs - Chunk streaming → Terrain generation: generates chunks
README.md - Chunk streaming → Save system: reads edits
README.md - Chunk streaming → World and chunks: loads chunks
README.md - World and chunks → Palette chunks: stores voxels
crates/voxel_core/src/world.rs - World and chunks → Content registry: owns content
crates/voxel_core/src/world.rs - Terrain generation → Palette chunks: generates
crates/voxel_core/src/worldgen.rs - Terrain generation → Content registry: resolves blocks
crates/voxel_core/src/worldgen.rs - Greedy meshing → Palette chunks: reads voxels
crates/voxel_core/src/mesher.rs - Greedy meshing → Block lighting: reads light
crates/voxel_core/src/mesher.rs - Greedy meshing → Liquid simulation: meshes liquids
crates/voxel_core/src/mesher.rs - Block lighting → World and chunks: updates lighting
crates/voxel_core/src/light.rs - Liquid simulation → World and chunks: updates voxels
crates/voxel_core/src/liquids.rs - Content loading → Content registry: loads data
README.md - Content registry → Generated textures: generates textures
crates/voxel_core/src/registry.rs - FPS controller → Collision physics: simulates movement
src/player.rs - Block interaction → Voxel raycast: targets blocks
README.md - Block interaction → World and chunks: edits blocks
src/interact.rs - Block interaction → Block rules: fires rules
src/interact.rs - Block interaction → Block ticks: advances ticks
src/interact.rs - Block interaction → Inventory and crafting: reads held item
src/interact.rs - Block interaction → Dropped items: drops items
src/interact.rs - Block rules → World and chunks: checks world
crates/voxel_core/src/rules.rs - Block ticks → Block rules: evaluates rules
crates/voxel_core/src/ticks.rs - Inventory and crafting → Recipe logic: checks recipes
crates/voxel_core/src/crafting.rs - Dropped items → Inventory and crafting: adds pickups
src/items.rs - Inventory and crafting → Game UI: shows menus
src/inventory.rs - Generated blocks → Claude CLI: requests entry
README.md - Generated blocks → Content registry: validates blocks
README.md - Save system → World serialization: saves world
README.md - World serialization → Save files: writes state
README.md - Save system → Save files: persists player
README.md