Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hey there... I am a beginner Perl programmer, but have been told that i have make a rankings list for an online game.
So heres the problem. Theres ~40,000 players in this game and they are currently sorted by team, not by score, on a different cgi page for each team. This page of each is of the form http://blahblah.com/scores.cgi&teampage=X where x is the number of the team (integer).
Then on each of these pages is a list of the team members in no particular order. Each listing consists of their nickname, then 3 different statistics about the player in the form:
http://blahblah.com/scores.cgi&teampage=1
Name A B C
John 1000 175320 950
Mary 2300 425321 1550
Bob 1324 211123 850
http://blahblah.com/scores.cgi&teampage=2
Name A B C
Steve 1855 310123 1100
Dave 3271 460456 1300
Joan 1999 375789 1000
(Those were numbers I made up, but thats just how it is)
Now, I have already worked out that i want to have the last team page as a constant then run an loop to increment the team page num until it = the last one. This way it can be modified if theres a different number of teams next round. Then get the contents of each page and store it somewhere. Then what needs to be done is the stuff sorted into order and stored somewhere long term (like a database). I originally thought of just a hash table but then realised that it would be VERY slow. Anyway, once sorted, the results need to be printed to a webpage (easy). Also, users have to be able to search for anyone in the game by name, stat A, stat B or stat C. For example of someone wanted to search all players that have statistic A between 1000 and 1200. It would only display these ppl. Any ideas?
http://blahblah.com/scores.cgi&teampage=1
Name A B C
John 1000 175320 950
Mary 2300 425321 1550
Bob 1324 211123 850
http://blahblah.com/scores.cgi&teampage=2
Name A B C
Steve 1855 310123 1100
Dave 3271 460456 1300
Joan 1999 375789 1000
(Those were numbers I made up, but thats just how it is)
Now, I have already worked out that i want to have the last team page as a constant then run an loop to increment the team page num until it = the last one. This way it can be modified if theres a different number of teams next round. Then get the contents of each page and store it somewhere. Then what needs to be done is the stuff sorted into order and stored somewhere long term (like a database). I originally thought of just a hash table but then realised that it would be VERY slow. Anyway, once sorted, the results need to be printed to a webpage (easy). Also, users have to be able to search for anyone in the game by name, stat A, stat B or stat C. For example of someone wanted to search all players that have statistic A between 1000 and 1200. It would only display these ppl. Any ideas?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A new challenge: game rankings
by repson (Chaplain) on Dec 07, 2000 at 12:31 UTC | |
(bbq) Re: A new challenge: game rankings
by BBQ (Deacon) on Dec 07, 2000 at 11:37 UTC | |
Re: A new challenge: game rankings
by gharris (Beadle) on Dec 07, 2000 at 21:22 UTC | |
by Grizzly (Initiate) on Dec 07, 2000 at 22:13 UTC |
Back to
Seekers of Perl Wisdom