I'm a very simple minded person and don't understand how algebraic functions translate into programming, but I'm trying to create a simple lvling system.
In previous threads I read equasions like "level = etc etc...", but instead what's happening is you're selecting the starting lvl of the character you create in an rpg database manager. What's needed then are startingExp and toNextLvl.
So what I've figured out so far (to do this in the simplest form) is:
int startingExp = 0; for (int x = 0; x < selectedLvl; x++) { startingExp += 100 * x; } Then:
int toNextLvl = startingExp + (selectedLvl * 100); It's just a start, but I'm wondering if this is a valid way of going about it? I didn't want to use Math.Log as it takes and outputs doubles, and when people are posting their equasions I'm very confused as how I would translate y = (x ^ 2) into starting exp and starting toNextLvl exp...