I am trying to create a scoring scale for a game. I want the scale to be non-linear to reflect the realness of the game. The score is determined by time, the less time you take, the greater score you get.

  • If you take more than $5$ minutes to complete the challenge, your score is $0.$

  • If you take $0$ seconds to complete the challenge, your score is $40.$

My current equation is linear: $$y = {\rm MAX\ SCORE} - \frac{{\rm MAX\ SCORE}}{{\rm TIME\ TO\ MIN\ SCORE}}\times {\rm time}$$

However, I want the score to accelerate more quickly towards $40$ the closer you get to 0. What equation can I use to do this?

  • $\begingroup$ This is not a graph-theory ;-) $\endgroup$
    – dtldarek
    Mar 31, 2012 at 20:03
  • $\begingroup$ I changed the tags. Wasn't sure what the best one would be. $\endgroup$ Mar 31, 2012 at 20:08
  • $\begingroup$ Draw a graph of the scoring scale in your mind. The axes should be $x = {\rm time}$ and $y = {\rm score}.$ Look for a function that approximates the shape of the graph. $\endgroup$
    – user2468
    Mar 31, 2012 at 20:15
  • $\begingroup$ I made an edit to enhance readability. Please make sure that I did not change the semantics of your question. $\endgroup$
    – user2468
    Mar 31, 2012 at 20:19

2 Answers 2


You can solve this:$$f(x) = {a \over {1+x}} + b$$ $$s.t: f(0) = \text{MAX_SCORE and } f(\text{TIME_TO_MIN_SCORE}) = 0$$

which results to (for your case with times in minutes you can also solve it for seconds, ...):

$$f(x) = {{48 \over (x+1)} -8}$$

Update: $$f(0) = 40, f(5) = 0 \Rightarrow$$ $$a+b=40, a + 6\cdot b = 0 \Rightarrow$$ $$a=48, b = -8$$

I assumed your time is distributed in minutes, you can have your other assumptions, e.g for seconds it will be like:$$f(0)=40, f(300) = 0, ...$$

  • $\begingroup$ P.S: $x$ is time, and $f$ is desired function. $\endgroup$
    – Saeed
    Mar 31, 2012 at 20:20
  • $\begingroup$ How did you decide on 48? $\endgroup$
    – Malfist
    Mar 31, 2012 at 20:24
  • $\begingroup$ @Malfist, see my update. $\endgroup$
    – Saeed
    Mar 31, 2012 at 20:32
  • $\begingroup$ So to do f(300) = 0, it would be a = 602/15, b = -2/15? $\endgroup$
    – Malfist
    Mar 31, 2012 at 20:46
  • $\begingroup$ I think so, If you didn't make a mistake, it's right.(its basic math but may be causes to mistakes), Also I think you should do some sort of rounding in your algorithm. $\endgroup$
    – Saeed
    Mar 31, 2012 at 21:16

An easy approach is to do $score =maxscore (\frac {maxtime-t}{max time})^n$ where you choose $n$ as high as you like to make the score fall quickly at the start. Alternately, $score=0.1maxscore(\frac {maxtime}{0.1maxtime+t})$, again adusting the 0.1 to your liking.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .