Stunts Forum

Stunts - the Game => Stunts Chat => Topic started by: Duplode on November 17, 2008, 03:42:10 PM

Title: ReplayHandler v.0.1
Post by: Duplode on November 17, 2008, 03:42:10 PM
What is it about: since I was willing to exercise my elementary Java skills a bit further, I decided to start a small project and make a new, Java-based, implementation of RPLInfo. While the relevance of coding yet another replay checker is debatable (especially a console based one, as learning how to design decent user interfaces is not on my short-term plans...), what I am really interested in is to use my implementation as back-end for batch file processing, thus creating helper functions useful to competition managers and replay archive organizers. For instance, the first utility I'm working on is a .HIG generator: the program parses the .RPL files, sorts them according to replay times and then print the data into binary .HIG format, using the file name for the pipsqueak name field. I think that would be a cool addition in future replay packs, as well as helping to keep record of race results for the posterity. Other possibilities that can be envisioned include an offline management system for competitions without php sites, which would get aptly-named replay files from a new replays folder, do the proper validity checks (track, car, lap completion), add the new laps to the scoreboard (eventually replacing older laps from the same pipsqueak) and print the updated scoreboard to a .txt . If you can think of other useful stuff that could be added, please do make the suggestions!  ;) I will publish a preliminary version of the code for you to test as soon as it gets a bit more clean and usable.
Title: Re: ReplayHandler v.0.1
Post by: zaqrack on November 17, 2008, 04:38:04 PM
Sounds good for a start!

I'll just let my thoughts roam free. The following might be too wild or simply stupid ideas:

Did we ever make experiments, on how writing some extra bytes to a replay modifies it?
If it wouldn't interfere with the replay itself, we could use this tool's next generation to write competition, track, pipsqueak name into the file, even along with some short comments or other identification. This could be then the new generation RPL, and online competitions would require replays edited (or rather only parsed) through this tool. As it will be in Java, it'd be simple to use online, with a background database handling the competition names, track names, etc. Competition replays can be also validity-checked with trk files. 
We could also create a replay sending form under stunts.hu, with proper login needed. pipsqueak name is auto loaded then, voila. All the other required extra data could be selected from dropdown lists, and the java tool would send the replay to the manager of the selected competition in mail (or in case of zakstunts, in simple php variables) along with the extracted data and information in mail body.

This would also guarantee, that there would be no lost or unknown replays on our hard disks in the future, loading them in this tool would display all the additional data we need to identify them. 
 

Title: Re: ReplayHandler v.0.1
Post by: Mark L. Rivers on November 17, 2008, 05:23:29 PM

What I'm reading is music for my ears...  :)
Having not a PHP host, I'm looking forward to see how the new tool could help me in order to make more automatic certain part of the ordinary job. This could mean SDR surviving in the future...  ::)

Title: Re: ReplayHandler v.0.1
Post by: BonzaiJoe on November 17, 2008, 08:56:03 PM
That sounds really great! I'm looking forward to having these options. Particularly the .hig generator!
Title: Re: ReplayHandler v.0.1
Post by: Duplode on November 18, 2008, 01:28:18 PM
Quote from: zaqrack on November 17, 2008, 04:38:04 PM
Did we ever make experiments, on how writing some extra bytes to a replay modifies it?
If it wouldn't interfere with the replay itself, we could use this tool's next generation to write competition, track, pipsqueak name into the file, even along with some short comments or other identification. This could be then the new generation RPL, and online competitions would require replays edited (or rather only parsed) through this tool.

I performed two tests with extending default formats yesterday:
The bottom line is that the programmer should exercise a lot of caution when extending default file formats. But it works... :)

As for a full-fledged competition management system, there are two main requests that need to be fulfilled:

The first functional alpha version of the application is ready, and I would have posted it already weren't for a stupid little thing I couldn't figure out yet (how to make the program read an auxiliary .txt file included within the .jar package I will post...). As soon as I solve it you'll be able to test the program. ;)
Title: Re: ReplayHandler v.0.1
Post by: Krys TOFF on November 18, 2008, 03:52:46 PM
Sounds interesting, especially the .hig generator as BJ said. But that won't change anythig for FTT competition as I need to verify replays and videos according to noRH rules. Same apply for no-shortcuts competitions. But for other competitions this would be great. :)

