Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

In many games you raise a level when you reach a certain score, and later levels are harder to reach than in the beginning.

I am suspecting that it is some sort of exponential function that is used in e.g. WoW.

Does anyone know of a good exponential function for this purpose?

share|improve this question
    
possible duplicate of How to determine the amount of experience needed for leveling up –  user744 Oct 22 '11 at 18:45
    
add comment

2 Answers

up vote 9 down vote accepted

There's no standard, nor is there actually any reason for there to be. People seem to like the exponential growth as it makes them feel like they're getting more powerful and being faced with proportionately more challenge each time, but in fact that is only true if the way you collect points doesn't also change proportionately as well. If the experience-per-victory rises as the same rate as the experience-per-level, then there's little point either rising - they could both just stay constant.

Further, the implication is that you can't just pick a function for how you want your experience curve to go without knowing how you want your experience accrual to go. And that is a game design decision based on the type of experience you want, and not one we can provide for you.

Still, to answer your question: the type of function you've seen elsewhere is just something like this, a trivial polynomial with a scale factor:

threshold_for_next_level = x * current_levely

Typical values might be x=1000, y=1.5. eg:

level 1 = 1000
level 2 = 2828
level 3 = 5196
...
level 10 = 31623
etc.

If you want the slope to be steeper, you increase y. If you want the numbers larger, you increase x.

You might want to have rounder numbers, in which case just round the end result up to 2 or 3 significant digits, or the nearest thousand, whatever you like.

Just remember that these values are meaningless in isolation. If it requires 15000 experience to go from level 15 to level 16, then you must make sure that your game design makes it practical for a level 15 character to accrue 15000 experience points during normal play. There's no point just tweaking the curve after testing because that is generally too time-consuming - you must start out with a curve that matches the awards your game gives out in a way that fits your intended design.

share|improve this answer
add comment

Moria/Angband (and all their spinoffs including -- debatably -- Diablo) base their systems on matching monster level to player level, to see what you earn, with rising XP-per-level requirements beyond that.

In Diablo, there are optimal levels of monster you can kill, within 5 levels of you in positive and negative. That looks something like this (apologies if this isn't accurate, Diablo fans):

XP Gain = monsterBaseXP * (5-|(characterLevel-monsterLevel)|) / 5
(where result cannot drop below 0)

Examples for characterLevel 16: Monster A's level: 16. Gain 100% of monster base XP. Monster B's level: 13. Gain 40% of monster base XP. Monster C's level: 20. Gain 20% of monster base XP. Monster D's level: 23. Gain 0% of monster base XP.

In Angband (the model I prefer), it's something like this:

XP Gain = monsterBaseXP * monsterLevel / characterLevel.

So if you killed a level 50 monster when you were level 5, you would gain 10x the XP that a level 50 character who killed that same monster would gain. I like this, it is high-risk, high-reward. I have lost thousands upon thousands of characters in Angband to this. But the one's who make it, well they are the legendary ones. I think I once hit level 29 instantly from level 1 ;) Likewise, a level 50 character killing a level 5 monster would gain 1/10th of the XP a level one character would gain for killing that monster. Further, because the base XPs also go up, this means killing low level monster can still net you some reward, but go too far down and becomes utterly pointless.

In both games, they additonally use multipliers on XP needed (on a rising scale), however, and the ratio between this and the optimal level monster XP given does get gradually steeper.

The simplest form of this idea is to do the following. Decide how many monsters of equal level to you, you must kill each level to grade (ignoring quest rewards etc.). Let's say 100 -- irrespective of your level. Say that if the player kills a monster of equal level to herself, she gains 1XP.

Using an Angband-like formula to reward increase & reduction according to monster level, your levelling table is linear:

1: 100xp
2: 200xp
3: 300xp

...And so on. I find this to be the easiest jumping off point -- tweak as appropriate, include monster base XPs, level cutoffs, etc. to your heart's content.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.