Exponential EXP Curve | FIXED TIME -> MAX LEVEL

I have yet another experience equation question, with a slight twist.

Problem Situation

Player gain experience from Level 1 - 80.

Time to level from Level 1 to 80 grows exponentially.

There is a constant of total hours X (540 hours in this case) to reach level 80.

What equation results in this?

From this, I should be able to balance an approximate Time To Kill Monster + downtime, varying from easy to hard monsters and experience they can give, resulting in same time to Max Level.

Or I could create quests that takes an approximate Time To Completion but rewards the same ratio of experience.

In my opinion this should be the optimum solution to create content that grant the same ratio of experience to time to level.

Thank you.

The general form of an exponential curve like this one is:

H = a * r^n + k


where:

H = total hours to reach level n
r = the ratio by which the time increases from one level to the next
a = scales the curve to make sure it hits the desired max
k = shifts the curve to make sure H(1) = 0


Now we just need to plug in numbers to hit the desired start & end points:

a*r^80 + k = 540 (max)
a*r^1 + k = 0    (min)


Subtracting:

a*(r^80 - r) = 540
a = 540/(r^80 - r)


And from the min expression:

k = -a*r^1


So now you can choose a value of r that you like (something very slightly more than 1 - exponentials build up astonishingly fast over 80 levels!) - I found something in the neighbourhood of 1.05 looked pretty decent. Then you can calculate a from r and k from a & r.

In case you're interested, the time to reach level n from the previous level n-1 is:

a * r^(n - 1) * (r - 1)


which we can verify grows by a factor of r each time we gain a level.

• Can you elaborate on the "Subtracting" section? I feel like that came out of nowhere. – Daniel Kaplan Jan 29 '19 at 6:33
• @DanielKaplan This is one of the standard techniques for solving a system of equations — often called "elimination." You massage two equations so they have certain identical terms, then subtract one equation from the other to eliminate those terms and isolate what's left. Lots more info is available online if you'd like. – DMGregory Jan 29 '19 at 10:29

EDIT: After a misinterpretation.

After some brief algebra work, the equation you are looking for is Y = 1.0818197904022^x. With x being the level, and y being the required amount of hour. Note that this equation needs to start at 2. Reason, even if the player starts at zero, you are compounding the level exponentially onto the base hours. If you get a zero, the output is one. If you get one. The output is the base.

Remember that an exponential works by compounding it's base by it's self exponentially. Unless the graph is shifted (some additional logic will be needed to set things correctly), you'll have to logically compensate for this factor.

• No just no. Sorry but never answered my question, completely off tangent. There is no need to implement diminishing returns, that can be programmed. Plus the problem of increasing too much is alleviated because my equation has a constant cap of 540 hours from 1 to 80. Oh and and calculation for my equation is based on time, not exp. Your entire answer signify you didn't even read the post. I would down vote you if I could. – Nick Oct 21 '15 at 7:02
• Misread then. Here I went ahead and edited the answer. Side note, when I saw the word experience, I felt it safe to draw the conclusion that time meant the grind a player will go through. Then hours being confusing. – moonshineTheleocat Oct 21 '15 at 8:56
• Thanks for the edit, but 540 refers to total time from 1 to 80 not 79 to 80 – Nick Oct 21 '15 at 9:02
• Sorry, a tad bit tired. It's 4am right now on a college night. I wish I could graph it for you. If I find a way, I'll edit this answer later. The graph will be fine if traversed normally as steps. The graph represents the hour to the level. To get the required hours to jump to a new level. you take the delta between the two levels. F(80)-F(79) = 40.811 hours required to level up. The graph taken as a whole is the total time from level 1 to 80 – moonshineTheleocat Oct 21 '15 at 9:09
• Just remember that the function must start at 2 to work correctly. Which is only about 1.2hrs required. So... if the player has 1.2 hrs. he is now level 2. If the player has 112hrs in total, he's level 60. f(60) = 112hrs – moonshineTheleocat Oct 21 '15 at 9:11