Weekly Map Scorer Program

Started by mopa42, July 19, 2011, 04:53:29 PM

Previous topic - Next topic

mopa42

The sorting algorithm works like this:

  • First sort by number of maps played. This is what causes someone who has completed all maps to always be ranked higher than someone who has not.
  • Then sort any ties (there will be a lot) by total score.
  • Then sort any ties (probably won't happen) by total time.
  • Then sort any ties (really unlikely) by user name A-Z.

The first sort by number of maps played is sort of arbitrary. It made sense to me at the time, but the behavior you're seeing is consistent with that decision.
It is a little weird that the high score chart apparently doesn't do it the same way.
I'll look into it, but for now just stop outscoring people by one full map. :)

SmileyCoder

I am a programmer myself, and I know perfectly well how things can make sense at point of writing it, but somewhere down the line 2 years after its forgotten rears its head up in some unpredicted manner. Its really an edge case, someone being able to outscore by an entire map, as I indicated I would only consider it a minor bug. Still I personally prefer to get all bug reports in, minor to major, so that I can fix the minor bugs before they become major.
Best of luck with your game,
TheSmileyCoder

TheSmileyCoders YouTube channel feat. tutorials on using Treeviews in Access
I might have promised fool proof, but I never promised user proof.

rob3k

I would love to get a copy of your netbeans project to check it out. I'll likely just poke around a bit and not much more, but I'm curious. Very slick program and intuitive. Took me about 10 seconds to figure out how to import the list of tournaments and get the scores for this week.

mopa42

Glad you like it!

Here's my project directory. I don't think there's too much there that's not already in the jar, but if you use Netbeans yourself this should be the easiest way to browse around. There is some experimental/work in progress stuff here that I haven't published elsewhere yet.

Quick guide to the structure:
MainFrame is the main gui screen. Some bits of it are created from the gui builder, some are added in at run time. The internet code is in ScoreFetcher and AutoWeeklyMissionFetcher. The output buttons are handled in the Reports class. And the rest I'm sure is important in some way.

I haven't tested opening this project folder and importing into netbeans, but it should work.

rob3k

Thanks for that!  Opened right up in my copy of netbeans. I've only begun to use netbeans - played around with tweaking a few various tutorials - but the IDE makes it easy to follow a button on down to the code behind it. Complex but very slick. Love the comments!

SmileyCoder

Improvement suggestion:
Have a button that opens the default browser to the location of the thread used for importing tournament scores.
Best of luck with your game,
TheSmileyCoder

TheSmileyCoders YouTube channel feat. tutorials on using Treeviews in Access
I might have promised fool proof, but I never promised user proof.

mopa42

SmileyCoder - thanks for the feedback. I've been able to implement both of your comments. Here's version 0.7.

Highlights:

  • Go To Tournament Thread button for all auto-detected tournaments. Opens your browser to that tournament's forum thread.
  • Fixed "detailed results" table ranking order to match the plain "high score list".
  • Extra data: first tab now displays "plays". I think this is the number times you have submitted a score for the map.

Download the latest version on the first post. (I've removed v0.6, let me know if anyone needs it for anything).

Helper

mopa42 - I'm using v 7.0 for this week's game and it is working flawlessly.
Thank you.

SmileyCoder

Thanks for the improvements. Would it be possible to store the URL of the last imported tournament during import, and have a easy link to that? (Like missions are stored) The goto tournament is nice, but usually I am only interested in the latest tournament. What usually happens for me at least, is opening up the score tool, getting scores, and based on those scores possibly going to the forum to make a post.

Now I don't know exactly how you retrieve the information, but I presume its simply scraping the first post of each thread and trying to to parse it. The function is somewhat sluggish (12 seconds last run). In terms of functionality of course I still love the tool, and will continue to use it regardless, but most of the time my only real interest is in the top 1 or 2 tournaments (last weeks/next weeks). Would it be significantly faster if it only loaded the top few tournaments, possibly with option to load all tournaments?

Nice work
Smiley
Best of luck with your game,
TheSmileyCoder

TheSmileyCoders YouTube channel feat. tutorials on using Treeviews in Access
I might have promised fool proof, but I never promised user proof.

mopa42

Yeah, that would make more sense to focus on the latest tournament. I worked on my program over break with that in mind, and I think it turned out pretty well.

So here's v0.8, a new update for the new year. Highlights:

  • Getting the list of tournaments is much faster now that only one is fetched initially.
  • The program remembers the last tournament you have imported and shows its name, closing date, and link.
  • It plays nicer with the fancy characters (en dash, i circumflex, etc) in recent tournaments.

Download the latest version on the first post. (I've removed v0.7, let me know if anyone needs it for anything).

Helper


mopa42

The program now supports the new wiki. All of the tables can be exported in wiki code format as well as BBcode. New in this version (0.9):

  • Player Standings calculated from Past Tournaments on wiki.
  • Export to wiki. Still just copy and paste.

Download the latest version on the first post. (I've removed v0.8, let me know if anyone needs it for anything).