Be a Supporter!

Experience system? (AS3)

  • 228 Views
  • 8 Replies
New Topic Respond to this Topic
Lewchador
Lewchador
  • Member since: Oct. 3, 2013
  • Offline.
Forum Stats
Member
Level 08
Game Developer
Experience system? (AS3) 2013-10-27 02:16:20 Reply

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


BBS Signature
PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Experience system? (AS3) 2013-10-27 04:51:24 Reply

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
Response to Experience system? (AS3) 2013-10-27 06:51:57 Reply

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
Response to Experience system? (AS3) 2013-10-27 07:20:23 Reply

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.


BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to Experience system? (AS3) 2013-10-27 10:18:36 Reply

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
Response to Experience system? (AS3) 2013-10-27 11:27:05 Reply

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
Response to Experience system? (AS3) 2013-10-27 11:36:35 Reply

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.


BBS Signature
Jin
Jin
  • Member since: Sep. 9, 2006
  • Offline.
Forum Stats
Supporter
Level 50
Blank Slate
Response to Experience system? (AS3) 2013-10-29 13:34:09 Reply

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.


BBS Signature
Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to Experience system? (AS3) 2013-10-29 18:52:58 Reply

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