News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

New replay upload

Started by dreadnaut, January 11, 2015, 12:31:21 AM

Previous topic - Next topic

zaqrack

Quote from: dreadnaut on January 12, 2015, 01:24:54 AM
That's some professional testing, thanks!

So, things to fix tomorrow:

  • don't accept incomplete replays, crashing or not (this will be partial anyway, as there is no way to tell whether the lap is actually complete, or the pipsqueak just stood still)
  • don't accept replays with a car not used in the current season
This is the last day of public replays, so from tomorrow you should be able to choose between "public replays" or "scoreboard only".

Nice progress!
The first one is not a problem I guess. If someone stands still at the end that probably means an unfinished replay anyhow... so you can safely filter on the usual ending code.
Cars should be filtered for sure.

As for the incoming email, I have checked and it looks excellent with very useful data within :)

I have only one comment:

It is hard to find the latest / fastest replayes on the public replays page on the website. I assume replays are sorted in chronological order, but it is hard to identify whether it is per-row or per column. It would be good to display the submission date/time and possibly add sorting filters to the page. Maybe also highlight replays which are currently on the scoreboard. The latter would also be very helpful for legacy tracks - final replays are easily identifiable and accessible.






dreadnaut

A few fixes have gone up:
  • only seasonal cars are allowed
  • additional check for the track name, not only the track contents
The latter means that a replay on DEFAULT will not be valid for ZCT999. This is a bit annoying for the specific case, but in general should be ok. The reason for the check is that if we allow for any name, we might end up with replays giving those "Please insert disk 'B'" errors.

I haven't fixed the "incomplete replay" issue, and I'm not sure I can — see other thread.

Duplode

Quote from: dreadnaut on January 12, 2015, 11:05:12 PM
A few fixes have gone up:
  • only seasonal cars are allowed
  • additional check for the track name, not only the track contents

Both checks work. Optional public replays are OK as well.

dstien

Quote from: dreadnaut on January 12, 2015, 11:05:12 PM
I haven't fixed the "incomplete replay" issue, and I'm not sure I can — see other thread.

Could a "repldump-as-a-service" be of interest? Submit a replay + car tuning and get back exact finish time/DNF + penalty time and possibly other interesting statistics. The downsides are that restunts only targets BB1.1 for now, and this would maybe convolute your code, especially if the latency is so high that results would have to be delivered asynchronously.

CTG

Quote from: dstien on January 13, 2015, 12:15:01 PM
other interesting statistics

Like in the old RPLInfo? I mean the number of different keypresses (accelerate, brake, shifting, etc.).

Duplode

Quote from: dstien on January 13, 2015, 12:15:01 PM
Quote from: dreadnaut on January 12, 2015, 11:05:12 PM
I haven't fixed the "incomplete replay" issue, and I'm not sure I can — see other thread.

Could a "repldump-as-a-service" be of interest? Submit a replay + car tuning and get back exact finish time/DNF + penalty time and possibly other interesting statistics. The downsides are that restunts only targets BB1.1 for now, and this would maybe convolute your code, especially if the latency is so high that results would have to be delivered asynchronously.

That might be pretty cool. Unfortunately there is the issue of PG laps with screwy endings (the ones you need to rewind and fast-forward a few times until they play correctly).

dreadnaut

Quote from: dstien on January 13, 2015, 12:15:01 PM
Could a "repldump-as-a-service" be of interest?

It would be extremely cool, but I think we can do with basic checks for the replay upload. After all, there have been no check for years ;)

dreadnaut

Quote from: zaqrack on January 12, 2015, 08:52:28 AM
It is hard to find the latest / fastest replayes on the public replays page on the website.

The list was made for optional replays, so I was expecting about a dozen entries —and it wasn't very good.

So I converted the page to a nice table listing all the results ;D



dstien

Quote from: CTG on January 13, 2015, 12:36:29 PM
Quote from: dstien on January 13, 2015, 12:15:01 PM
other interesting statistics

Like in the old RPLInfo? I mean the number of different keypresses (accelerate, brake, shifting, etc.).

No magic needed for that, it's already available in the RPL file. Was thinking more about driving metrics.

Quote from: Duplode on January 13, 2015, 05:02:04 PM
Quote from: dstien on January 13, 2015, 12:15:01 PM
Quote from: dreadnaut on January 12, 2015, 11:05:12 PM
I haven't fixed the "incomplete replay" issue, and I'm not sure I can — see other thread.

Could a "repldump-as-a-service" be of interest? Submit a replay + car tuning and get back exact finish time/DNF + penalty time and possibly other interesting statistics. The downsides are that restunts only targets BB1.1 for now, and this would maybe convolute your code, especially if the latency is so high that results would have to be delivered asynchronously.

That might be pretty cool. Unfortunately there is the issue of PG laps with screwy endings (the ones you need to rewind and fast-forward a few times until they play correctly).

Ah, I have a vague memory of seeing something like that. Do you remember any specific replays? Would like the figure out what's causing this.

Quote from: dreadnaut on January 13, 2015, 07:57:30 PM
Quote from: dstien on January 13, 2015, 12:15:01 PM
Could a "repldump-as-a-service" be of interest?

It would be extremely cool, but I think we can do with basic checks for the replay upload. After all, there have been no check for years ;)

If it's not broken, break it. ;D

