Jump to content
  • Advertisement
EddieK

RPG Calculating experience gained per kill.

Recommended Posts

Hi, I'm currently making an RPG game for android and was wondering if you guys could help me out with calculating XP gained for a kill. I'm currently using a level up formula from Borderlands where the amount of experience necessary to reach level x equals ceil(60x2.8 − 60). Should the XP gained be proportional to the level of the player and the health/level of the monster killed? 

 

Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement

You should remember that lots of factors go into how much experience you gain.

I'd start off with figuring out exactly how much experience you want to gain at level 1.

Lets say you have 400xp for level 2 and you get about 55xp per kill. (this is lowkey based on wow level 1 from my memory)

 

at level 2, a level 1 mob shouldn't give you the same xp as it did when you were level 1.

Val = 55

PlayerLevel * Val = x

And we need to extend other variables into this equation to account for it as well.

Exp Multiplier * Enemy/PlayerLevel

ExpMultiplier = 1.0 * (xp boost) * any other variables

So your algorithm could be
Val * (ExpMultiplier * Enemy/PlayerLevel)

 

First, calculate the level ratio between enemy and player, reduce XP if the player is higher level increase if lower.

Add the multiplier in, 1.0 is the default, however, you can make this value scale based on level or anything you want really, the point of it is to add more numbers to toy with our XP rates.

Now even with all those values and modifiers, a level 1 player fighting a level 1 enemy still results in only 55 xp assuming Val = 55

 

 

Share this post


Link to post
Share on other sites
16 hours ago, EddieK said:

Should the XP gained be proportional to the level of the player and the health/level of the monster killed? 

There are games that use a system like that, but they're rare because it just complicates things design-wise, and you kinda gotta have a reason/idea to implement it.

The simpler thing is to just make a tabel per monster for gained XP per level and a tabel for XP required per level.

But, what i recommend, is to leave the balancing of experience until after the game is working and the stats have been balanced, and not waste your attention on it now;

you might actually want to playtest at increased XP-gain though, so it's good to make your code in such a way you can easily tweak XP-gain

Share this post


Link to post
Share on other sites

I'd suggest walking through the process backwards. Set the exp per monster to anything you like. Play the game for a bit and get a feel for when would be a good time for the player to get an upgrade. However much exp you've collected is up until now the exp needed to reach the next level. Getting a good feel for it requires playtesting, all games have a different feel for how much this is as it also depends on how dangerous it feels, how far you've had to travel to find the next enemy, how much money the player spends on killing an enemy with ammo/healing/repairs/upgrades, and how much time is takes to take them down etc etc.

There are too many variables to give you a perfect answer, but your goal should be to produce a specific experience for the player, so keep that in mind and shape your game around it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!