Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heretic multiplayer demo playback (Fix for #1022) #1023

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mykola-ambar
Copy link

This PR adresses #1022, adding a command line switch that allows for demo playback in network mode.

The original Heretic executable crashes after 128
ticks of demo playback in network mode due to failed
network consistency checks for players 2-4. This commit
adds a switch to override this behaviour.
@chungy
Copy link
Contributor

chungy commented Apr 13, 2018

Thanks for the contribution but I have a few concerns:

  1. Vanilla compatibility

The behavior of the vanilla engine with multiplayer demos might be taken into consideration whether this patch makes sense. It's not a blocker (for example, we already have a working -timedemo where vanilla Heretic and Hexen are incapable), but if vanilla supports multiplayer demos, we ought to make sure we are fully compatible with it. If vanilla doesn't support it but the patch is this trivial, I think we can make a reasonable exception.

  1. Extra command line parameter

In my opinion, these demos should "just work" without needing an extra -netdemo parameter.

  1. Hexen support

Hexen probably requires a similar patch to this, would be nice to have it.

@mykola-ambar
Copy link
Author

IIRC The vanilla executable does not support multiplayer demos. I added a separate command line parameter to make sure the default behavior stays true to the expected vanilla behavior - but I can change it to be the default behavior if you want.
Hexen seems to have the same problem, I'll fix it there as well.

@mykola-ambar
Copy link
Author

I tested the vanilla v1.3 executable and it indeed does not support multiplayer demos (i wasn't 100% sure before). I've made the demos just work by default without needing the command line parameter.

I've also added some code to make the status bar correctly show the spectated player's stats, but I'm not sure if this change is "vanilla" enough for chocolate doom, what do you think?

@fragglet
Copy link
Member

It's a good question to be asking. I think there's genuine utility in being able to play back multiplayer demos, so it's worth adding. But it's also the case that vanilla Heretic can't play back multiplayer demos. We already have a framework for dealing with this kind of situation in the -strictdemos command line argument. So the correct way to do this is to gate the fix using the D_NonVanillaPlayback() function.

One other thing - please reduce the scope of this change to just fixing playback - it's not necessary to fix the status bar as well.

@Xindage
Copy link

Xindage commented Apr 18, 2018

i id like to have the executable of this PR with the statusbar bar update if possible, so my friend can properly record our cooperative speedrun so people can see my hp and ammo too.

@jmtd
Copy link
Contributor

jmtd commented Apr 18, 2018

The status bar fix should be raised as a separate issue so it can be discussed there.

rfomin pushed a commit to rfomin/chocolate-doom that referenced this pull request Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants