Page 1 of 1
Level System
Posted: Wed Oct 05, 2011 6:16 am
by Kazz
I have not been on here in a while and i have here a system of when the player is supposed to level up. I have the level times 800 times the level. When the levels are low its perfect but when the player hits a high level, lets say 100, i want the levels to be spread further apart, the exp needed to go from level 99 to 100 is 159,200. So basically what i am saying is i need help with better number.
Current formula: $exp_needed = $level * 800* $level
Any help or suggestions would be greatly appreciated. By the way its been 1 year since i have been coding and working on my game at the end of October, i know how to code pretty well but the math, i am not the greatest.
Re: Level System
Posted: Wed Oct 05, 2011 8:01 am
by Chris
Here's a script i made before. Produces pretty good results.
Code: Select all
$exp_needed = floor( ($level/2) * pow( floor(($level*8)) , 4));
produces this:
Code: Select all
1 : 2048
2 : 65536
3 : 497664
4 : 2097152
5 : 6400000
6 : 15925248
7 : 34420736
8 : 67108864
9 : 120932352
10 : 204800000
11 : 329832448
12 : 509607936
13 : 760408064
14 : 1101463552
15 : 1555200000
16 : 2147483648
17 : 2907867136
18 : 3869835264
19 : 5071050752
20 : 6553600000
21 : 8364238848
22 : 10554638336
23 : 13181630464
24 : 16307453952
25 : 20000000000
26 : 24333058048
27 : 29386561536
28 : 35246833664
29 : 42006833152
30 : 49766400000
31 : 58632501248
32 : 68719476736
33 : 80149284864
34 : 93051748352
35 : 107564800000
36 : 123834728448
37 : 142016423936
38 : 162273624064
39 : 184779159552
40 : 209715200000
41 : 237273499648
42 : 267655643136
43 : 301073291264
44 : 337748426752
45 : 377913600000
46 : 421812174848
47 : 469698574336
48 : 521838526464
49 : 578509309952
50 : 640000000000
51 : 706611714048
52 : 778657857536
53 : 856464369664
54 : 940369969152
55 : 1030726400000
56 : 1127898677248
57 : 1232265332736
58 : 1344218660864
59 : 1464164964352
60 : 1592524800000
61 : 1729733224448
62 : 1876240039936
63 : 2032510040064
64 : 2199023255552
65 : 2376275200000
66 : 2564777115648
67 : 2765056219136
68 : 2977655947264
69 : 3203136202752
70 : 3442073600000
71 : 3695061710848
72 : 3962711310336
73 : 4245650622464
74 : 4544525565952
75 : 4860000000000
76 : 5192755970048
77 : 5543493953536
78 : 5912933105664
79 : 6301811505152
80 : 6710886400000
81 : 7140934453248
82 : 7592751988736
83 : 8067155236864
84 : 8564980580352
85 : 9087084800000
86 : 9634345320448
87 : 10207660455936
88 : 10807949656064
89 : 11436153751552
90 : 12093235200000
91 : 12780178331648
92 : 13497989595136
93 : 14247697803264
94 : 15030354378752
95 : 15847033600000
96 : 16698832846848
97 : 17586872846336
98 : 18512297918464
99 : 19476276221952
Re: Level System
Posted: Wed Oct 05, 2011 9:55 pm
by Kazz
Thank you so much. That helps.
Re: Level System
Posted: Wed Oct 05, 2011 11:21 pm
by Kazz
In the
Code: Select all
$exp_needed = floor( ($level/2) * pow( floor(($level*8)) , 4));
What does the , 4 do?
Re: Level System
Posted: Thu Oct 06, 2011 12:52 am
by Ark
It's in the power of 4, like x^4
pow(4, 2) = 16

Re: Level System
Posted: Thu Oct 06, 2011 1:28 am
by Kazz
That makes sense.