How zerok-rts/zero-k works
Zero-K is a real-time strategy game module for the Spring Engine, with physical projectiles, smart units, and a powerful UI. The broad workflow is a player interacting through the game UI while game rules govern units and combat; the repository also contains map/game configuration, Gaia gadgets, and intro content. The tree supports these subsystem boundaries, but the sampled source does not show runtime wiring between them, so those relationships are omitted. The sampled COB headers document unit-state and engine-constant conventions, not their callers.
Main entry points: Gadgets Game rules · LuaUI Game UI · scripts Unit scripts · units Unit definitions
Components 17
Player interface
- Game UI
LuaUI - UI widgets
LuaUI/Widgets - UI configuration
LuaUI/Configs
Game simulation
- Game rules
LuaRules/Gadgets - Rule configuration
LuaRules/Configs - Gaia gadgets
LuaGaia/Gadgets
Game content
- Unit definitions
units - Weapon definitions
weapons - Unit scripts
scripts - Unit state changes
scripts/statechg.h - Engine constants
scripts/constants.h - Visual effects
effects - Map configuration
LuaRules/Configs/StartBoxes
Game support
- Game introduction
LuaIntro - Intro music
LuaIntro/Addons/music.lua
Other components
- Player
- Spring Engine
Connections 16
- Player → Game UI: interacts through
- Game UI → Spring Engine: runs with
README.md - Spring Engine → Game rules: runs game rules
- Spring Engine → Game UI: hosts interface
- Game rules → Unit definitions: uses definitions
- Game rules → Weapon definitions: resolves combat
- Game rules → Rule configuration: uses configuration
- Gaia gadgets → Game rules: affects gameplay
- Game UI → UI widgets: includes widgets
- Game UI → UI configuration: uses configuration
- Unit definitions → Unit scripts: uses scripts
- Unit scripts → Unit state changes: includes state logic
- Unit scripts → Engine constants: uses constants
- Weapon definitions → Visual effects: configures effects
- Game introduction → Intro music: loads addon
- Map configuration → Game rules: configures map play