Hey, i was wondering how you go about doing the top lists, that has always been my downfall. Anyway you can help me?
I bassically need a top list for top miners in my game, but i do not understand how to go about doing so. Dantom's top list i don't understand. Thanks
Alatar
ID:191653
Aug 26 2002, 12:09 am
|
|
Aug 26 2002, 12:12 am (Edited on Aug 26 2002, 12:18 am)
|
|
ALATER..Just host and wait for a reply
|
I've been meaning to release my high score stuff as a library, but haven't had the time yet. Too much stuff to do.
That said, do you need to actually track scores, or do you just want to rank players? The ranking is pretty easy and builtin with Dantom's hublib. I use the ranking in Una and Search Engine Wars because the score of any given game depends directly on how well your opponents played against you. It doesn't make sense to show individual scores because it all depends on who you played against. Here's a really quick example of how to use the ranking: #include <dantom/hublib> It's that easy. The stuff on Dantom's end takes care of the rest. You do have to enable Mantra ranking in your hub entry, though. Tracking actual scores like I do in Hog and ShapeShifter requires more work and a dedicated BYOND server right now. You need a server that is running DreamDaemon and waiting to receive scores from the outside world through world.Topic(). The game needs to send scores to that server using world.Export(), and then the server needs to save everything to a savefile. It can get pretty hairy. ;-) Like I said, I hope to release my high score stuff as a library sometime soon, but I don't really know when that'll happen. I hear Skysaw also has something in the works based on his Chess ranking/score server. I don't think it's out yet, but maybe he'll beat me to it... |
Alatar wrote:
Hey, i was wondering how you go about doing the top lists, that has always been my downfall. Anyway you can help me? I will also be releasing my high score system for subscription, which will include access to my score server. This is the system used for keeping chess rankings. Take a look at that here: http://www.allhands.com/byond/chess/ratings.cfm Of course I'm getting the reputation of Mr. Vaporware around here, but I'll get it out soon. |
Alatar wrote:
Hey, i was wondering how you go about doing the top lists, that has always been my downfall. Anyway you can help me? The basic technique is pretty straightforward: Build a list of players, associated with score (some numeric value, anyway), and sort it, then chop it. Alternatively, sort while building the list. Here's a way you might go about that: proc/TopPlayersBySkill(skillname,n=10) This will require some modification to work with savefiles as you wanted. This proc will return a list longer than 10 (or what you specify as n) if there's a tie for the last spot on the list. [Just FYI, your old thread got axed because you bumped it too recklessly. You did a first bump at just 3 hours, and a 2nd at 5 as I recall.] Lummox JR |
In response to Lummox JR
|
|
Lummox JR wrote:
Alatar wrote: proc/TopPlayersBySkill(skillname,n=10) This will require some modification to work with savefiles as you wanted. This proc will return a list longer than 10 (or what you specify as n) if there's a tie for the last spot on the list. I'm useing Deadron's characterhandling if that helps much. Myn tended to lag when loading character. I do not understand what the InsertIntoList is. and [skillname] am i suppose to put the var, or a name? Alatar |
In response to Alatar
|
|
Alatar wrote:
I'm useing Deadron's characterhandling if that helps much. Myn tended to lag when loading character. I do not understand what the InsertIntoList is. and [skillname] am i suppose to put the var, or a name? The skillname argument is whatever you want; it could be a type like /skill/mining (if you use datums for skills), or a string like "mining". All it has to be is a valid item for an associative list. As for InsertIntoList(), that's my way of saying you need a proc that will insert an item into the list at the position specified by the third argument. Ideally, Dantom would have built in list.Insert() by now. Lummox JR |