So I just finished my first Level system (which I did all on my own, very happy!) and my only problem is how the experience is multiplied every level.
Currently my system is very simple.
CurrentLevel * 15.
My problem is that when I look at games like WoW, Runescape, LeagueOfLegends, Maplestory…They all seem to have random numbers. Is it random? or do they have a complicated way of doing it?
I found those functions for a very old MMO level points system (between 0 and 200). If you can figure out the name of the game, I shall give you my eternal respect, and a friendly yet manly pat on the shoulder.
/* Recursive call to calculate Pi = Pi-1 + tx
with p1 = 10 to stop recursive call */
private int coefp( int x )
{
return ( x == 1 ? 10 : coefp(x-1) +
( x > 192 ? 4096 :
( x > 182 ? 1024 :
( x > 162 ? 256 :
( x > 142 ? 64 :
( x > 122 ? 16 :
( x > 82 ? 4 :
( x > 42 ? 1 : 0 ) ) ) ) ) ) ) );
}
/* Calculate the sum and call recursive function to
calculate Pi */
private int coef( int x )
{
int n = 0;
for( int i = 1; i < x; ++i ) n += coefp(i);
return 1000 + n;
}
/* Calculate the total XP */
private long GetXpByLevel( int level )
{
return (long)(coef(level - 1)*Mathf.Pow(level - 1, 2.5f));
}