View Full Version : "Find You" in Hall of Fame
yawgodemt
12-14-2003, 05:29 PM
With the new rankings in the Hall of Fame, would it be possible to have a "Find Yourself" link?
This would open the page that you are ranked on, so you don't have to trudge through pages of scores to find yourself.
Sneakabout
12-14-2003, 05:40 PM
::doesn't have to look far to find himself ;>
Moonchilde
12-14-2003, 07:05 PM
With the new rankings in the Hall of Fame, would it be possible to have a "Find Yourself" link?
This would open the page that you are ranked on, so you don't have to trudge through pages of scores to find yourself.
It might be possible, but what if you aren't on the relevant list? for instance farmcritters on the dragonkill lists?
Also, finding which page you were on would require loading the entire set into memory and then iterating through it (at least to show you in context/discover which page you were on). This is expensive and not something I wish to do. The pages are done with the LIMIT search keyword in SQL so it only returns those results which are relevant for that page.
feahyarmen
12-14-2003, 08:45 PM
(Moonchild, search between 500 or 5k isn't a big difference for SQL)
... but ... any browser as the cabapibilty to respond when your press CTRL+F, so I think that the option isn't too much needed.
Also, if you use IE you can download Google's toolbar which has an oustanding system to search and highlits keywords within a page.
demonbox
12-14-2003, 11:22 PM
Too bad it looks like Admisn won't be on the list, like seeing even the best of my compition.
LadyPhoenix
12-14-2003, 11:48 PM
A lot of us don't like IE. <_<
Moonchilde
12-15-2003, 02:12 AM
Too bad it looks like Admisn won't be on the list, like seeing even the best of my compition.
I removed admins from the list because a large number of them, myself included often augment their stats or levels as they are messing around with something. It's not fair showing that they are the 'most powerful warrior' in the land when they are only that way because they can edit stats.
Since there is no way to know if an admin has edited themselves or not, I chose to remove them from the list.
(Moonchild, search between 500 or 5k isn't a big difference for SQL)
It's not searching in SQL that's the problem.. It's doing the php loop to figure out what index in the 'full list' your entry would be. That would be somewhat slower with the 2000+ members of the central server though it would work fine on my 150 member server. Since it doesn't scale well, I choose not to do it.
demonbox
12-15-2003, 06:57 AM
Too bad it looks like Admisn won't be on the list, like seeing even the best of my compition.
I removed admins from the list because a large number of them, myself included often augment their stats or levels as they are messing around with something. It's not fair showing that they are the 'most powerful warrior' in the land when they are only that way because they can edit stats.
Since there is no way to know if an admin has edited themselves or not, I chose to remove them from the list.
Makes sense, thanks.
Xecutioner
12-15-2003, 09:02 AM
The most gold and least gold fames must change around a lot then seeing how people can lose money in just one turn right? :?
Nalle
12-18-2003, 02:38 PM
Perhaps we could add oldest player to list. then that servers oldest players would be listed. 8)
Moonchilde
12-19-2003, 02:19 AM
The most gold and least gold fames must change around a lot then seeing how people can lose money in just one turn right? :?
Some of them move around a lot (gold and gems), some of them move around a moderate amount (number of resurrections), some of them are more persistant (best dragon kill time, number of dragon kills).
Different arenas for different people to compete in.
Moonchilde
12-19-2003, 02:20 AM
Perhaps we could add oldest player to list. then that servers oldest players would be listed. 8)
I'll consider it and see what MightyE thinks.
MightyE
12-19-2003, 10:00 AM
Also, finding which page you were on would require loading the entire set into memory and then iterating through it (at least to show you in context/discover which page you were on). This is expensive and not something I wish to do. The pages are done with the LIMIT search keyword in SQL so it only returns those results which are relevant for that page.
Indeed, this is the issue. It's not a matter of doing a SQL WHERE statement, but rather of establishing your rank on an arbitrary sort order. Code wise the easiest approach is to load the entire set (big communications overhead, particularly if you run a server where the database is a separate machine) and iterate through it in code. I know of some cleverness we could pull to do it, but it still presents a bit of a performance issue.
JT, think SELECT COUNT(*) AS c FROM ... WHERE fieldname > myfieldvalue to establish the appropriate page. The reason that it still represents a performance issue is that a lot of these fields don't have indices, and adding an index purely for HoF is probably not a worthwhile tradeoff. With out the index, the SQL I mentioned above would be slow running (I didn't always have a lot of faith in indices, but I'm a solid convert, when I added them to this project and saw performance take off). It would be neat, but as JT said, it's a heavy operation, but it's something to keep in mind for the future.
Moonchilde
12-19-2003, 03:32 PM
Thanks for the idea on how to do it Eric.
This is why I leave the SQL heavy lifting to you :) [though I've gotten better at it in the past year :)]
FanboyElric
12-29-2003, 12:24 PM
If you want the speed of indicies for this, then perhaps you may want to look at having the hall of fame update only every X number of hours at which point you can run a cron job to set up the server for data mining... I'm not sure if MySQL allows for proper data mining but most other SQL servers do and when you set up a database for data mining (which is what we're doing with the Hall of Fame) everything appears to have an index.
The only downfall is that the whole HoF is static for several hours at a time between updates...
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.