Level-up curve
Works out how much experience each level costs, so early levels come fast and later ones take more work. It handles the sums that are easy to get wrong: several levels at once, the bar between two levels, and the top level.
When you need it
For any game with levels or ranks, above all when you know how long the climb should take and want the numbers worked out for you.
Say this to your AI
Use the level-up curve from Spielerando: 50 levels, about 20 hours of play at 600 XP an hour. Work out the costs and show me the table.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
Settings
- firstLevelXp (100): XP from level 1 to level 2. It sets the scale of all numbers.
- growth (1.5): How steeply costs rise. Try 1.5 for the "power" style and 1.1 for "percent".
- maxLevel (50): The top level.
- style (power): "power" rises steadily, "percent" rises very steeply, "flat" costs the same each level.
- roundTo (5): Costs are rounded to this, so players see tidy numbers.
Your AI gets the code
The finished code and math come through the Spielerando connection, so your AI can use them right away. Connect your AI
Common questions
how much xp should each level need
Start small so the early levels feel quick, then let the cost rise with the level. The usual choice is the level to the power of about 1.5, times the cost of the first level.
how do i make my game take 20 hours to max out
Work out the total XP: 20 hours times the XP an hour. The recipe then finds the steepness that makes all the levels add up to that total.
why does my xp bar show the wrong amount after levelling up
The bar needs the XP inside the current level, not the total, and one big reward can skip levels. The recipe gives you both, also at the top level where the bar stops.