# Growth Rate Table
If there is one task that you will ABSOLUTELY spend your day thinking about, it is growth rate.
Growth Rate: How quickly a certain value grows in your system. A common example would be the function that controls how much XP the player needs every level.
Whether you need to figure out the amount of XP required to level up, or how much money the player should get for completing a quest, or the number of enemies to spawn in an encounter, it will most likely involve some increase in a number over time.
This is such a common task, that I have a short little cheat sheet that I use to bootstrap my systems. It is very simple, and it look like this:
There are four components of this bootstrapping system:
- Four types of basic Expressions
- All built on the same four Terms
- All in a table that allows for easy comparison
- With some simple helper output and cleaning up.
# Common Terms
There are four terms that are shared between all four expressions. Three of them are input by the user (C, Base, and Index), the other is not. The fourth term, N, is a derived value.
- C, the Constant that is added to the expression.
- Base, most often this acts as the Coefficient of the expression. I call it the Base as it is usually the number you want to "start" with, and then things go up from there.
- Index, this is usually the exponent of the function.
- N, this is the "level" or the "rank" of the growth formula.
# The Expressions
I support four basic expressions, which in my experience covers basically every use case I ever have when it comes to growth formulas.
Linear = C + Base * Index * N Polynomial = C + Base * N ^ Index Exponential = C + Index * Base ^ N Explosive = C + Base ^ (Index * N)
# A Live Example
Let's see this in a live example. Try playing around with the different values, and study the difference between the four types of expressions. They each grow at a different rate, and they each accomplish very different types of problems that you might need to solve.