# Can you suggest an equation for scoring system?

Page 1 of 1

## 1 Replies - 185 Views - Last Post: 23 January 2014 - 09:02 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=338741&amp;s=0440551d6fb4f605f3cc4522ae0c759e&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 James1992

Reputation: 3
• Posts: 130
• Joined: 30-October 12

# Can you suggest an equation for scoring system?

Posted 22 January 2014 - 05:42 PM

Right let's say you've just finished playing a game and there are 2 variables, time and stress.

The lower the stress, the higher the score.
The lower the time, the higher the score.

For example,a player who finishes the game with 100 minutes left and a stress level of 50% should receive a higher score than a player who finishes the game with a 200 minutes left and a stress level of 50%.

What's the best way to write a formula to give a player a score?

I originally thought of doing

```If (time>900) {
time = time * [b]0.1[/b]
total score = (time/stress) * 100
}

elseif (time>800 && time<900) {
time = time * [b]0.2[/b]
total score = (time/stress) * 100
}

```

And then do multiple if statements to change the decimal (in bold) however this method doesn't work

This post has been edited by James1992: 22 January 2014 - 05:48 PM

Is This A Good Question/Topic? 0

## Replies To: Can you suggest an equation for scoring system?

### #2 Xaos

Reputation: 9
• Posts: 93
• Joined: 20-November 13

## Re: Can you suggest an equation for scoring system?

Posted 23 January 2014 - 09:02 AM

Is there a max score/max stress? Do like, amount lost. Say the max time is 1000, and max stress is 100%(or if stress starts at 0, start at 0). So you would take how much the player has, then subtract the max by that amount. So, the user has 100 minutes left at 50% stress. Do 1000-100 and 100-50, for minutes and stress, respectively. Then multiply that by whatever weight you want, or just leave it like that. If you wanted them to be equal weight, you could multiply stress by ten. Make sense?