Question How do you define mathematically an experience curve? (Read 423 times)

  • Tobaccotherapy : the cure through smoke
  • Pip
  • Group: Member
  • Joined: Mar 14, 2004
  • Posts: 168
Like, from a mathist point of view, how do you define a function that can generate, like, an experience curve that is not completely linear? I'm thinking something like a * log( 1 + x/b ) + c*x , but exactly how does that experience curve generator work in RPG Maker?


And what parameters would you use?



  • Avatar of Biggles
  • I know your secrets
  • PipPipPipPipPip
  • Group: Premium Member
  • Joined: May 5, 2005
  • Posts: 688
It doesn't matter until you contextualize it in the game. Experience points are pretty meaningless. If you want to make a game feel like a particular RPG then just look up that RPG's stat curves on gamefaqs. For example, here are all the ones for FF6: http://db.gamefaqs.com/console/snes/file/final_fantasy_iii_algorithms.txt

This will not help your game because gary gygax's rules and all the rules that followed don't work properly. They are derived from a game designed to simulate military encounters from a tactical standpoint and contain little additional wisdom. Here is a sample:

Experience points are from the same minds that brought you the random harlot table and are not of mathematical interest. I would suggest finding a way of representing character developments in a way that makes sense in the context of the game. The game that made the most sense of character points was Paper Mario 2 so if you want to steal a numbers system, steal that one. The way it works is that it takes 100 star points or w/e to go up a level. But lesser feats gain Mario less star points as he becomes more powerful. This fits with the tone of the game, and is easy to understand. Final Fantasy games use a bunch of really big numbers in their EXP system because final fantasy games are a lot like really big numbers. They don't mean shit.
  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Oct 30, 2005
  • Posts: 2533
ACTULLY I OPENED UP RM2k after making this post and it's more complicated (A LITTLE) than what i expected so i'll work on what equation it is.. meanwhile,for those who doesn't know parabolas here's a good introduction:
-----------------------------
Nice didn't know those rules. anyway to explain it in a mathist's pov though i'm not a mathist myself, its actually just basic algebra.

If you want the most basic types of non-linear exp curve. Well there are 2 kinds, (not sure how rm2k does it but i think it's described by early or late or something like that.) there is the (1)slow progress which gets exponentialy higher every level, then there is the (2) expcurve which still increases but the rate at which it increases slows down.

fuck i'll draw: (btw these are called parabola)


The orang line is the 'line' exp curve function..

------------

actually its very very very very very basic, the function for the first curve is

f(x) = (x^a) + c

where a is a positive number(greater than 1) and c is the 'offset' or the first value at level 1..
as we increase a.. you see the curve steeps, and so the exp for each individual level x..and lowering a while widen it, making the game relatively faster for you to level up...



then the 2nd type of curve.
the concept is the same actually if you kow math it's basically same function just rotated 90degrees.
so:

f(x) = a-root-of(x) + c

that's it basically. the simplest form of that is f(x) = square root of(x).. where a is 2.. thus square root. and c is 0.
same principle:



but actually:



you make either curves by varying the a in the equation (f(x) = x^a  + c)

there is also the case of:

see that it's a weird curve first like the 2nd curve then becomes the first curve. basically it's a piecewise function. it's 2 function in one, it's invented by abdul salam..


i haven't seen this kind of curve used because it's funky...

---
also i'm not a mathist so i'm not very sure about this and i b et you already know most of this. anyway next i'll post about actual 'game design' and how to have a feel of the difficulty or grinding property of the exp curve by introducing some rpg aspects and other parameters you can control to easily vary stuff and shit.
  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Oct 30, 2005
  • Posts: 2533
nvm wat i wrote. i just opened up rm2k to see that there are 3 parameters i'll get to it after i see what they do
  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Oct 30, 2005
  • Posts: 2533
(rm2k3) The Experience per level is easy it's basically f(x) = (x * b) + a + c.. the primary (a) and tertiar(c) does the same thing. i wonder why they made it like that..
If you want the equation for total experience (aka how much exp points you got(at least) in that particular level), all i can think of is a recursive function which would be basically: f(x) = f(x-1) + (x * b) + a + c.. for x>0..

Also, I found out my little lesson is useful for stat curvres also exp but rm2k exp is technically something else.
  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Oct 30, 2005
  • Posts: 2533
@Biggle: I have to disgree. THere is still math involved there..


I jsut realized that when discussing optimal stuff for a 'balanced' gameplay there are many stuff to consider and i'm too noob to even discuss it. also it would start involving calculus holy crap.
  • Avatar of tuxedo marx
  • Fuckin' A.
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Oct 21, 2005
  • Posts: 4143
that ff6 algorithms file taught me everything about how rpg battles work. also how to flub evade etc.
  • Avatar of Biggles
  • I know your secrets
  • PipPipPipPipPip
  • Group: Premium Member
  • Joined: May 5, 2005
  • Posts: 688
@Biggle: I have to disgree. THere is still math involved there..


I jsut realized that when discussing optimal stuff for a 'balanced' gameplay there are many stuff to consider and i'm too noob to even discuss it. also it would start involving calculus holy crap.

there's mathematics involved in the paper mario system, but the mathematics isn't a giant pile of shit. mathematics is good. bad mathematics is bad. a good designer should make the mathematics of the game seamless with the experience of playing the game. it turns out that the math that is needed to balance a game is quite often pretty minimal. the variable of interest is usually "how many hits of kind y does it take to kill an x." traditional exp systems have usually fucked this up and required players to grind at some point or another or otherwise done the opposite and made them overpowered quite early. zelda games have got it very right frequently because usually the enemies are designed by picking the number of hits it takes to kill them and there are only 3 or 4 levels of attack power. it's clear, at least that less effort is required to make the game feel right in this case.

in the rm2k case your solution for total experience to a level is just sum x = 1 to n:  b*x + d where n is the level of interest and d is a + c.  which is the same as n*d + b*(1 + 2 + 3 + ... + n) which is equal to n*d + (a*n*(n+1))/2 by the summation formula i got from wikipedia. in other words, it's a quadratic with some funny parameters.
  • Avatar of EvilDemonCreature
  • i don't like change
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Jul 5, 2002
  • Posts: 1453
Start by figuring out the balancing equation, but do so without using a single number.

For instance (this is assuming that enemy exp is already plotted as a relatively universal representation of how 'tough' they seem to be):

To get your first level up = How tough enemies are expected to be at the start * how many enemies you expect the player to kill before reaching his first level.
To get your last level up = How tough enemies are expected to be at the end * how many enemies you want the player to kill before you finally decide the player is done leveling up for good (assuming we are starting the count from the moment when the next to last level was already reached)

Plot both of those points on a "graph" and the shape your exp curve should take should be as intuitive as a game of "connect the dots". (If you couldn't already tell, I'm pretty much right with Biggles on this. The math is supposed to be there in order to make things more simple, not more complicated.)
  • Administrator
  • PipPipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Oct 30, 2005
  • Posts: 2533
@Biggles: Ah.. thanks for converting that to an equation. (Yea I didn't mean to say math should go crazy with itself on algorithms. just thought you meant that math totally has no bearing on it)

@EDC: It's hard to quantify 'the end' monsters exp points from the start especially if you're planning a sizeable rpg since many design decisions may come up while actually doing the game and settling for a exp graph from the start may fuck up whatever things you have alredy made when you decide to alter the exp curve sometime later.
But the method will still work although in a 'scene to scene' basis. say, plotting the exp needed for monsters in a certain place then 'connect the dot' with exps needed for second place/dungeon/quest..\