Rules of the Game:
In this post I just want to look at how the scoring works, and we’ll see that you can use elementary mathematics to figure out near optimal strategies to take in order to achieve high scores. Playing RUA is extremely simple. Just use the “Z” and “X” keys. The “Z” key allows you to jump, and the “X” key allows you to dash. If you crash, then your run is over — you get a total of 3 runs/lives (aka wishes). Your final score is the sum of the scores of your three runs. Regarding jumping, you can initially do two jumps (one in midair) and can gain an extra jump if you dash while in the air. The longer you hold “Z”, the bigger the jump is.
Basically, the points work as follows:
- over time, you automatically accumulate points
- collect fairies for points
- dash through stars for points
In order to do some sort of analysis, we need to know how many points we get over time, how many points stars are worth, and how many points fairies provide. Rather than ask the developers of the game, let’s do some science, bitches!
Over Time Points:
After recording a 2 minute trial run I was able to keep track of how many points I received per second of game play. I paused at certain times to record how many points I received in total, and kept track of the points from fairies and stars as well. I did 10 test points during the 2 minute run, summarized below:
|Real time elapsed (in seconds)||Total Score at time t||Score from fairies/stars||Score accumulated over time (Col2-Col3)||Number of points/second|
Notice that as time passes, the number of points we get per second is increasing at a linear rate. This is because the game gets faster and faster as we get more points. What we want to compute is the number of points we would have after “t” seconds that come from time alone. Using the 10 data points labelled as (time, score accumulated over time) i.e. columns 1 and 4, then by using wolfram alpha we can get a least squares fit. Note that the quadratic least squares fit solution is:
This is formula is actually rather accurate and fits the trials I ran. After 30 seconds, we would have accumulated 3685.4 points due to time.
Fairy points work rather simply. For the first fairy you get 10 points. If you collect two fairies in a row, the second fairy gives 20 points. If you collect 3 fairies in a row, the third fairy gives 30 points. If you collect 4 fairies in a row, the fourth fairy gives you 40 points…. If you collect 12 fairies in a row, the 12th fairy gives you 120 points. If you happen to miss a fairy at any point, the counting starts over at 10 points.
As you can see, if you want to maximize your score by collecting fairies, it is crucial you collect every single one (and not miss any). If you collected 30 in row then the 31st fairy will be worth 310 points – but if you miss the 31st fairy then the next fairy starts over and is worth 10 points.
Let us assume you collected F fairies in a row and calculate the total number of points you have received after collecting those F fairies:
= 5 F * (F+1)
This follows from the summation formula SUM(from i=1 to n) i = n * (n+1) / 2.
Now in order to get an accurate estimate on how many points we can expect from fairies, we need to know how many fairies appear in the game within the first “t” seconds. Running some simulations gives the following:
- after 2 seconds the 1st fairy appears
- after 6 seconds, the 2nd fairy appears
- after 7 seconds, the 3rd fairy appears
I kept track of when fairies appear for the first two minutes of a trial run. Putting the data into Matlab and finding the best fit gives the following:
Now, if we were to collect every single fairy, then after “t” seconds we should expect to have lots of points coming from the fairies. In particular, subbing in F=[0.0015 t^2 + 0.3914 t - 1.0274], the number of points that we would gain after t seconds from collecting all the fairies is:
0.00001125 t^4 + 0.005871 t^3 + 0.758059 t^2 – 2.06424 t + 0.140754
For example, after t=30seconds, we would have 788.096 points from collecting fairies (IF we collected ALL of them in a row). Comparing this with my simulation, after 30 seconds I would have collected 12 fairies, which gives a total of 10*13*12/2 = 780 points! The above formula is actually quite accurate.
Star points work the same as fairy points. For the first star you get 100 points. If you
collect two stars in a row, the second star gives 200 points. If you
collect 3 stars in a row, the third star gives 300 points. If you
collect 4 stars in a row, the fourth star gives you 400 points…. If
you collect 12 stars in a row, the 12th star gives you 1200 points. If
you happen to miss a star at any point, the counting starts over at 100
Let us assume you collected S stars in a row and calculate the total
number of points you have received after collecting those S stars:
= 50 S * (S+1)
This follows from the summation formula used above.
One thing to note is that stars appear at a different rate than fairies. Thus, we need to figure out how many stars would appear after t seconds. Running some simulations gives the following:
- after 12 seconds the 1st star appears
- after 15 seconds, the 2nd star appears
- after 21 seconds, the 3rd star appears
I kept track of when stars appear for the first two minutes of a trial
run. Putting the data into Matlab and finding the best fit gives the
After “t” seconds, we see [0.0012 t^2 + 0.3299 t - 4.0277] stars.
Now, if we were to collect every single star, then after “t” seconds we
should expect to have TONS of points coming from the stars. In
particular, subbing in S=[0.0012 t^2 + 0.3299 t - 4.0277], the number of points that we would gain after t seconds from collecting all the stars is:
0.000072 t^4 + 0.039588 t^3 + 5.01838 t^2 – 116.379 t + 609.7333
example, after t=30 seconds, we would have 2762.1 points from
collecting stars (IF we collected ALL of them in a row). Comparing
this with my simulation, after 30 seconds I would have collected 12 stars, which gives a total of 100*8*7/2 = 2800 points, which is very close to my best fit equation above.
Scoring Lots of Points:
Let us combine what we know. Let’s assume we are a good enough player to last at least 30 seconds.
The table below gives us an idea of how many points we should expect from time elapse, collecting fairies, and collecting stars.
|time elapsed (t)||time points at time t||fairy points at time t (from collecting all fairies):||star points at time t (from collecting all stars):||Total points:|
By lasting for 180 seconds, you can earn about 70k points from time
alone, but by collecting every star you earn a whopping 450k points!! If
you were to focus on collecting fairies, you would earn 70k points for
collecting all of them in a row.
This means that if you lasted 180 seconds and collected every fairy and every star, you would end up with 588,485 points!!
- Collect every fairy and every star possible. Avoid crashing.
to avoid crashing and last as long as possible. Focus on gaining points
over time and ignore the fairies and stars (but dash through stars to
- Collect every star that shows up. Ignore the fairies and avoid crashing.
- Collect every fairy that shows up. Dash through stars to avoid crashing but focus mainly on getting every fairy.
#1: Obviously the optimal strategy is #1, that is, to collect every single fairy, dash through every single star, and last as long as possible. But accomplishing this is quite the feat as it is very easy to miss fairies and stars. Also, focusing on fairies and stars can cause you to crash.
#2: Most people only last 1-2 minutes when trying to last as long as possible. Using this strategy is bad as if you were to (theoretically) avoid every fairy/star your score would be in column 2 of the table above.
#3 Collecting stars is an excellent strategy. As you can see, collecting every single star in a 2 minute run gives you 142k points. This is a massive score and would be considered one of the best scores for a single run in the entire world. The only problem is that the game is designed so that you can’t tell if the star will be on the top platform or the bottom platform before it’s too late, thus, it’s quite easy to miss some which resets the bonus counter. By collecting S stars in a row (see above) you gain a massive:
So collecting 10 stars in a row gives 5500 points, collecting 20 in a row gives 21,000 points, 30 in a row gives 46,500 points, 40 in a row gives 82,000 points, 50 in a row gives 127,500 points.
#4: Focusing on fairies is a bad strategy. According to simulations, there is about 1.28 times more fairies than stars, but the amount of points you receive for collecting fairies is actually worse than the points you get from time alone. Collecting 50 fairies in a row gives 12,750 points – considerably lower than stars.
Note that in a typical game, you can expect to last from 1-2 minutes, see about 40-50 stars and about 60-70 fairies. Thus, the focus should be on collecting stars.
Conclusion (to get high scores):
- Collect stars.
- Ignore fairies.
- Avoid crashing.
- For maximum points you MUST collect as many stars as possible in a row. Missing a single star resets the bonus counter.