I didn’t know it was just a matter of balancing equations. This is actually just what I was looking for, thank you for that.
A tiny thing I noticed, you need to add 1 to experience, else it will be behind one. For example in my formula for level, for level 2, you need to get 35 XP.
It’s mostly because “:” is used for classes are created and “.” just for re-usable blocks of code. Also calling a common function (used many times) with “:” is actually less efficient because you need shift.
I wonder if that’s accurate though. Because wouldn’t that XPForLevel method be returning the XP required simply to gain the next level? Not the total XP require for the current level?
making the equation actually:
level = 2*(xpReqForLevel/100)^(2/3) + 1
he would be then passing in totalXP, giving an inaccurate calculation.
I might be misunderstanding your question (probably because of my awful naming conventions) but it does work, behaviour is identical to how it was while I was using a loop. I think the problem you brought up is solved by adding 1 to experience then flooring it
Well you did say that you weren’t zeroing the XP for each level, so perhaps that is why it is working. Of course that is also probably why your players are leveling up so quickly. But if it works for your project then good deal.