Progression System
🚀 LevelUp Engine
The Event-Driven Progression Framework. Compatible with modern C# engines and Unity®.
Overview
Decouple your RPG progression, character levels, and stat curves from the UI. LevelUp Engine replaces messy update loops with an observer-driven architecture where UI components update automatically only when stats mutate.
Key Features
- Strategy Pattern: Swap experience curves (Linear, Exponential, Step-curve, or MMO-style) seamlessly.
- Event-Driven Observers: Progress bars, sound effects, and level-up dialogs react strictly to events without polling.
- Deterministic Math: Fully decoupled domain logic ready for unit testing in pure C# environments.
- Custom Stat Curves: Easily configure custom attributes like Health, Mana, Stamina, and Attack multipliers.
Code Preview
// 1. Clean progression API
public class CharacterProgression
{
private readonly IExperienceStrategy _xpCurve;
public event Action<int> OnLevelUp;
public void AddExperience(int xpGained)
{
_currentXp += xpGained;
while (_xpCurve.IsThresholdReached(_currentXp, _level))
{
_level++;
OnLevelUp?.Invoke(_level);
}
}
}