Simulation: Energy System (BETA)
Where Config Goes
my-game/
├── config.json ← option A: all-in-one (add "simulation" key)
├── config/ ← option B: split files for complex games
│ └── energy-system.config.json
├── game.config.json ← game ID + build settings only (separate)
└── package.jsonWhat You'll Build
Server Configuration
Entities
Entity
Purpose
Regeneration Recipe
Field
Value
Why
Energy-Spending Recipes
Initialization
Client-Side Implementation
Step 1: Read Energy State
Step 2: Subscribe to Real-Time Updates
Step 3: Display Regen Countdown
Step 4: Spend Energy with Optimistic UI
Step 5: Check Requirements Before Showing UI
How Offline Catch-Up Works
Common Variations
Dynamic Regen Rate
Premium Energy Refill
Ad-Rewarded Energy
Best Practices
Last updated