• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Stuck with this damn math again.

Status
Not open for further replies.
Level 19
Joined
Oct 12, 2007
Messages
1,821
Hey there.

Currently I'm making an experience system. I calculated the exp needed from level 1 to 10, but now I want to make it from 1 to 40, but I forgot the formula I used.
Could someone help me with finding out which formula I used here? I think I'm in the middle of something like a blackout hehe.

JASS:
X         Y          Y'     
1.        125          0
2.        375        250
3.        875        500
4.       1625        750
5.       2625       1000
6.       3875       1250
7.       5375       1500
8.       7125       1750
9.       9125       2000
10.     11375       2250

X = the hero's level. If X = 1, then it means the hero needs 125 experience to get from level 1 to 2.
Y = the amount of experience needed.

Y' = 250 * (X-1) = 250X - 250

Hmm so far I didn't get much further.
 

peq

peq

Level 6
Joined
May 13, 2007
Messages
171
You write y as a sum of y' and then use gauss`s formula to calculate the sum

y(x) = 125 + sum from 1 to x (y'(x))
= 125 + sum from 1 to x (i*250)
= 125 + 250* sum from 1 to x (i)
= 125 + 250 * x*(x-1)/2
= 125*x*x - 125*x + 125

or just integrate y'
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
You write y as a sum of y' and then use gauss`s formula to calculate the sum

y(x) = 125 + sum from 1 to x (y'(x))
= 125 + sum from 1 to x (i*250)
= 125 + 250* sum from 1 to x (i)
= 125 + 250 * x*(x-1)/2
= 125*x*x - 125*x + 125

or just integrate y'

Ah thanks man!
 
Status
Not open for further replies.
Top