It is currently Fri Dec 13, 2013 9:34 pm

 All times are UTC

 Page 1 of 1 [ 7 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: RPG leveling systemPosted: Sat Apr 08, 2006 2:27 am
 Source Code Swashbuckler

Joined: Sat Apr 08, 2006 2:10 am
Posts: 203
Location: Los Angeles, The land of plenty
I'm trying to design a RPG, and I am trying to figure out how to get a proper leveling algorithm or something. Instead of just setting up all these cases for the experience like:
Code:
switch(exp)
{
case 500: level++;
case 1000: level++;
//etc.
}

Because, i don't know, I might want like 100 levels, or 60, or even 40, which might be a lot of cases to have.
Or, rather, how would you set up the experience and leveling system? (I open to any ideas.)

Top

 Post subject: Posted: Sat Apr 08, 2006 3:12 am
 Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
Have these variables:

CurrentEXP
EXPtoLevel
CurrentLevel

When CurrentEXP >= EXPtoLevel, then CurrentLevel + 1, CurrentEXP = 0 and EXPtoLevel = X

X can be any equation, preferably a single-variable equation with CurrentLevel as the variable. For example, X = (CurrentLevel * 1000) would be 1000 exp for every level. Or X = (CurrentLevel * 1000) ^ 1.2 would add a larger range in exp required for higher levels.

_________________
NetGore - Open source online RPG engine

Top

 Post subject: Posted: Sat Apr 08, 2006 5:07 am
 King Code Monkey

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11204
Location: Abingdon, MD
To handle the exp/level deal, create a simple table and check it when the player gains experience. If you keep the table in a file, it can easily be changed to ensure it's balanced when you're testing.

Top

 Post subject: Posted: Sat Apr 08, 2006 11:40 am
 Bibliotherapist

Joined: Wed Dec 21, 2005 6:23 pm
Posts: 6210
Location: Manchester, UK
or just have a simple formula, that you can show in a table in design documents fro clarity, but is expadable a lot easier than that. For example, the d20 system has a table with xp values for each level, but it follows a simple formula, which I think is something like (in code):

Code:
for (int i = 1; 1 <= level; i++)
expForNextLevel += i;
expForNextLevel *= 1000;

or, in more english terms, times the level by 1000, and add that onto the previous value for the next level to gain the next experience point target.

_________________
God must love stupid people, he made so many.
theraje: 'God doesn't love stupid people, they're just easier to make'
http://sharedillusions.blogspot.com

Top

 Post subject: Re: RPG leveling systemPosted: Sun Jun 26, 2011 2:10 am
I'm using a leveling system that starts by preset values up to lvl 6 then uses a formula like

nextLevel = (1,000 ^ (curLevel / 100 + 1.2))

anyway It's also a good Idea to save all of the values for the levels into some array in the init of the game. That way you won't have to constantly be running this formula for ever exp gained. At least thats how I did it.

Top

 Post subject: Re: RPG leveling systemPosted: Mon Apr 15, 2013 6:38 pm
 Level 1 Cleric

Joined: Thu Apr 11, 2013 9:27 pm
Posts: 12
Location: Kansas
I prefer the algorithm : NextLevel = ((Previous Level * 2) + 1/2 Previous Level)

Level 2 general starting at 100 xp or 200 xp needed then extrapolating out to a max level of 100 or so.

_________________
“Man is still the most extraordinary computer of all.” – John Fitzgerald Kennedy

Top

 Post subject: Re: RPG leveling systemPosted: Thu May 30, 2013 5:29 am
 Rookie

Joined: Thu May 30, 2013 5:23 am
Posts: 4
I am also new in game development and my area is rpg, this one can help me. thanks.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 7 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forum

Search for:
 Jump to:  Select a forum ------------------ Forums    Forum Rules and Posting Guidelines Wiki Discussion    Help    Content Issues Game Programming Discussion    C and C++ Game Programming    Java Game Programming    Language Agnostic Programming    .NET Game Programming    VB Game Programming    Mobile Game Programming    Web-Based Game Programming    Other Languages    OpenGL Development    Direct X Development Game Development Discussion    Game Design    Game Media Off-Topic Discussion    Announcements    Off-Topic    Community Projects    News