In my upcoming game, I basically want it so you start at level 1 which requires 400 XP to reach level 2.
Every kill you get is 100 XP, as well as XP for other things such as damage, missions etc etc.
I’m struggling with a function to get the required XP to level up based on your current level.
return function(level).
So far (START_XP = 400):
return function(level)
local n = Round(2 * (level ^ 2) + 0.0175 * (level ^ 2) + 1 * level)
n = n + START_XP
return n
end
My problem is the algorithm and how it barely increases until around level 10 where it starts to skyrocket. In my game level, 35 would be the max for most players, however 50 is the actual max and is meant to be very difficult and time-consuming to achieve.
With the current function:
Lvl 1: 400 (4 kills)
Lvl 5: 455 (5 kills)
Lvl 10: 610 (7 kills)
Lvl 20: 1225 (13 kills)
Lvl 35: 2905 (30 kills)
Lvl 50: 5490 (55 kills)
Kills aren’t that easy to achieve, most players will struggle with kills until they reach higher levels unlocking better weapons. This is a free-roam fighting game not a fast-paced FPS type game.
However, with just testing with servers of around 20/35 players, within the first hour (with the current level XP function), people were already hitting level 5 which is 20 total kills vs hitting level 35 which would require 445 total kills.
I’m basically after a more linear based approach until level 10, just not sure how to go about it.
What I initially used: How to Make an RPG: Levels | How to Make an RPG