Jump to content

Playing longtics demos in original doom2.exe


Recommended Posts

I made a small DOS tool that lets you play longtics demos in normal doom2.exe 1.9 (or doom.exe 1.9 as well, I would imagine). It is a minor edit to fraggle's https://www.doomworld.com/idgames/utils/misc/ctrlapi that just reads 5 bytes per tic rather than 4.

 

I made this because of various arguments I have seen / participated in over the years regarding the diminished turning resolution in vanilla Doom while recording, and whether using -longtics is "cheating" somehow. This is just to show that it is 100% possible to play back a longtics demo in normal doom2.exe without resorting to EXE patches or anything.

 

I imagine it would also be possible to write a similar program to *record* a longtics "demo" in pure doom2.exe by passing your input through the same external control API and just saving it in the proper format from the external program rather than by using -record, but I can't be bothered.

 

longtics.zip

Share this post


Link to post

Very nice.

 

With regards to recording a longtics demo. You obviously have the problem that Doom is listening for input as well, so you have to stop it somehow otherwise you'll get double input. I guess you could automatically rewrite default.cfg, to rebind every key to something else and disable the mouse, then do all the key and mouse input handling in the control driver interrupt handler (if that is even possible!?).

 

My other wacky idea for recording longtic demos is this: The Doom network drivers (IPXSETUP and SERSETUP) work in a similar way to the control driver, except their interrupt gets called with a ticcmd, which contains the console player's input. So you could write a modified network driver that launches a single node game, stores each ticcmd in a buffer, then writes it to a demo file at the end of the game.

 

The problem with this is, there are extra map things in co-op only. But you could modify the IWAD to remove these, making it the same in co-op as single player.  The only question then is any of the other changes that occur from co-op play would result in different RNG that would cause the resulting demo to desync. Probably they would, but it could be worth a try.

Edited by Jonathan

Share this post


Link to post
24 minutes ago, Jonathan said:

The problem with this is, there are extra map things in co-op only. But you could modify the IWAD to remove these, making it the same in co-op as single player. 

There are other things as well, like the fact that if you die you restart without the level resetting. Maybe that's an issue. In general though if you have to start modifying stuff then maybe it's easier to just use the Doom 1.91 modified .exe. It's still nice to be able to play back without it though.

Share this post


Link to post

While my knowledge about DOS interrupt vectors is nonexistent, couldn't an external control API program just read out the ticcmd_t structure each tic and save it? Surely given the fact that DOS has no memory protection whatsoever, the fact that an external program could write to the memory address means it could read from that same address? Or is the external control API called *before* the engine goes through the logic for the normal internal input handling for that tic?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...