onthespot Posted July 26, 2009 Share Posted July 26, 2009 Hello. Ok i understand that this is a very advanced script to be writing. However, I am looking to create a feature that will allow users to enter match results against one another and this will change their points. So if a lower ranked player beats a higher ranked player, they will get more points then if a higher ranked player beats the lower ranked player. The points will be deducted from one player and added to the other. I have no idea where to start here, but if anyone could give me some insight into what is required to create such a feature i would be very very grateful. Thankyou Link to comment https://forums.phpfreaks.com/topic/167545-ranking-points/ Share on other sites More sharing options...
vineld Posted July 26, 2009 Share Posted July 26, 2009 I guess you already have some code ready? Go from there, I don't quite understand the details of what you wish to accomplish. You will need to find a formula to calculate the points and then update the corresponding tables. Link to comment https://forums.phpfreaks.com/topic/167545-ranking-points/#findComment-883483 Share on other sites More sharing options...
onthespot Posted July 26, 2009 Author Share Posted July 26, 2009 I have everything ready, the users can submit games against one another, its all working, except for the points being changed when they play one another. So I need to create a formula to calculate it? Link to comment https://forums.phpfreaks.com/topic/167545-ranking-points/#findComment-883484 Share on other sites More sharing options...
blueman378 Posted July 27, 2009 Share Posted July 27, 2009 Yes, though if it is a case of any users can sign up you might want to factor games played in to avoid second accounters im not sure what level the points are but im going to make a few assumptions a game is worth 50 points with no level bias if two players in a ranking range of a difference of 500 play and the higher ranked player wins then no bonus points are awarded ( to avoid newbie preying) the most bonus points a user can gain is 100 so lets try some pseudo code shall we? assign 6200 to total players assign ranking 1500 to playerA assign ranking 1300 to playerB assign winner to playerB ranking diff equals difference = loser ranking( playerA 1500 ) minus winner ranking ( playerB 1300 ) = 200 * TRUE: calculate bonus points * FALSE: no bonus points if ranking diff GREATER THAN 0 AND ranking diff LESS THAN OR EQUAL to 500 total players INT DIVISION winner ranking = 4 * Higher ranked players should get less bonus points so give the player 4% of the difference points = 8 points points = 50 + 8 else points = 50 so the winning player gets 58 points total now lets retry this PlayerA being ranked 600 playerB being ranked 100 so loser ranking( playerA 600 ) minus winner ranking ( playerB 100 ) = 500 so 62% so now we give them 62% of 500 so thats 310 points so now playerB gets 360 points this allows the new players to rise faster while stopping the "Big Guys" preying onthe little guys. Just an idea. Link to comment https://forums.phpfreaks.com/topic/167545-ranking-points/#findComment-883587 Share on other sites More sharing options...
onthespot Posted July 28, 2009 Author Share Posted July 28, 2009 That is an awesome idea, although I have now looked into the ELO rating system aswell. Both seem very good ways of doing this. Link to comment https://forums.phpfreaks.com/topic/167545-ranking-points/#findComment-884891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.