I've got a program that will add up the scores for 5 code maps at once. This could be super useful for our ongoing weekly tournaments (http://knucklecracker.com/forums/index.php?topic=7410.0).
It shows scores and totals for every player in the tournament, high score rankings, stuff like that.
You could use it for any 5 code maps - there doesn't have to be an ongoing tournament.
(http://knucklecracker.com/forums/index.php?action=dlattach;topic=7477.0;attach=5130;image)
Showing the participants' scores from last week (http://knucklecracker.com/forums/index.php?topic=7411.0).
The program is written in Java. When you unzip the file, you'll see the jar file and a folder called lib [As of v0.4 lib is no longer needed]. If you have Java 6, you should be able to just double-click to run. As usual, the source code is packaged up and included in the jar file.
Feedback is welcome.
Questions of things I wasn't sure of:
- do we want to list the total times in either of the high score lists?
- are the forum-formatted things formatted nicely? I can change how the tables look, colors, etc if there is a desire.
Edit - v0.2 is out with automatic mission downloading and incomplete player hiding. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg48791#msg48791) for details
Edit - v0.3 is out with map memory. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg49006#msg49006) for details.
Edit - v0.4 is out with a couple minor improvements. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg65659#msg65659) for details.
Edit - v0.5 is out with bug fixes and export improvements. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg66897#msg66897) for details.
Edit - v0.6 is out with better importing and a fancier results table. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg78816#msg78816) for details.
Edit - v0.7 is out with bug fixes and go-to-thread. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg85121#msg85121) for details.
Edit - v0.8 is out with tournament memory and faster fetches. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg86864#msg86864) for details.
Edit - v0.9 is out with wiki support. See post (http://knucklecracker.com/forums/index.php?topic=7477.msg91239#msg91239) for details. Download it below!
Very awesome. As a (hobbyist) developer, I'd like to know if you use NetBeans, Eclipse or just plain notepad ;)
Maybe we could think of some sort of encoding string, that could be posted on the tournament's page, which loads the correct maps automatically.
Quote from: Lord_Farin on July 19, 2011, 06:04:55 PM
Very awesome. As a (hobbyist) developer, I'd like to know if you use NetBeans, Eclipse or just plain notepad ;)
Maybe we could think of some sort of encoding string, that could be posted on the tournament's page, which loads the correct maps automatically.
I use NetBeans (I sort of mentioned it in the Readme, but if you or anyone wants, I can make available my NetBeans project directory).
And this isn't quite automatic yet, but you can select the table announcing the week's missions and drag and drop onto the top table in my program. It worked great for the first week, but TP used a different table format this week (combining size and complexity), so it isn't as simple.
Maybe you didn't get it correctly; I meant something like
||| map1 || size1 || compl1 ||| map2 ... compl5 |||
to be posted on the forum page, which could then be translated to the tool.
Another issue I want to mention is the inability to use paste to fill in a mission name.
As a last, I use Eclipse and therefore it might lead to strange behaviour if I started interfering with the code...
Quote from: Lord_Farin on July 19, 2011, 06:16:35 PM
Another issue I want to mention is the inability to use paste to fill in a mission name.
This could do with having a single left mouse click having the effect of a double one, as I just discovered.
Your amazing. I don't know how you do it. You make me feel very ignorant. 8)
Very nice again, Mopa! :)
as of now I have to remap .jar files to java because winRAR invaded java
Quote from: Lord_Farin on July 19, 2011, 06:16:35 PM
Maybe you didn't get it correctly; I meant something like
||| map1 || size1 || compl1 ||| map2 ... compl5 |||
to be posted on the forum page, which could then be translated to the tool.
What will probably work best is to just keep using the table format of Map Name, Size, and Complexity.
I should be able to whip something up to extract the table from the first post of any Code Mission Discussion thread titled Weekly 5-Map Tournament ....
(The program already knows how to parse the map data from a table like that).
I'm also working on making paste (ctrl-v) work better
Quote from: mopa42 on July 20, 2011, 11:15:54 AM
Quote from: Lord_Farin on July 19, 2011, 06:16:35 PM
Maybe you didn't get it correctly; I meant something like
||| map1 || size1 || compl1 ||| map2 ... compl5 |||
to be posted on the forum page, which could then be translated to the tool.
What will probably work best is to just keep using the table format of Map Name, Size, and Complexity.
I should be able to whip something up to extract the table from the first post of any Code Mission Discussion thread titled Weekly 5-Map Tournament ....
(The program already knows how to parse the map data from a table like that).
I'm also working on making paste (ctrl-v) work better
Using java.util.regex I think that with some testing the regular expression "\\[table\\].+\\[/table\\]" should work (you can test later if, for example, "
" appears five times) will extract the table. |
The program probably shouldn't total up the times of people who have not completed every map.
Quote from: mthw2vc on July 20, 2011, 11:44:38 AM
The program probably shouldn't total up the times of people who have not completed every map.
I agree with this and also think there should be a checkbox to drop players out of the results per player page if they haven't completed all missions.
Quote from: Measure on July 21, 2011, 04:59:43 PM
Quote from: mthw2vc on July 20, 2011, 11:44:38 AM
The program probably shouldn't total up the times of people who have not completed every map.
I agree with this and also think there should be a checkbox to drop players out of the results per player page if they haven't completed all missions.
Agreed
Here's the first update, v0.2, with a couple fun new features that you've all requested.
- You can now hide people who haven't completed all missions. (and it doesn't list total time unless you've finished the missions)
- You can now paste, copy, and drag in the missions table. It's pretty smart about finding and loading tables if you've copied one, or just pasting one value if there's no table.
- There's a new Import tab which will automatically fetch and load weekly maps from the forum.
(http://knucklecracker.com/forums/index.php?action=dlattach;topic=7477.0;attach=5146;image)
Download the latest version from the link on the first post. (I've removed the old 0.1 download - if anyone needs it for anything, I've still got it, I just didn't want it taking up space anymore)
Thanks for implementing these nice features. One last request would be some kind of memory that automatically brings up the last 5 maps when the application is opened (ie. the maps which were viewed before the application was closed last time). Such would make for less traffic on the servers, and it would be convenient ;)
Great tool. This will help the tournaments so much. If I had to add one more option it would be the memory option mentioned above.
I've tried but can't get anything that invloves internet connection to work for me. Not the fetch scores, import or export. I have tried reconnecting my internet, but that has not worked either... :(
Quote from: Fisherck on July 22, 2011, 03:59:43 PM
I've tried but can't get anything that invloves internet connection to work for me. Not the fetch scores, import or export. I have tried reconnecting my internet, but that has not worked either... :(
Steps to try:
- Make sure you can get scores and view the forum the normal way through a web browser.
- A firewall might be blocking java or my program in general.
- Run as administrator might help maybe
- Is there anything useful in the error message it gives?
- If you still have v0.1, can that fetch scores either?
- Try running the program with a console, since the program sometimes will print detailed errors to standard out. If you run the program with
java.exe not
javaw.exe (the default double-click association), there will be a console when the program runs. In a command prompt, try
java -jar CodeMapTournament0.2.jar, giving a full path like
"C:\Program Files\Java\jre6\bin\java.exe" if java isn't in your path (java.exe might also reside in
C:\Windows\System32).
Quote from: mopa42 on July 22, 2011, 06:21:29 PM
Steps to try:
- Make sure you can get scores and view the forum the normal way through a web browser.
- A firewall might be blocking java or my program in general.
- Run as administrator might help maybe
- Is there anything useful in the error message it gives?
- If you still have v0.1, can that fetch scores either?
- Try running the program with a console, since the program sometimes will print detailed errors to standard out. If you run the program with java.exe not javaw.exe (the default double-click association), there will be a console when the program runs. In a command prompt, try javaw -jar CodeMapTournament0.2.jar, giving a full path like "C:\Program Files\Java\jre6\bin\java.exe" if java isn't in your path (java.exe might also reside in C:\Windows\System32).
Well, it does not give an error message. It just does not do anything when I push the buttons... I have both versions, and neither work. I'll try some of the other stuff and see if that works.
Well, now I feel rather embarrassed. Apparantly, if you don't extract it first, it will open up, but you can't fetch the scores. But once you do extract it, there is nothing wrong.... What do you know. ::)
Quote from: Lord_Farin on July 22, 2011, 01:47:47 PM
One last request would be some kind of memory that automatically brings up the last 5 maps when the application is opened (ie. the maps which were viewed before the application was closed last time). Such would make for less traffic on the servers, and it would be convenient ;)
That's easy enough.
Here's the latest update, v0.3, now with maps memory. The program stores the 5 maps you last had open into a small file named ".missions" and reads them in again when it starts up. The file is in the same folder you run the jarfile from. No problem if the file is missing / can't be accessed. If the file gets corrupted for some reason, you can just delete it and have the program re-create it.
Download it on the first post (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.2, let me know if anyone needs it for anything).
Excellent tool, thank you very much!
hey, mopa, you typo'd a tooltip on the export tab (latest, not lastest)
It seems the rounding policy for the times is different in your program than in the game, as I just scored 6:42 in CW2, which shows up as 6:43 in the program. Minor issue I'm sure, but still I thought I'd inform you.
Quote from: Lord_Farin on August 09, 2011, 04:52:32 PM
It seems the rounding policy for the times is different in your program than in the game, as I just scored 6:42 in CW2, which shows up as 6:43 in the program. Minor issue I'm sure, but still I thought I'd inform you.
Yeah, sorry about that. It was very hard for me to figure out exactly how Virgil does his rounding, because there can be several steps between the raw frame count and the rounded minutes and seconds. I've given it my best shot, but sometimes it is still off by one second. This doesn't happen very often though.
I might try to come back and fix that sometime.
I was wondering, is the conversion routine from seed phrase (code we enter into CW2) into the level seed (32-bit int that is used by the score script) known? Any chance of sharing the formula with us other programmers? ;)
Thanks in advance
Quote from: xoft on November 07, 2011, 04:20:18 PM
I was wondering, is the conversion routine from seed phrase (code we enter into CW2) into the level seed (32-bit int that is used by the score script) known? Any chance of sharing the formula with us other programmers? ;)
Sure thing.
Hope this isn't too confidential to share, but here's what I discovered:
Take the code string, change everything to lower case, take the MD5 hash of that.
Interpret the first 4 bytes (first 8 hex digits) as an unsigned integer.
That gives you the magical seed number for the code map.
(the relevant bits from my code are in Mission.java and ScoreFetcher.java if you were looking at that)
Quote from: mopa42 on November 07, 2011, 04:44:26 PM
Take the code string, change everything to lower case, take the MD5 hash of that.
Interpret the first 4 bytes (first 8 hex digits) as an unsigned integer.
That gives you the magical seed number for the code map.
You just got to love this guy! 8)
Quote from: UpperKEES on November 07, 2011, 04:51:03 PM
Quote from: mopa42 on November 07, 2011, 04:44:26 PM
Take the code string, change everything to lower case, take the MD5 hash of that.
Interpret the first 4 bytes (first 8 hex digits) as an unsigned integer.
That gives you the magical seed number for the code map.
You just got to love this guy! 8)
It says that in the source of his file ;)
QuoteThis document describes how to fetch high scores for Creeper World 2 from the server.
*** COMPLETELY UNOFFICIAL! USE AT YOUR OWN RISK! ***
If you can read this, then you know how to open jar files, so you'll probably understand the rest of what I have to say.
Basically, you query http://knucklecracker.com/creeperworld2/scoreQuery.php with various parameters in order to get a list of records in XML format.
The parameter string to the score query is in the usual format ?key1=value1&key2=value2 (or use an HTTP GET object).
The various parameters you can have are:
* gameUID = text
s0-s19 for Days 1-20, b0-b9 for Bonus 1-10, credits for Credits, and proceduralXXXX-YZ for Code missions.
XXXX is the decimal digits (no leading zeros) of the number representing the hash of the code string
take the string, convert to lower case, trim leading and trailing whitespace, then get an MD5 hash. Use the first 4 bytes (first 8 hex digits) to make an unsigned integer.
Y is the size: 0, 1, or 2 for small, medium, large
Z is the complexity: 0, 1, or 2 for low, medium, high
default is s0 for Day 0
* sort = text
"scores" for sorting by Top Scores or "time" (not times) for sorting by Top Times
default is "scores" if omitted
* userfilter = text
whatever you type in for a user name (escaping any funny characters with the %xx code)
default is blank if omitted
* groupfilter = text
whatever you type in for a group filter (escaped)
default is blank if omitted
* timefilter = integer
0, 1, 2, or 3 for "All Time", "Last Few Days", "Last Week", "Last Month"
default is All Time if omitted
Of these parameters, only gameUID is really required for normal use.
The document returned is in XML format without spaces so it isn't very human readable.
(If you're using a web browser, use View Source to see the XML goodies)
The format (indented) is roughly this:
<records>
<record>
<rank>1</rank>
<user>First Place</user>
<score>10000</score>
<time>8000</time>
<plays>6</plays>
</record>
<record>
...
</record>
...
</records>
The time is given in frames (30 frames per second, and it is tricky to match the way the score viewer rounds to tenths of a second. It truncates instead of rounding in one place, but I think it must round somewhere else. Anyway, divide by 30 to get seconds)
In my program which uses this stuff, I put in a 100 millisecond delay between server requests. Short enough it's not too noticeable by people. It's not strictly necessary, but it seems like bad manners to uncover Virgil's hidden php page and the swamp it with lots of repeated queries.
Anyway, share and enjoy and be nice.
Thanks a lot.
To clear things up even more, "funny" characters (>127) are UTF8-encoded before MD5ing, at least by the official score viewer. I might check if the game does this as well later.
Just posting to bump this up for new players.
dbit
It's been a while since I checked in on the tournaments. Looks like there's another bug I can fix.
Quote from: Lord_Farin on February 21, 2012, 03:01:00 AM
Quote from: DethbyIT on February 20, 2012, 06:52:27 PM
SC - I'm not sure why, but this one is not registering when I try to do an 'Import' with the Scorer. Just thought you'd like to know.
dbit
It's because 'February' is spelled out instead of using '2' and hyphens. But you can copy the table (from 'The Shining' up to 'Low') and paste on the missions table in the tool; this will work.
Sometimes the closing dates don't get accepted unless they are in the right format. Currently, the program expects MM-DD-YYYY format only (including the dashes). Well, we've had a couple tournaments use the European format DD-MM-YYYY, which my program misparsed, and some where the month name was spelled out to avoid ambiguity, which it didn't allow at all.
I'm going to work on an update for better (more flexible) date parsing. Should have it out in a day or two.
While I'm doing this, anyone have any other features they want added?
I have noticed some issues where a player wouldn't get an asterisk on the scores list, despite only completing 3 or 4 maps; mainly when there weren't many contestants (like, when this person was the only one with that much times posted)
I've updated the program. Highlights of v0.4:
- Correctly parses the tournament closing date if the month is spelled out. Tournaments are now in order!
(http://knucklecracker.com/forums/index.php?action=dlattach;topic=7477.0;attach=7257;image) - Better conversion from frames to seconds. The program rounds the same way the game rounds.
(note that internally frames are still used, so rankings will be accurate even with rounding) - The high score table now includes the time retrieved (in the forum time).
- I removed the lib folder, making the download a quarter of the size.
- The check for completing all maps works even when tournament has few players.
Download it on the first post (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.3, let me know if anyone needs it for anything).
found two little quirks.
Tournament Results* Did not finish all maps.Scores recoded at 2012-03-20 13:04:28 forum time.
Scores
recodedrecorded?
the current tourny I started has a map name it doesn't much like. importing the tourny works ok, except a map name screws up pretty good.
Eureka! I've got it.
becomes
Eureka! I've got it.
It seems it doesn't like double spaces, which
used to be the the norm when ending one sentence, even if its just a single word.
I'll know if its importing well or not soon as we have a score for that map for it to import.
Good catch. I'm working on a fix for those issues.
Edit: looks like it is due to HTML requiring non-breaking spaces ( ) if there is more than one space between words.
Two spaces being a norm??? Can you provide a source for that? I can't believe that.
Quote from: xoft on March 21, 2012, 04:33:36 AM
Two spaces being a norm??? Can you provide a source for that? I can't believe that.
Its how I recall being taught in english class. the space between words written or types was expected, and marked against if not, to be shorter than that which ends your sentences. Its something i've never really looked back on, but I can't seem to find a good example of it now. it does seem rare to find a webpage with sentences ended with a double space now that i actually look.
Looking now I can find plenty of examples of people on both sides calling the other wrong, but nothing i would call 'definitive'.
I can however find this: http://www.typographyforlawyers.com/?page_id=1325
QuoteI know that many people were taught to put two spaces between sentences. I was too. But these days, using two spaces is an obsolete habit. The practice was passed down from the typewriter era.
Seems im just getting old.........
So, I will meet you in the middle. I won't retract the 'norm' citation, but I will insert 'used to be the '. Growing old sucks, you were taught, swear left right and center its correct, and find it now is actually wrong, lol.
I do still think the scorer should behave with it as it's evident it will occasionally encounter it. I doubt this will be the last time it encounters doubled spaces.
Quote from: xoft on March 21, 2012, 04:33:36 AM
Two spaces being a norm??? Can you provide a source for that? I can't believe that.
It appears to be a (formal) standard in English writing. The language LaTeX for (among others) production of mathematical text has it as a standard. I know this, because the same two spaces is erroneous in Dutch, and has to be manually put into the LaTeX parser by the command \frenchspacing. Now I'm quite sure that LaTeX would not put an erroneous condition into their parser as a standard. Hopefully, this provides some justification. But maybe this discussion needs to be taken to the 'random section'.
Thank you for the explanation. I'm from Czech Republic and I've never seen such a thing even mentioned, so I guess it's some "western" weirdness, same as inches and feet instead of cm ;)
I added 0.1 to the version number of the program so now things are 25% better ;)
Highlights of the latest release, v0.5:
- Now imports "Eureka! I've got it." correctly by converting any non-breaking spaces into normal spaces.
- New tournament table export options (thanks to past tournament creators):
Include Header - add the standard links before the table, like so:
Spoiler
INTRO GOES HERE
A few useful links:All Tournaments (http://knucklecracker.com/forums/index.php?topic=7410.0)
Code Map Scoreboard (http://knucklecracker.com/creeperworld2/viewscores.php)
Tournament Score Tool (http://knucklecracker.com/forums/index.php?topic=7477.0)
Theme:THEME GOES HERE
Map Name: | Size: | Complexity: |
One | Large | High |
Two | Medium | Medium |
Three | Medium | High |
Four | Large | Medium |
Five | Small | High |
Extended Table - add Gravity, Build, and Experimentals map info columns to the table:
Spoiler
Map Name: | Size: | Complexity: | Gravity: | Build: | Exp: |
One | Large | High | DIRECTION | DIRECTION | YES/NO |
Two | Medium | Medium | DIRECTION | DIRECTION | YES/NO |
Three | Medium | High | DIRECTION | DIRECTION | YES/NO |
Four | Large | Medium | DIRECTION | DIRECTION | YES/NO |
Five | Small | High | DIRECTION | DIRECTION | YES/NO |
- Rule 6 reminders: if you enter maps with repeated size/complexity combinations, the program will highlight the offending maps. It only warns - you can still enter whatever maps you want.
Download the program on the first post (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.4, let me know if anyone needs it for anything).
Quote from: mopa42 on March 22, 2012, 02:18:21 PM
I added 0.1 to the version number of the program so now things are 25% better ;)
Rule 6 reminders: if you enter maps with repeated size/complexity combinations, the program will highlight the offending maps. It only warns - you can still enter whatever maps you want.
perfect, a safety net to prevent me from being retarded again, lol.
@mopa42 -
Running Tournament Scorer V.5 on Windows 7, SP1.
Attempting to Import current game and getting Java warning:
"Something went wrong!"
"java.lang.NullPointerException"
MS released some patches/updates last night and I'm not sure if that is the cause.
Any thoughts/suggestions?
Thank you.
Fill in the table yourself (map names, height, complexity, just do it yourself and you don't need to import tables)
Running Tournament Scorer V.5 on Windows XP, SP3.
I seem to get NullPointerexception whenever I try to connect to the internet
not before, but now it seems to happen with v3 and v2 as well
@J - Thanks.
I did the manual trick on last week's game and thought I would try the 'Import' function this week. I hadn't seen the problem mentioned here, so thought I would post it.
This week's titles are now plugged in (manually) and all of the scoring functions seem to be working as designed.
[Off-topic - when are you submitting another map...it's been a while and they are always worth playing.
:)]
@thepenguin - Thanks for testing that. I was going to try an XP box next.
I know that MS updates will often break links/functions, so maybe that is the reason.
Quote from: Helper on August 07, 2012, 07:46:24 AM
This week's titles are now plugged in (manually) and all of the scoring functions seem to be working as designed.
I'm pretty sure they aren't WAD on an XP box, because they aren't working.They are working right, just too well (PEBCAK)
LOL!
"PEBCAK"...closely related to "PICNIC", I believe. Frequently I am an example of both.
yeah, import buttons still aren't working (at all)
just the scoring functions work well
I'm working on a fix for these (and other) issues. I just don't have a lot of time right now, probably won't for another couple weeks.
For now, here's a build that probably has some import/null errors fixed.
@mopa42 -
The fix worked - thank you.
I just tried the new version and it pulled up all of the new games.
Tournament Results
Rank | Player | Total Score |
1. | Wheatmidge | 58346 |
2. | Helper | 57231 |
3. | UoADeadeye | 42983* |
4. | ctuna | 12222* |
* Did not finish all maps.Scores recorded at 2012-08-11 10:59:47 forum time.
Hej Mopa
Can I ask you how you retrieve the scores for your tool?
I am maintaining the thread "Do a Member" and I like to check if the maps have actually been, and was wondering how you are getting the scores?
I would then like to implement a similar method, allthough in VB (Since I don't do java :)
Hoping you can help.
Quote from: SmileyCoder on August 24, 2012, 09:13:06 AM
Can I ask you how you retrieve the scores for your tool?
There's a writeup in the source code - extract the jar file (jar = zip), then look at the
docs\HOWTO-get-scores-from-server.txt file. TP also quotes it here (http://knucklecracker.com/forums/index.php?topic=7477.msg58307#msg58307).
Summary of the method: query http://knucklecracker.com/creeperworld2/scoreQuery.php?gameUID=proceduralX-YZ,
where X is the first 4 bytes of the MD5 hash of the lowercase code name, represented as unsigned integer; Y is size 0-2; and Z is complexity 0-2. Then parse the XML data.
Example: for the map "(e)" on large/high, the corresponding URL is http://knucklecracker.com/creeperworld2/scoreQuery.php?gameUID=procedural1021749350-22.
Thank you very much. I have been trying now to recreate this in a VBA environment, but must admit my knowledge of working with byte and hex values is quite limited.
I am going to try and take it step by step, since my current approach isn't working :P
Can I ask you, for the map "(e)" what value do you get for the MD5 hash of "(e)"? so that I have something to compare with, and at least know that I got the first part right.
Once again, thank you.
For comparison, I get MD5("(e)")=3ce6a866dc8e30ae0263bdcf0ea27809
If I try to convert the first hex value "3c" to a byte I get 60
Converting the first 4 hex values, and concatanating them gives me: 60230168102
P.S. Thanks for the jar=zip tip, did not know that.
(e) -> 3ce6a866dc8e30ae0263bdcf0ea27809.
Next you convert the first 4 bytes all at once: 3ce6a866 -> 1021749350. In java I use Long.parseLong(hex, 16) to do the conversion; I don't know what the equivalent method in VBA is. I used a Long format to make sure the number was unsigned (as all integers in Java are signed).
public static long getSeedFromString(String str) {
str = str.toLowerCase().trim();
String hex = DigestUtils.md5Hex(str).substring(0, 8);
return Long.parseLong(hex, 16);
}
Thank you, finally got it! I had somehow gotten the idea that you did each byte seperately. Thank you very much for your help and patience!
I found some time to work some more on this program, and now most of the import bugs are fixed. Everything is reasonably tested and polished, so I'm uploading it as v0.6. (Side note: this is now over 3000 lines of code. Wow!)
Highlights of the latest release:
- Auto-import works for all recent tournaments. It even accepts "ending" instead of "closing" and "challenge" instead of "tournament".
- The [open] tag in the auto-import tournament list should properly expire at the end of the closing day.
- Time scale is Last Month by default, since some tournaments were lasting longer than one week.
- Removed Copy User's Results since we haven't used that at all.
- Fancy detailed tournaments result list - generates these types of tables, showing the results per player and the top three scores for each map.
Top 3 scores per map
Results Per Player
Rank | Name | Live Well and Prosper | Beam me up, Scotty | Illogical | I'm a doctor, not a... | Captain, I'm frightened | Total Score | Total Time |
1 | Helper | 12429 | 10958 | 11955 | 11865 | 11797 | 59004 | 33:19 |
2 | mopa42 | 12453 | 10977 | 11831 | 11826 | 11769 | 58856 | 34:28 |
3 | dt42 | 12220 | 10767 | 11772 | 11668 | 11589 | 58016 | 40:49 |
4 | Wheatmidge | 12393 | 10747 | 11917 | 11524 | 11199 | 57780 | 43:24 |
5 | ctuna | 12209 | 10653 | 11538 | 11365 | 11229 | 56994 | 49:21 |
6 | teknotiss | 11519 | 10398 | 11121 | 11456 | 11020 | 55514 | 59:45 |
7 | UoADeadeye | 11290 | 10065 | 10658 | 10909 | 10721 | 53643 | 78:34 |
8 | inept_celt | 11442 | 9912 | 10718 | 10701 | 10065 | 52838 | 86:55 |
9 | TheSmileyCoder | 12404 | 10957 | | 11711 | 11578 | 46650 | |
10 | Mad Spy | 10923 | 10004 | 9443 | 8547 | | 38917 | |
11 | Martin | | 10732 | | | | 10732 | |
Scores recorded at 2012-09-16 20:44:38 forum time.
You can also go for a simplified look (only the top scores are in bold). Cleaner, but less information.
Top scores in bold
Results Per Player
Rank | Name | Live Well and Prosper | Beam me up, Scotty | Illogical | I'm a doctor, not a... | Captain, I'm frightened | Total Score | Total Time |
1 | Helper | 12429 | 10958 | 11955 | 11865 | 11797 | 59004 | 33:19 |
2 | mopa42 | 12453 | 10977 | 11831 | 11826 | 11769 | 58856 | 34:28 |
3 | dt42 | 12220 | 10767 | 11772 | 11668 | 11589 | 58016 | 40:49 |
4 | Wheatmidge | 12393 | 10747 | 11917 | 11524 | 11199 | 57780 | 43:24 |
5 | ctuna | 12209 | 10653 | 11538 | 11365 | 11229 | 56994 | 49:21 |
6 | teknotiss | 11519 | 10398 | 11121 | 11456 | 11020 | 55514 | 59:45 |
7 | UoADeadeye | 11290 | 10065 | 10658 | 10909 | 10721 | 53643 | 78:34 |
8 | inept_celt | 11442 | 9912 | 10718 | 10701 | 10065 | 52838 | 86:55 |
9 | TheSmileyCoder | 12404 | 10957 | | 11711 | 11578 | 46650 | |
10 | Mad Spy | 10923 | 10004 | 9443 | 8547 | | 38917 | |
11 | Martin | | 10732 | | | | 10732 | |
Best scores in Bold.Scores recorded at 2012-09-16 20:44:38 forum time.
The format for these tables was inspired by Amram a while (http://knucklecracker.com/forums/index.php?topic=10325.msg68009#msg68009) back (http://knucklecracker.com/forums/index.php?topic=10374.msg68260#msg68260). I lightened the silver color to make it look better, but kept gold and bronze as they were. Hope this looks ok. There are checkboxes in the export menu to select between these types of tables.
Download the latest version on the first post (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.5, let me know if anyone needs it for anything).
mopa42 - v6.0 rocks!
I just downloaded it and ran through the functions.
Exellent work and will sure make it easier to post and update scores.
Very nice work.
Minor bug report:
An oddity occured, and I wonder if it is by intent. When viewing the rankings for this game:
Current High Scores:
1: inept_celt 45279
2: TheSmileyCoder 46824*
3: Helper 44747*
4: Ronini 30292*
5: dt42 11276*
6: Wheatmidge 11127*
7: UoADeadeye 10852*
8: rob3k 10383*
* Did not finish all 5 missions.
It shows inept_celt in first place even though he has less points then me. However when exported it looks ok:
Results Per Player
Rank | Name | Dinosours | Gummy Bears | Rockets | Smarties | Fuzzy Peaches | Total Score | Total Time |
1 | TheSmileyCoder | 11701 | 12177 | | 11183 | 11763 | 46824 | |
2 | inept_celt | 9929 | 9477 | 9503 | 6623 | 9747 | 45279 | 160:46 |
3 | Helper | 11112 | 11559 | | 10555 | 11521 | 44747 | |
4 | Ronini | 9804 | 10612 | 9876 | | | 30292 | |
5 | dt42 | 11276 | | | | | 11276 | |
6 | Wheatmidge | 11127 | | | | | 11127 | |
7 | UoADeadeye | | | | | 10852 | 10852 | |
8 | rob3k | | | 10383 | | | 10383 | |
Scores recorded at 2012-11-27 15:04:46 forum time.
I presume it is because he has completed all maps?
P.s. Love your score tool, use it every week.
Quote from: SmileyCoder on November 27, 2012, 03:09:19 PM
It shows inept_celt in first place even though he has points then me.
I think that is probably the reason.
Finishing "Rockets" right now, so let's see what happens when I post that score.
EDIT:
Posting current results to see what they look like:
************************
Results Per Player
Rank | Name | Dinosours | Gummy Bears | Rockets | Smarties | Fuzzy Peaches | Total Score | Total Time |
1 | Helper | 11112 | 11559 | 11047 | 10555 | 11521 | 55794 | 61:50 |
2 | inept_celt | 9929 | 9477 | 9503 | 8591 | 9747 | 47247 | 155:38 |
3 | TheSmileyCoder | 11701 | 12177 | | 11183 | 11763 | 46824 | |
4 | Ronini | 9804 | 10612 | 9876 | | | 30292 | |
5 | dt42 | 11276 | | | | | 11276 | |
6 | Wheatmidge | 11127 | | | | | 11127 | |
7 | UoADeadeye | | | | | 10852 | 10852 | |
8 | rob3k | | | 10383 | | | 10383 | |
Scores recorded at 2012-11-27 15:38:25 forum time.
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. :)
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.
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.
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.
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!
Improvement suggestion:
Have a button that opens the default browser to the location of the thread used for importing tournament scores.
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 (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.6, let me know if anyone needs it for anything).
mopa42 - I'm using v 7.0 for this week's game and it is working flawlessly.
Thank you.
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
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 (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.7, let me know if anyone needs it for anything).
I just used it to post here:
http://knucklecracker.com/forums/index.php?topic=12382.0
Flawless - first time, every time.
The program now supports the new wiki (http://knucklecracker.com/wiki/doku.php?id=cw2:weekly_5_map_tournament). 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 (http://knucklecracker.com/forums/index.php?topic=7477.msg48674#msg48674). (I've removed v0.8, let me know if anyone needs it for anything).