Weekly Map Scorer Program

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

Previous topic - Next topic

mopa42

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.
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.


Showing the participants' scores from last week.


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 for details
Edit - v0.3 is out with map memory. See post for details.
Edit - v0.4 is out with a couple minor improvements. See post for details.
Edit - v0.5 is out with bug fixes and export improvements. See post for details.
Edit - v0.6 is out with better importing and a fancier results table. See post for details.
Edit - v0.7 is out with bug fixes and go-to-thread. See post for details.
Edit - v0.8 is out with tournament memory and faster fetches. See post for details.
Edit - v0.9 is out with wiki support. See post for details. Download it below!

Lord_Farin

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.
Behold, Nexus! Looketh skywards, for thy obliteration thence nighs, my foul enemy!

mopa42

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.

Lord_Farin

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...
Behold, Nexus! Looketh skywards, for thy obliteration thence nighs, my foul enemy!

Lord_Farin

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.
Behold, Nexus! Looketh skywards, for thy obliteration thence nighs, my foul enemy!

Fisherck

Your amazing. I don't know how you do it. You make me feel very ignorant. 8)
My CW2 Maps
My CW1 Maps
Quote from: Sqaz on August 28, 2011, 02:49:35 PM
The comments are here to comment, dare to use them.

UpperKEES

My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

thepenguin

as of now I have to remap .jar files to java because winRAR invaded java
We have become the creeper...

mopa42

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

Lord_Farin

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.
Behold, Nexus! Looketh skywards, for thy obliteration thence nighs, my foul enemy!

mthw2vc

The program probably shouldn't total up the times of people who have not completed every map.

Measure

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.

thepenguin

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
We have become the creeper...

mopa42

#13
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.



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)

Lord_Farin

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 ;)
Behold, Nexus! Looketh skywards, for thy obliteration thence nighs, my foul enemy!