Experience system? (AS3)
- Lewchador
-
Lewchador
- Member since: Oct. 3, 2013
- Offline.
-
- Forum Stats
- Member
- Level 08
- Game Developer
I am wondering what the best way to go about doing an experience system is?
Something like every level you need the amount of experience from the last level + 5% of it too? Basically, are the common algorithms used?
Thanks
- PSvils
-
PSvils
- Member since: Feb. 3, 2010
- Offline.
-
- Forum Stats
- Member
- Level 01
- Game Developer
At 10/27/13 02:16 AM, Lewchador wrote: I am wondering what the best way to go about doing an experience system is?
Something like every level you need the amount of experience from the last level + 5% of it too? Basically, are the common algorithms used?
Thanks
I'm not sure what you mean...
newExperienceLevel = oldExperienceLevel * 1.05;
?
That's the only algorithm you would be needing...
- SurferLight
-
SurferLight
- Member since: Sep. 18, 2010
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
At 10/27/13 02:16 AM, Lewchador wrote: I am wondering what the best way to go about doing an experience system is?
Something like every level you need the amount of experience from the last level + 5% of it too? Basically, are the common algorithms used?
Thanks
Sounds about right.
ne = ne+(oe*0.05);
- kkots
-
kkots
- Member since: Apr. 16, 2013
- Offline.
-
- Forum Stats
- Supporter
- Level 10
- Blank Slate
You'd have more control if you made a table:
expLevels=[
100,
200,
500,
1000,
2000,
5000,
8000
];
And making creeps stronger depending on hero's level depends not on XP, but on hero's stats.
Making creeps give more XP as hero gains levels can be done using xpGainTable for all levels.
- MSGhero
-
MSGhero
- Member since: Dec. 15, 2010
- Offline.
-
- Forum Stats
- Supporter
- Level 16
- Game Developer
I would use a getter for exp and stats if they are level-dependent.
return baseExp * 1.05^level;
return baseDamage + 5 * level + weapon.dmg;
etc - Sam
-
Sam
- Member since: Oct. 1, 2005
- Offline.
-
- Forum Stats
- Moderator
- Level 19
- Programmer
At 10/27/13 02:16 AM, Lewchador wrote: I am wondering what the best way to go about doing an experience system is?
Something like every level you need the amount of experience from the last level + 5% of it too? Basically, are the common algorithms used?
Thanks
I think the one thing you can take away from the varied replied is that there is no best way, it all depends on your game and many aspects of your game. How quickly do you want the player to progress? What constitutes to a level? Is there a level cap? Are levels something the player has input in or is it preset?
- kkots
-
kkots
- Member since: Apr. 16, 2013
- Offline.
-
- Forum Stats
- Supporter
- Level 10
- Blank Slate
At 10/27/13 11:27 AM, Sam wrote: I think the one thing you can take away from the varied replied is that there is no best way, it all depends on your game and many aspects of your game.
Then I think that a very interesting question would be how to program a game (what design pattern to use) without knowing how the level/experience system is going to work beforehand. Or how to separate the level/xp system from the rest of the game and how to interact with it.
- Jin
-
Jin
- Member since: Sep. 9, 2006
- Offline.
-
- Forum Stats
- Supporter
- Level 50
- Blank Slate
Use the fibonacci sequence.
Required xp of current level takes the sum of the req.xp of previous 2 levels.
Start with 21 if basic rewards are 1-4 etc etc.
- Innermike
-
Innermike
- Member since: Sep. 11, 2009
- Offline.
-
- Forum Stats
- Member
- Level 14
- Blank Slate
Without proper balancing levels will just end up being cheap padding and it won't really add anything to the game, in order to make it a deep and rewarding experience you're going to to have to do a lot of testing and you probably won't end up using the same system by the end anyway so if I were you I wouldn't make a big deal out of trying to get it right straight off the bat.
nobody

