Demo Data: TWO WARNINGS!!!
Posted: 2009.04.03 (19:22)
I'll try to keep this post short. I have been doing a lot of experimenting with demo data recently, and I have discovered that people can edit demos by cutting frames off the end of them which makes demos a few frames faster and look legitimate but actually are not. This could have disastrous consequences for all competitions in which submissions are done by posting demo data, and I want to highlight this problem.
The problem is that: suppose you take a demo and use demo editing techniques to take the last few frames off. Now you load it along with the map data in the box in userlevels, and play it. Now the demo plays as usual, and when the end-point is reached, something notable happens. The demo continues to be played as if the ninja were to do nothing. Since this is only for the last few frames, the ninja almost always reaches the exit, regardless of what happens. So the run looks legitimate, even though frames have been taken off. The problem? When the demo end-point is reached, THE CLOCK STOPS while the demo continues playing. So the time reached at the end when the ninja reaches the exit is a few milliseconds higher than what it should be.
Let's illustrate the potential problems with an example. I will use the fbf'd demo posted by bhz in the "Post a run!" for 121027, simply because it makes the number-crunching easier. This is his demo:
32:202116108|12632256|202116108|12632256|3084
If you load this into the box in userlevels, you will find that the ninja reaches the exit with a time of 89.200. This is consistent with the number of frames in the demo.
Now suppose that this level were being used for a contest where people submit their demo data. Suppose someone submits this demo which has been trimmed by FOUR whole frames:
28:202116108|12632256|202116108|12632256
(I know that it's fbf so can't be used for a contest, but that's beside the point here.) If you load this and watch it, it does look like the ninja reaches the exit. The ninja does reach the exit, BUT only because after the demo end-point it does nothing for the next few frames, and its upward velocity is enough to get it to reach the exit. However, THE CLOCK STOPS before the ninja reaches the exit, so the time appears to be 89.300, which is also consistent with the frame count, so it looks legitimate. So it does seem that someone managed to do a 28-frame demo on this level, which is impossible - it is just that demo editing has been used to chop frames off.
Now suppose we stick some extra frames onto the end.
35:202116108|12632256|202116108|12632256|0
Here the ninja reaches the exit in 33 frames, the last 5 of which were spent doing nothing. The timer, however, continues for the full 35 frames to 89.125; but we see that at the top left, the frame counter says "35f 33f", indicating that this was actually a 33-frame demo. This is a way of checking whether a demo has had frames cut off, like the one above.
The point of all this is that I am warning anyone whose contest involves posting demo data about the dangers of demo editing to achieve "better" times by stopping the clock. You will never know whether a demo has had such treatment done to it just by looking at it. In particular this may affect very greatly competitions such as golfkid's "The Time Is Right" where a single frame means everything. It would be muhc better to, for example, ask that a link be posted instead of demo data to prevent this problem. Of course, at the moment people trust each other here not to do these things, but I am highlighting a potential problem just in case someone decides to do this.
Wow... what a loooooooooooooooooooooooooong post!
The problem is that: suppose you take a demo and use demo editing techniques to take the last few frames off. Now you load it along with the map data in the box in userlevels, and play it. Now the demo plays as usual, and when the end-point is reached, something notable happens. The demo continues to be played as if the ninja were to do nothing. Since this is only for the last few frames, the ninja almost always reaches the exit, regardless of what happens. So the run looks legitimate, even though frames have been taken off. The problem? When the demo end-point is reached, THE CLOCK STOPS while the demo continues playing. So the time reached at the end when the ninja reaches the exit is a few milliseconds higher than what it should be.
Let's illustrate the potential problems with an example. I will use the fbf'd demo posted by bhz in the "Post a run!" for 121027, simply because it makes the number-crunching easier. This is his demo:
32:202116108|12632256|202116108|12632256|3084
If you load this into the box in userlevels, you will find that the ninja reaches the exit with a time of 89.200. This is consistent with the number of frames in the demo.
Now suppose that this level were being used for a contest where people submit their demo data. Suppose someone submits this demo which has been trimmed by FOUR whole frames:
28:202116108|12632256|202116108|12632256
(I know that it's fbf so can't be used for a contest, but that's beside the point here.) If you load this and watch it, it does look like the ninja reaches the exit. The ninja does reach the exit, BUT only because after the demo end-point it does nothing for the next few frames, and its upward velocity is enough to get it to reach the exit. However, THE CLOCK STOPS before the ninja reaches the exit, so the time appears to be 89.300, which is also consistent with the frame count, so it looks legitimate. So it does seem that someone managed to do a 28-frame demo on this level, which is impossible - it is just that demo editing has been used to chop frames off.
Now suppose we stick some extra frames onto the end.
35:202116108|12632256|202116108|12632256|0
Here the ninja reaches the exit in 33 frames, the last 5 of which were spent doing nothing. The timer, however, continues for the full 35 frames to 89.125; but we see that at the top left, the frame counter says "35f 33f", indicating that this was actually a 33-frame demo. This is a way of checking whether a demo has had frames cut off, like the one above.
The point of all this is that I am warning anyone whose contest involves posting demo data about the dangers of demo editing to achieve "better" times by stopping the clock. You will never know whether a demo has had such treatment done to it just by looking at it. In particular this may affect very greatly competitions such as golfkid's "The Time Is Right" where a single frame means everything. It would be muhc better to, for example, ask that a link be posted instead of demo data to prevent this problem. Of course, at the moment people trust each other here not to do these things, but I am highlighting a potential problem just in case someone decides to do this.
Wow... what a loooooooooooooooooooooooooong post!