startdemos issues

qbism Super8 is a gritty software-rendering 3D engine based on Makaqu and other GPL Quake source code.
Post Reply
User avatar
Joel B
Posts: 8
Joined: Tue Jan 19, 2021 1:45 pm

startdemos issues

Post by Joel B » Tue Jan 19, 2021 10:53 pm

More questions and maybe bug reporting. FYI the reason I'm running across some of these things is that I'm investigating what it would take to make super8 work properly as a Quake engine launched by Quakestarter.

So, I've noticed a few things related to startdemo playback:

1. The "demos" command doesn't play any startdemos, and if any are currently running it terminates them. This is problematic for releases like DOPA or the DM4 Jam, which include an explicit "demos" command in quake.rc to get past the fact that Quakespasm normally won't run the startdemos.

2. The startdemos for Descent crash Super8 with nothing added to S8report.txt.

3. If a mod has startdemos, sometimes they don't loop. The condition to trigger this might be: "less than 3 startdemos" (edit: or not... see below). This seems to be because CL_NextDemo doesn't detect that it needs to reset demonum to 0, which in turn may be because the "clear demo list" loop in Host_Startdemos_f only clears out slots for the number of specified demos, rather than clearing out one more slot as a sort of terminator for the CL_NextDemo check to detect. I'm not sure why explicitly clearing out the slots is necessary here, since this code has changed from the original, but it looks suspicious.

Let me know if I should be dropping this sort of thing into GitHub issues. Or conversely if Super8 is all tied up and I should leave it alone. :-)
Last edited by Joel B on Fri Jan 22, 2021 7:37 pm, edited 1 time in total.

User avatar
Joel B
Posts: 8
Joined: Tue Jan 19, 2021 1:45 pm

Re: startdemos issues

Post by Joel B » Fri Jan 22, 2021 12:12 am

FWIW I tried nsoe2 again just now and the demos looped OK. I don't know yet if that part is a not-always-replicable thing, or if I was doing something else that triggered the issue. Will poke at it some more when I have time.

edit: did a little more experimenting with DOPA.

For all these tests, I removed the "demos" command from its quake.rc since that doesn't work as mentioned in item 1 above.

If there are 3 startdemos in quake.rc and I don't try to change that on the command line, it's fine. All three play and then loop.

If there are no startdemos in quake.rc and I set it to 2 demos on the command line, that also seems fine. Both demos play and then loop.

If there are 3 startdemos in quake.rc but I override that on the command line to set it to 2 demos, only the first one plays and then it stops.

So I'm still not exactly sure what the conditions are for seeing bad behavior around the startdemos playback, and the bug here may be a heisenbug that doesn't always act the same way, but there's definitely some bug. I don't have a Windows compiling environment at the moment so I can't test what might happen if I make that fix to Host_Startdemos_f ... maybe eventually.

(And no ideas yet about items 1 and 2.)

User avatar
func_qbism
Posts: 92
Joined: Tue Aug 04, 2015 1:51 pm
Contact:

Re: startdemos issues

Post by func_qbism » Sun Jan 24, 2021 11:51 am

IIRC there have to be the same quantity or more for overrides. If 3 startdemos in quake.rc, then 3 demos or more must be set on the command line. Not great behavior. Might be a reason or might have been reluctance to touch crusty code. Possibly the odd behavior is why Quakespasm disables by default.
Even considering legacy limitations, there may be a bug or some unsupported aspect of particular demo files.
Welcome to Rivendale, Mister Anderson.

User avatar
Joel B
Posts: 8
Joined: Tue Jan 19, 2021 1:45 pm

Re: startdemos issues

Post by Joel B » Sun Jan 24, 2021 9:57 pm

FWIW in Quakespasm (and related) engines, it does seem to work OK to specify some arbitrary number of startdemos on the command line.

Not a big deal though; I can special-case the handling of Super8 so that it doesn't have to do this. (Actually the only reason that I'm putting startdemos on the command line in some cases is part of some shenanigans that end up circumventing Quakepsasm's normal unwillingness to play them.)

Post Reply