GameSalad

Maths Formula Needed - Ranking System

DigiChainDigiChain Posts: 1,151Member, 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!

Comments

  • Two.ETwo.E Posts: 375Member, PRO

    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

  • SocksSocks London, UK.Posts: 12,754Member
    edited June 19

    This should do it:

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

  • DigiChainDigiChain Posts: 1,151Member, 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!

  • DigiChainDigiChain Posts: 1,151Member, PRO

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

  • DigiChainDigiChain Posts: 1,151Member, PRO

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

  • SocksSocks London, UK.Posts: 12,754Member
    edited June 20

    @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 ?

Sign In or Register to comment.