Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
NaturalTvventy

Play multiple demos continuously

Recommended Posts

Is there a source port that will automatically play back a series of demos, one after the other? I have an episode's worth of demos and would like to be able to play them continuously.

Share this post


Link to post

Couldn't it be done by a batch script (with parameters)? The script would launch a port to play a demo (whose file name was given by the script's first parameter), wait until the port is closed, then launch it again with another demo (given by the script's second parameter), and so on.

Share this post


Link to post
Linguica said:

If you want to play precisely 3 demos in a loop forever, have I got good news for you...

I have even better news, you can even play 4 demos in an everlasting loop.

Share this post


Link to post

If you create a batch file, simply enter the command on a new line. The batch will run doom playing back the demo, then when the demo is complete and doom exits, it will immediately proceed to the next line and play the demo afterwards.

Prboom-plus is the only source port I tested with this.

Share this post


Link to post

Honestly I was half-expecting PRBoom+ to support an arbitrary number of DEMO* lumps (well, up to 9999 I suppose...)

There's a feature request for a source port I guess.

Share this post


Link to post

I think mrcrispy once mentioned that Odamex has this feature, but I could be wrong. Would make an excellent feature in PrBoom regardless.

Share this post


Link to post

Doomsday did offer such a feature in it's console (I think I state this almost every time a thread comes up about demo playback, as Dday's features often go unnoticed :p); I remain very surprised PRBoom+ doesn't seem to offer such a feature considering it's defacto choice for demo recording.

But Dday uses a non standard demo format that was disabled in the fair past now, due to other elements of the engine being worked on. (as I imagine the feature is still there, just, well, disabled).

Share this post


Link to post
scifista42 said:

Couldn't it be done by a batch script (with parameters)? The script would launch a port to play a demo (whose file name was given by the script's first parameter), wait until the port is closed, then launch it again with another demo (given by the script's second parameter), and so on.

Yeah but if you quit Doom, it will restart with the next demo, and so on until you quit Doom for all demos. Sure you probably can task-kill the batch script somehow, assuming you can get out of fullscreen Doom, which is not easy or clean with all ports and all OS.

Share this post


Link to post

The console could prompt the user to press Enter to play the next demo after finishing playing each demo, which is some effort, but a minimal one. Or even play the next demo if he simply pressed Enter, or quit if he typed "q", or replay the previous demo if he typed "r", or play a demo on n-th position on the list if he typed a number, and so on. The effort to continue playing the given list of demos would still be minimal, and yet possibilities would be quite flexible.

Share this post


Link to post
printz said:

Yeah but if you quit Doom, it will restart with the next demo, and so on until you quit Doom for all demos. Sure you probably can task-kill the batch script somehow, assuming you can get out of fullscreen Doom, which is not easy or clean with all ports and all OS.


Make a batch/script file that plays demos, but check the return code from the engine you're using. Then, when you want to quit, you make the game exit with an error somehow so that the port you're using will pass -1 instead of 0 as the exit code to the OS. You can do this by eg. creating a broken savegame that you'll load when you want to quit. For PrBoom+, just create an empty file called prboom-plus-savegame#.dsg in the correct directory/folder.

Here's a batch file I just tested this with in Windows with PrBoom+:

@echo off

:loop
 prboom-plus -iwad ..\..\IWAD\doom2.wad -playdemo demo1
 if %ERRORLEVEL% equ -1 goto quit
 goto loop

:quit
It keeps playing demo1 until I load the first savegame.

Share this post


Link to post

^ That's either a massive hack or something which requires voluntary modification of the source code. So not good enough.

Share this post


Link to post
printz said:

either a massive hack or something which requires voluntary modification of the source code


True. Still, it's something that could work for the OP if he needs to do this right now without modifying any port code or waiting for someone else to do it for them.

Also -timedemo and -fastdemo exit with I_Error (so you could use the errorlevel check in reverse since a normal exit via the menu would return 0), too bad that -playdemo does not. :(

EDIT: in ZDoom and related ports I guess you could probably do this via scripting? But then you can only play back ZDoom demos (and reliably only from the exact same version)

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
×