Sign in to follow this  
Followers 0

Count the "real" playing time of a demo

So at the latest First-try Demo Contest I encountered the old problem again: in multi-level demos with deaths it seems like there is no easy way to count the "real" playing time (as opposed to the full demo time, which includes intermission screens, story texts, etc). I guess noone tried to do anything about it simply because demos with the player restarting a level aren't really common, or at least usually there is no interest in counting the "true" playing time of such demos. But now that we have multi-level First-try Demo Contests, such information becomes more interesting.

So I realise that this is a really long shot, but if someone made a tool that could examine a demo and display such information as:

- "real" playing time excluding intermissions, etc
- time spent on each map
- maybe even the time spent on each attempt? (an attempt is one go at a level, either successful or not)

that would be really great. :D I know that Opulent is working on a prboom-plus demo analyzer thing, maybe he could do it? o,o

Share this post


Link to post

IIRC, Olivera's prtas package, my single-player Prboom-plus2513 package, and Dark Friday's df=timer did some of what you ask.

I hope this is closer to what you were looking for.

http://www.mediafire.com/download/woxlsl12fq5jlj2/deaths-prboomplus2513-opulent.zip



example of output:

Actual totals in static map:
Map 1 Total of monsters 27 items 9 secrets 5
Map 2 Total of monsters 90 items 20 secrets 1

gameepisode, gamemap, gameskill 1 1 3
gameepisode, gamemap, gameskill 1 1 3
gameepisode, gamemap, gameskill 1 2 3
gameepisode, gamemap, gameskill 1 2 3
gameepisode, gamemap, gameskill 1 2 3


Time(sec) Death/Exit Gametic Monsters Resurrected Items Secrets Health

Total demo time: 0:10.48

367 PlayerReborn 0 0 0 0
10 gametic 366 1 0 0 0 health -14 coord 20646876 107999882
0:10.48 :: Sloppy delta guess since last Death/Exit action


Total demo time: 0:21.48

738 EXIT 0 0 0 0
10 gametic 737 0 0 0 0 health 75 coord 66227447 78465992
0:10.60 :: Sloppy delta guess since last Death/Exit action


Total demo time: 0:34.77

1217 PlayerReborn 0 0 0 0
11 gametic 1216 1 0 0 0 health 0 coord 81787503 81920700
0:13.68 :: Sloppy delta guess since last Death/Exit action


Total demo time: 2:35.31

5436 PlayerReborn 0 0 0 0
120 gametic 5435 49 0 9 1 health 0 coord 94688539 39749124
2:00.54 :: Sloppy delta guess since last Death/Exit action


Total demo time: 4:41.45

9851 EXIT 65 0 9 1
126 gametic 9850 65 0 9 1 health 55 coord 49270293 105703127
2:06.14 :: Sloppy delta guess since last Death/Exit action




9851 :: end of demo gametic
0:00.0 :: Time since last Death/Exit event.

Share this post


Link to post

Wow, that was very kind of you! Thanks a lot Opulent!

I tested it a little. It seems that the intermission screen time after MAP X adds up to the time of the first attempt on MAP X+1? For example, in fdc12Chaingunner.lmp from FDC12:
- the output shows 9:28.40 after MAP02 exit even though the intermission screen shows 9:27.
- the output shows that the first attempt on MAP03 lasts 0:38 but it's actually 0:35 (I rechecked with the HUD).
- the time of the first attempt on MAP04 seems off by a second as well.

So basically, in multi-level demos the time of the first attempt is determined correctly only for the first map: on the subsequent maps it seems to include the time spent on the previous intermission screen. Do you think this could be fixed? Of course I'm already very grateful for what you did, but just in case you want to work this a little more... :)

By the way, what is "df=timer"? I couldn't find any info about it.

Share this post


Link to post

Thanks for saying, and I'm glad you liked it.

Bjorn Hamels' fancy, enhanced version of timer.exe. As Andy says, it is kind of OBE with Prboom-plus around, but timer and df=timer were useful in many ways. It was never publicly released.

I only spent an hour or two on it last night. Yeah, now that it isn't the middle of the night, I see it more clearly. :)
Each map starts with a new gametic counter(obviously). I was just being lazy. I'll change the seconds integer value back to the timed-gametic value and it should give what you originally asked for.
This will fix the addition of the intermission screen time, but I'm not fixing the death idle time(unless you want a linux parser instead of the clunky batch scripting for Windows).

Some little details: the gameskill integer is from the code, so it is 0-4 not 1-5. (that is, when it says Skill 3, it is Ultra-Violence)
If not obvious, the (Monsters Killed/Monsters Resurrected/Items/Secrets) count is correct. In the example above, you'll see that DOOM2 Map02 has 90 monsters in the map. In the first Map02 attempt, the player only kills 1 monster, in the second attempt, he only kills 49 monsters, and the third attempt(which exits the map -- note the EXIT and not PlayerReborn) he kills 65. I think that's pretty cool.

Oh, and lastly, I improved the speed considerably.

http://www.mediafire.com/download/u2lr65kh56zf724/deaths-prboomplus2513-opulent-version2.zip

Share this post


Link to post

If I understand correctly, with "real,real" times, in multiple level contests you should encourage participants not to spend too much time watching the intermission screens "rethinking the level", stating that in the rules.

Share this post


Link to post

Very nice work Opulent, this is now an excellent tool for quick analysis of multi-level demos! And this Sunday it will come in very handy already. :) Now preparing the results will be so much easier.

vdgg: Of course we don't expect the contestants to eat or discuss the strategy between the levels (like Henning did or so I've heard :-) but just a few seconds when you know that your time isn't counting can do a lot already.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0