Formular for generating amount of XP a killed enemy provides

Hey guys,

I’m looking for a formular which determines the amount of experience points (XP) a killed enemy provides for a player to gain a level up if enough points are earned. I know that this is depending on a lot of various factors so if you maybe could give me your thoughts on the topic that would help. I dont want to set the XP which a killed enemy gives manually. So the enemies in my game have different attributes. Which are the following:

  • Health
  • MaxHealth
  • Mana
  • MaxMana
  • Damage
  • AttackSpeed
  • Level
  • MovementSpeed
  • Strength
  • Agility
  • Intelligence

I was thinking about something like xpToGive = enemy.MaxHealth / 2 or something (of course this is way too simple and would cause a bad XP distribution). But I think it would be cool to generate the amount of XP automatically by the stats of an enemy. As I already said I know it’s hard for you to judge because you don’t know how the single attributes affect gameplay and the difficulty of killing an enemy, but maybe your reflections on this topic can give me a hint how to implement this or maybe you tell me the whole idea is crap unless I have 10000 different enemies in my game and its simply not worth implementing this.

Thanks!

Well put it this way: if you need a crazy formula to work it out then your players aren’t really going to fathom it either, so my advice is keep it reaaaallly simple and just base it on about 3 attributes and ignore the rest.

Also remember that XP is a bit like currency, in that it sort of suffers inflation… the rewards need to keep creeping up and up but, in line with the amounts needed to gain levels. And they should go up in steps, rather than linearly.

And finally if someone’s bashing things that are clearly too easy, you need to scale the rewards down massively towards a single 1XP reward. Eg. by the time something is 10 levels below you, it should be worth 1XP no matter what.

Cas :slight_smile:

This are some really, really good points. Especially the thing with killing enemies which are too easy, thanks for