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

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.

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

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
×