Levels Overview
The Phoenix Levels system provides a progression framework where users advance through levels by earning experience points (XP). Levels create long-term engagement and provide a sense of achievement as users progress.
The Phoenix Levels system provides a progression framework where users advance through levels by earning experience points (XP). Levels create long-term engagement and provide a sense of achievement as users progress.
What Are Levels?
Levels represent stages of progression in your application. Users advance through levels by accumulating experience points (XP), which can be earned through various activities and events.
Key Concepts
Experience Points (XP)
XP is the currency of progression. Users earn XP through:
- Completing activities (matches, quests, challenges)
- Daily login bonuses
- Achievement completions
- Leaderboard participation
- Referral activities
- Custom events you define
Level Progression
Each level has:
- Level Number - Sequential level identifier (1, 2, 3, etc.)
- XP Requirement - Total XP needed to reach this level
- Rewards - Optional rewards granted when level is reached
- Benefits - Optional perks unlocked at this level
Level Configuration
Level systems are configured with:
- XP Sources - Which events grant XP and how much
- Level Definitions - XP thresholds for each level
- Reward Tiers - Rewards granted at specific levels
- Progression Rules - How XP accumulates and levels unlock
How Levels Work
Earning XP
- User performs an action (completes match, logs in, etc.)
- Event is sent to Phoenix
- XP earning rules evaluate the event
- XP is granted to the user's account
- Total XP is updated
Leveling Up
- User's total XP reaches a level threshold
- System checks if level-up conditions are met
- Level is updated
- Rewards are granted (if configured)
- User receives notification of level-up
XP Tracking
Phoenix tracks:
- Current Level - User's current level number
- Total XP - Lifetime XP earned (never decreases)
- XP to Next Level - How much XP needed for next level
- Level Progress - Percentage progress to next level
Integration with Other Features
Levels integrate with other Phoenix features:
- Wallets: XP can be tracked as a non-spendable currency
- Achievements: Level milestones can trigger achievements
- Rewards: Levels can grant rewards when reached
- Leaderboards: XP can be used as a scoring metric
- Streaks: Streak milestones can grant XP bonuses
Next Steps
- Creating Levels - Learn how to configure level systems
- Querying Results - Learn how to retrieve level and XP data