I hacked together a flaky prototype by sandboxing DOSBox:

$ curl -F replay=@FINSHESC.RPL http://api.stunts.no/v0/replayinfo
{
    "finished":       "yes",
    "totalTime":      "1:59.15",
    "drivingTime":    "1:59.15",
    "penaltyTime":    "0:00.00",
    "avgSpeedMph":    86.43,
    "avgSpeedKph":    139.10,
    "topSpeedMph":    157.50,
    "topSpeedKph":    253.47,
    "impactSpeedMph": 0.00,
    "impactSpeedKph": 0.00,
    "jumps":          5
}

$ curl -F replay=@PENALTY.RPL http://api.stunts.no/v0/replayinfo
{
    "finished":       "yes",
    "totalTime":      "4:27.80",
    "drivingTime":    "1:03.80",
    "penaltyTime":    "3:24.00",
    "avgSpeedMph":    60.98,
    "avgSpeedKph":    98.14,
    "topSpeedMph":    117.91,
    "topSpeedKph":    189.75,
    "impactSpeedMph": 0.00,
    "impactSpeedKph": 0.00,
    "jumps":          0
}

$ curl -F replay=@CRASHED.RPL http://api.stunts.no/v0/replayinfo
{
    "finished":       "crashed",
    "totalTime":      "DNF",
    "drivingTime":    "0:15.95",
    "penaltyTime":    "0:00.00",
    "avgSpeedMph":    80.63,
    "avgSpeedKph":    129.77,
    "topSpeedMph":    128.80,
    "topSpeedKph":    207.29,
    "impactSpeedMph": 128.52,
    "impactSpeedKph": 206.84,
    "jumps":          1
}

$ curl -F replay=@ABORTED.RPL http://api.stunts.no/v0/replayinfo
{
    "finished":       "aborted",
    "totalTime":      "DNF",
    "drivingTime":    "0:15.15",
    "penaltyTime":    "0:00.00",
    "avgSpeedMph":    72.46,
    "avgSpeedKph":    116.61,
    "topSpeedMph":    111.35,
    "topSpeedKph":    179.20,
    "impactSpeedMph": 0.00,
    "impactSpeedKph": 0.00,
    "jumps":          1
}

$ curl -F replay=@z128/01duplode.RPL http://api.stunts.no/v0/replayinfo
{
    "finished":       "yes",
    "totalTime":      "1:44.00",
    "drivingTime":    "1:44.00",
    "penaltyTime":    "0:00.00",
    "avgSpeedMph":    167.16,
    "avgSpeedKph":    269.02,
    "topSpeedMph":    245.00,
    "topSpeedKph":    394.29,
    "impactSpeedMph": 0.00,
    "impactSpeedKph": 0.00,
    "jumps":          27
}

zaqrack

Quote from: dreadnaut on January 13, 2015, 10:35:08 PM
Quote from: zaqrack on January 12, 2015, 08:52:28 AM
It is hard to find the latest / fastest replayes on the public replays page on the website.

The list was made for optional replays, so I was expecting about a dozen entries —and it wasn't very good.

So I converted the page to a nice table listing all the results ;D
looks cool now :)

Duplode

Quote from: dstien on January 14, 2015, 01:53:57 AM
Quote from: Duplode on January 13, 2015, 05:02:04 PM
That might be pretty cool. Unfortunately there is the issue of PG laps with screwy endings (the ones you need to rewind and fast-forward a few times until they play correctly).

Ah, I have a vague memory of seeing something like that. Do you remember any specific replays? Would like the figure out what's causing this.

I just noticed that this issue is not an obstacle. Somehow the replay only screws up when you watch it in-game. In fact, even loading from the option menu produces correct results. In any case, here is an affected replay from Z151. In my experience, the bug tends to be triggered by sharp PG turns like the one at ~25s. Your prototype handles it beautifully:


curl -F replay=@Personal/Software/BBst11/c2014/zsc/ZF1INL3.RPL http://api.stunts.no/v0/replayinfo
{
    "finished":       "yes",
    "totalTime":      "1:07.15",
    "drivingTime":    "1:07.15",
    "penaltyTime":    "0:00.00",
    "avgSpeedMph":    215.98,
    "avgSpeedKph":    347.59,
    "topSpeedMph":    252.29,
    "topSpeedKph":    406.03,
    "impactSpeedMph": 0.00,
    "impactSpeedKph": 0.00,
    "jumps":          15
}

dreadnaut

Argh, I'm so tempted to add it right now :D
I'll wait for a race or two though, to see if the current code works alright. In the meanwhile, I'll try to use it for the RPLinfo page! Thanks again, dstien!


In the meanwhile, more changes are up: for Zak, a few administration buttons to make his life easier; for everyone else... a secret feature that will appear in about an hour! ;)

Also added a check for duplicate replays, in case someone refreshes the submit page or something like that.


Shoegazing Leo

But the system accepted the irregular lap (without finish) again. The rpl info, durind the process, recognize the non-finished lap. This is the way.

dreadnaut

#29
I added the check, but there are incomplete replays that still pass anyway. In the future we'll use dstien replay-replayer which will not fail :D

Zak, question! At the moment I am not storing replays that are sent as "public", but this means that you would still have to go and find them in the mail. Do you want me to store all replays in the database? (compressed, they are tiny!)