#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Maths Formula Needed - Ranking System

Posts: 1,209Member, PRO

Hopefully a maths whiz may be able to help me with this one.

I want the player to receive a ranking in my game based on how many points they have scored.
So, to keep it simple to explain:
The player can score between 0 - 100 points.
The player can be ranked from 10 - 1 (10 if they’ve scored 0 points, to 1 if they’ve score the full 100 points).

This would be simple if the ranking was to grow in a linear fashion - but I want it so the ranks grow quickly initially (less points needed to go up ranks) but then slower as the rank gets higher (more points needed as rank is higher). I guess think of it as a parabolic curve on a graph.

I hope I've explained this well enough - I can upload a graph to illustrate better if needed.

Thanks to anyone who may be able to help!

• Posts: 431Member, BASIC

Could you use a table?

Just make the table 100 cells, and you can manually enter in what score is equal to which rank.
Then just use the tablecellvalue function.

I wouldn't know any formula though.

Best,
Two.E

• London, UK.Posts: 12,821Member
edited June 2017

This should do it:

floor(sin(score`*`.9)`*`10)

• Posts: 1,209Member, PRO

In the example case a table would work fine - but in the game I'll have a much bigger ranking system, maybe ranking from 10,000 to 1.

I'm sure a maths formula will do the job but it's not my strong point.
Maybe @Socks will know the solution!

• Posts: 1,209Member, PRO

Thanks @Socks, only just spotted your post - i'll give it a try!

• Posts: 1,209Member, PRO

@Socks - your solution doesn't seem to be working for me, the resulting value goes back and forth between positive and negative numbers.

• London, UK.Posts: 12,821Member
edited June 2017

@DigiChain said:
@Socks - your solution doesn't seem to be working for me, the resulting value goes back and forth between positive and negative numbers.

Can you show me a screenshot of how you have it set up, otherwise it's hard to guess what might be the issue ?