# How do I create a formula for points, based on time?

0 favourites
• 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
• Here is a math function I really want to have a nice formula for :)

I tried in excel, but didn't find one that got a nice curve.

I have a game where you have 2minutes to play. if you are fast it will give you a time bonus. max bonus is 1000. lowest is zero.

If you have more than 80seconds left, you will get the full bonus. if you have less than 30sec you get zero. between those values, the "time bonus" will be based on your remaining time.

The time is stored in a global variable, starting at 120.

See my illustration :D

Any one that can help out with a formula to calc this, just approximate?

• This looks similar to a 'smoothstep'

Live example / formula:

For your case you can do (1-(formula))*1000 to get your range and adjust a and b to match your limits.

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Wow, yes! Exactly!

I managed to set it up in excel. Worked Perfectly!

Now I must see how I can write this in C3...

• 3 posts