Quote from: Mark L. RiversHaving not a PHP host, I'm looking forward to see how the new tool could help me in order to make more automatic certain part of the ordinary job. This could mean SDR surviving in the future...  ::)
Change host. ;D Php automatically updated scoreboard is website admin dream come true. I don't have anything to do except adding points to pipsqueak's database at the end of each track (and enter news and new track in database too, but that's not really long).
When I compare this to the huge amount of time that WRC Stunts and IMSA Cup required to do daily updates, phew, hail to php ! :D
Title: Re: ReplayHandler v.0.1
Post by: Mark L. Rivers on November 18, 2008, 03:57:13 PM

Not the main problem... The real problem is the time to learn PHP language...  ::)

Title: Re: ReplayHandler v.0.1
Post by: Krys TOFF on November 18, 2008, 04:12:55 PM
Mmmm, not so long if you already know before xhtml. I started with MS Word docs converted in html, then wysiwyg web editors, then I started to learn xhtml.
Then, once having a decent xhtml basis, I started to learn php and it was much faster and easier to understand than I thought.
All I learnt was from this website and its online xhtml and php/css very well done tutorials : http://www.siteduzero.com Website is in French only, but they plan to do an English version sooner or later (probably later than sooner sadly).
Title: Re: ReplayHandler v.0.1
Post by: Duplode on November 19, 2008, 03:37:26 PM
OK, stupid problem with file paths solved, here you have the first functional alpha version. General instructions:


That's it - test, report, enjoy  ;)

Edit: replaced the (original) bugged build for one that should work.
Title: Re: ReplayHandler v.0.1
Post by: zaqrack on November 19, 2008, 03:54:03 PM
java class can not be loaded: java.lang.UnsupportedClassVersionError: duplode/stunts/ConsoleMenu
Title: Re: ReplayHandler v.0.1
Post by: Duplode on November 19, 2008, 04:12:03 PM
I should check my Linux Java JRE/JDK Setup...  ::) Anyway, rebuilt the .jar with Java 5.0 compliance. I tested it on my Windows, so this time there should be no problems... (new .zip attached on the original post)
Title: Re: ReplayHandler v.0.1
Post by: dstien on November 19, 2008, 07:54:40 PM
It runs fine here with 1.6.0.10. It throws an uncaught exception when trying to open a directory as a .RPL file. Sorry. :)
Title: Name-tracking Issues @ReplayHandler v.0.1
Post by: Duplode on November 22, 2008, 10:49:44 PM
Quote from: dstien on November 19, 2008, 07:54:40 PM
It throws an uncaught exception when trying to open a directory as a .RPL file. Sorry. :)

Thanks for calling my attention to it. That's really not surprising, as I had found that I actually was obliged to do something with the exceptions the night before! :D The next release will hopefully be a bit cleaner when facing such issues.

---

Currently I am beginning to study how to tackle more seriously the concept of off-line round management. As mentioned before, the limiting task for that from an user/contest manager perspective is how to assign a replay to a pipsqueak as unambiguously as possible. The pipsqueaks themselves would be defined as entities whose information can be stored in some simple database outside the program - that way, managers would only need to make use of addNewRäcer function once in the season, when the new pipsqueak takes part for the first time, and statistic-tracking and season standing computation schemes could eventually be implemented. Within the program, pipsqueaks will be mapped to their most recent replays for all purposes due. The question is by which means should we let the program perform the assignment? I can see a few basic alternatives:


Of course we could have multiple implementations, but I would really appreciate input from the managers on what seems to be the best approach in order to decide on which I should focus first. In case we should go for a filename based mechanism, the topic of file name standardization will inevitably show up, but that's better left for a future post...
Title: Re: Name-tracking Issues @ReplayHandler v.0.1
Post by: Mark L. Rivers on November 23, 2008, 02:19:49 PM
Quote from: Duplode on November 22, 2008, 10:49:44 PM
  • Directory based, manager-side: The folder storing the round replays would be a collection of subfolders, one named after each pipsqueak, from which the program would get the replays accordingly. A manager without php scripting would have to worry with downloading each replay to its proper folder. That is, however, much better than having to rename the replays, and does not rely on pipsqueak-side cooperation in any way. So that seems to be a good compromise solution.

Sure the best for me...  ;)