I'm coding the game asteroids. I want to make a levels manager who can create a infinity number of level increasing in difficulty.
My levels have as parameters :
- The number of asteroids on the board;
- The average radius of the asteroids on the board;
- The minimum radius an asteroid has to have to exists.
However, I can't use a linear function to calculate the parameters in function on the level because each parameter has their restrictions.
- The number of asteroids on the board increase from $2$ to a maximum of $20$.
- The average radius of the asteroids increase from $30$ to a maximum of $50$.
- The minimum radius of the asteroids decrease from $15$ to a minimum of $5$.
How can I use the properties of the logarithmic function to be able to generate a minimum of $100$ level?
Thanks for your help.
Let $N$ represent the maximum level number
The quantities for level $x$ could be ...
Number of Asteroids $$N(x) = 2 + 18 \frac{\log x}{\log N} $$ Average Radius $$A(x) = 30 + 20 \frac{\log x}{\log N} $$
Minimum Radius $$M(x) = 15 -10\frac{\log x}{\log N} $$