I am a programmer, not a mathematician and I'm trying to solve a problem for scoring in my game. Please excuse my weak maths and lack of mathematical syntax, and sorry if this question has been asked before.
Let's say we have a game level which consists of 4 stages. As the players moves from stage to stage, the required score for each stage increases. Let's say the overall score for the level is 1000 and I want the last stage to require 4 times more score.
Let these be the variables:
- $y$ is level total required score.
- $n_1, n_2, n_3, n_4$ are 4 stages in level.
- $x$ is the score requirement multiplier for the last stage ($d$).
So to represent as an equation:
$n_1 + n_2 + n_3 + n_4 = y$ where $n_4 = x \times n_1$
therefore based on the values in my example the equation would be:
$n_1 + n_2 + n_3 + 4n_1 = 1000$
How do I solve for $n_1$ , $n_2$ and $n_3$ such that there is a progression in the score requirement from stage to stage?
For some reason this formula works, substituting for the variables:
$n_1 + \frac {4n_1}{3} + \frac {4n_1}{2} + 4n_1 = 1000$
I able to solve for $n_1$ and I get $n_1 = 120$.
This answer checks out:
$120 + \frac {4 \times 120}{3} + \frac {4 \times 120}{2} + (4 \times 120) = 1000$
$120 + 160 + 240 + 480 = 1000$
But I don't understand how that works. Where do the denominators for the fractions $\frac 43$ and $\frac 42$ come from?
Anyone that could shed some light on how to solve this, your time would be appreciated :)