How josephgibson/tungsten works
Tungsten is a native Rust 2D game engine, with a companion gameplay kit and project CLI. The main runtime path is a game project launched through the engine: the app coordinates runtime services and rendering, while the core supplies ECS, scheduling, physics, input and UI; the kit adds reusable gameplay behaviors. The graph also preserves asset loading, state transitions, and the CLI’s documented project workflows. Edges are limited to README statements and relationships visible in the source index; unsampled wiring is omitted or marked unverified.
Main entry points: app.rs Application runtime · pipeline.rs Damage resolution · ability.rs Ability system · cues.rs Event reactions
Components 22
Engine Runtime
- Application runtime
crates/tungsten/src/app.rs - Asset loading
crates/tungsten/src/asset_loader/mod.rs - Screen transitions
crates/tungsten/src/screens/mod.rs
Core Services
- Archetypal ECS
crates/tungsten-core/src/ecs/storage.rs - ECS queries
crates/tungsten-core/src/ecs/query.rs - System scheduling
crates/tungsten-core/src/schedule.rs - 2D physics
crates/tungsten-core/src/physics/collision.rs - Physics queries
crates/tungsten-core/src/physics/query.rs - Input mapping
crates/tungsten-core/src/input/action_map.rs - UI system
crates/tungsten-core/src/ui
Gameplay Kit
- Ability system
crates/tungsten-kit/src/intent/ability.rs - Hit detection
crates/tungsten-kit/src/overlap/hit.rs - Damage resolution
crates/tungsten-kit/src/damage/pipeline.rs - Health and death
crates/tungsten-kit/src/damage/health.rs - Event reactions
crates/tungsten-kit/src/react/cues.rs - Entity lifecycle
crates/tungsten-kit/src/lifecycle/ended.rs - Gameplay foundations
crates/tungsten-kit/src/foundation
Rendering
- GPU renderer
crates/tungsten-render/src/renderer.rs - Post processing
crates/tungsten-render/src/post/mod.rs
Project CLI
- Tungsten CLI
tools/cli/src/main.rs
Other components
- Game developer
- Game project
Connections 16
- Game developer → Tungsten CLI: runs commands
tools/cli/src/main.rs - Game developer → Game project: builds game
README.md - Tungsten CLI → Game project: checks, runs, renders
tools/cli/src/main.rs - Game project → Application runtime: runs with engine
README.md - Application runtime → Asset loading: uses loader
crates/tungsten/src/app.rs - Application runtime → Screen transitions: coordinates screens
crates/tungsten/src/screens/mod.rs - Application runtime → GPU renderer: drives rendering
- GPU renderer → Post processing: applies effects
crates/tungsten-render/src/renderer.rs - Archetypal ECS → ECS queries: supports queries
crates/tungsten-core/src/ecs/query.rs - 2D physics → Physics queries: indexes query shapes
crates/tungsten-core/src/physics/query.rs - Hit detection → Damage resolution: requests damage
crates/tungsten-kit/src/overlap/hit.rs - Damage resolution → Health and death: resolves health
crates/tungsten-kit/src/damage/pipeline.rs - Ability system → Damage resolution: uses damage pipeline
crates/tungsten-kit/src/intent/ability.rs - Event reactions → Ability system: dispatches actions
crates/tungsten-kit/src/react/cues.rs - Entity lifecycle → Event reactions: orders despawn after
crates/tungsten-kit/src/lifecycle/ended.rs - Damage resolution → Gameplay foundations: uses shared services
crates/tungsten-kit/src/damage/pipeline.rs