RPG Calculating experience gained per kill.

Started by
3 comments, last by Old Soul 6 years, 2 months ago

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 :)

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

 

 

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

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.

Why do s

This topic is closed to new replies.

Advertisement