Zilch Posted March 25, 2022 Why can't we have the usual demos in GZ/LZDoom that work on Crispy and Chocolate Doom? I have heard that the actual demo format is different, but surely the developers can implement it with a simple on-off toggle switch (if only programming were that easy)? Not sure if this should be here or in Source Ports... mods? 0 Quote Share this post Link to post
jaeden Posted March 25, 2022 Demo files contain only player input, while other things happening in the game (in vanilla/crispy/chocolate) are deterministic in the same way. GZ/LZDoom has different game logic, physics and architecture. If you theoretically ran an usual demo in them, they would immediately desync. 10 Quote Share this post Link to post
Gez Posted March 25, 2022 (edited) On 3/25/2022 at 6:34 PM, Zilch said: (if only programming were that easy) Expand Indeed. Demos are extremely sensitive to even the smallest, most irrelevant-seeming changes. Keep in mind that the basic principles is that they only record player input, and everything else has just to be played back from scratch. The demo doesn't record how Timmy the Imp and Chuck the Chaingunner behave, they just happen to react how they would react to the player's actions. Same causes leading to same effects, if the engine is unchanged, the demo plays back exactly the same. If there's even a tiny, minute change, the demo desyncs. And in GZDoom, there are a lot of under-the-hood changes that makes playing back Doom demos impossible. For example, instead of fixed point coordinates, it uses floating point. Just this is enough to make all the movement computations slightly different enough to make sure that vanilla/Boom/MBF demos cannot play back. Basically, the only way to make vanilla demos play back correctly in GZDoom would be to basically add a copy of the engine, let's say the DSDA gamesim code, and use this one instead of the GZDoom gamesim code while playing demos. A big cheat. Edited March 25, 2022 by Gez 30 Quote Share this post Link to post
Zilch Posted March 25, 2022 Thanks, Gez! This makes sense. Unfortunate for GZDoom, but not a real dealbreaker. 0 Quote Share this post Link to post
roadworx Posted March 25, 2022 yeah, unfortunately gzdoom is more or less an entirely separate engine from the original doom engine, unlike something like boom which is just the original engine but improved. demos just aren't possible with that 4 Quote Share this post Link to post
Astronomical Posted March 25, 2022 -Record still works in g/l/zdoom but demos break between versions so no one uses it. 0 Quote Share this post Link to post
Maribo Posted March 25, 2022 On 3/25/2022 at 9:04 PM, Astronomical said: -Record still works in g/l/zdoom but demos break between versions so no one uses it. Expand Floating points also make it so that a demo that plays back on one piece of hardware is not guaranteed to play back on a different set of hardware. 7 Quote Share this post Link to post
Graf Zahl Posted March 25, 2022 On 3/25/2022 at 9:20 PM, Maribo said: Floating points also make it so that a demo that plays back on one piece of hardware is not guaranteed to play back on a different set of hardware. Expand No, not correct. We did some thorough testing with this - all the currently relevant CPU architectures (that's x86, ARM and PPC) produce the same result for basic math operations (i.e. addition/multiplication/division) and for the functions that did not, use custom implementations. 11 Quote Share this post Link to post
Maribo Posted March 25, 2022 On 3/25/2022 at 9:49 PM, Graf Zahl said: No, not correct. We did some thorough testing with this - all the currently relevant CPU architectures (that's x86, ARM and PPC) produce the same result for basic math operations (i.e. addition/multiplication/division) and for the functions that did not, use custom implementations. Expand My mistake then, sorry for the outdated misinformation! 3 Quote Share this post Link to post
Wadmodder Shalton Posted March 25, 2022 ZDoom-based source ports never had any true backwards compatibility for any early demos recorded for earlier versions of ZDoom. 1 Quote Share this post Link to post
Gez Posted March 25, 2022 And vanilla never had any true backwards compatibility for any early demos recorded for earlier versions of vanilla. Try playing a v1.666 demo in v1.9. 4 Quote Share this post Link to post
Redneckerz Posted March 25, 2022 (edited) Its not like the very nature of GZDoom (Being mod-friendly) goes against the very question people tend to ask for it (demo replay). For it to be the Doom-like engine it is today that actually gets used in commercial games, something had to give. Quote Why can't we have the usual demos in GZ/LZDoom that work on Crispy and Chocolate Doom? Expand Its core gameplay loop is completely different. GZDoom at this point is an engine with roots in Doom, but otherwise completely suited towards modding and far less towards demo compatiblity. Quote I have heard that the actual demo format is different, but surely the developers can implement it with a simple on-off toggle switch (if only programming were that easy)? Expand If that were the case then GZ would have had a fork that did this. On 3/25/2022 at 10:00 PM, Wadmodder Shalton said: ZDoom-based source ports never had any true backwards compatibility for any early demos recorded for earlier versions of ZDoom. Expand The best bets are ZDoom 1.22/1.23b33 demos and 2.8.1 demos as that's somewhat fixed. Recent resurgents like ZZDoom and RZDoom may or may not keep demo-compat relatively safe aswell. Edited March 25, 2022 by Redneckerz 2 Quote Share this post Link to post
xX_Lol6_Xx Posted March 25, 2022 Afaik the only ZDoom based port that has vanilla demo support (1.9 demos that is) is Odamex, and even then, it has happened to me that some demos desync when played pack in it. Also, I remember reading somewhere that demo compatibility wasn't a ZDoom priority, even in the old days. Can't remember exactly where though An alternative for screen title demos, if I remember correctly, would be through scripting a titlemap. I think Knee Deep in ZDoom uses this. But for demo recording you're better using a vanilla compatible port, for example, Prboom-plus or Woof!. 0 Quote Share this post Link to post
LexiMax Posted March 26, 2022 (edited) On 3/25/2022 at 10:33 PM, Lol 6 said: Afaik the only ZDoom based port that has vanilla demo support (1.9 demos that is) is Odamex, and even then, it has happened to me that some demos desync when played pack in it. Expand Even that has a big asterisk beside it. ZDoom 1.22 (the port Oda was based on) came out last century, and although it has a ZDoom-style console and options menu, very little about its internals resembles modern GZDoom. If we see a feature from a modern ZDoom we like, we pilfer or recreate just that feature, as opposed to backporting entire point releases. I'm honestly not really sure how much further forwards you could go in ZDoom versions from 1.22 before vanilla demo support became nearly impossible. Edited March 26, 2022 by AlexMax 2 Quote Share this post Link to post
Edward850 Posted March 26, 2022 On 3/25/2022 at 10:24 PM, Gez said: And vanilla never had any true backwards compatibility for any early demos recorded for earlier versions of vanilla. Try playing a v1.666 demo in v1.9. Expand This was true until now, where the current version of v1.11 has compatibility handling for 1.9 demos. 0 Quote Share this post Link to post
MFG38 Posted March 27, 2022 Seeing this thread reminds me of another one from a while back where someone brainstormed some ideas for a universal sort of demo format - I believe it was Fraggle? Would be interesting to see such a thing happen, provided it's even practically achievable. 0 Quote Share this post Link to post
Calinou1 Posted August 31, 2022 (edited) Sorry for the bump, but I was thinking about this a few weeks ago. I was wondering if there's been any efforts towards recreating the demos from scratch in two ways: Write a tool that converts vanilla demo lumps to ZDoom demos. This is only possible if ZDoom demos store positions instead of actions (like Quake demos), which I don't think is the case. Nonetheless, I'm putting this here just in case :) Replay the demos while looking at the originals and trying to mimic them closely. As silly as it may sound, this may be the easiest avenue to get something that looks like the original (even if it's not). This means taking the same route, picking up the same items, killing the same monsters and dying at the same spot. It makes sense to use vanilla compatibility settings for this purpose, although I don't know if that can mess with demo compatibility for future GZDoom versions. A community effort could be used to organize this for all the IWADs out there (including shareware/demo IWADs if people really feel like it). I wonder if a similar approach could be used for Raze – does it support any form of demo recording and playback? Edited August 31, 2022 by Calinou1 0 Quote Share this post Link to post
Shepardus Posted August 31, 2022 Trying to "mimic" demos by sight has the same problem as actually playing them back, namely that any small difference in behavior cascades into more differences. Say a monster decided to walk a different direction, or decides to attack at the wrong time. Then another monster ends up blocked by that monster, or hit by the errant attack, and it too veers off course. Before long you have a completely different situation from the demo you were trying to imitate. 3 Quote Share this post Link to post
Murdoch Posted August 31, 2022 On 8/31/2022 at 9:46 PM, Shepardus said: Trying to "mimic" demos by sight has the same problem as actually playing them back, namely that any small difference in behavior cascades into more differences. Say a monster decided to walk a different direction, or decides to attack at the wrong time. Then another monster ends up blocked by that monster, or hit by the errant attack, and it too veers off course. Before long you have a completely different situation from the demo you were trying to imitate. Expand Precisely. A single tic off and you will almost certainly have a cascade of failure. The problem is not the instructions contained in the demo file but the variability within the engine itself. So "converting" won't actually do anything. Given any number of other ports exist with better backwards compatibility, the value of saddling GZDoom with this significant workload for dubiously small gain is limited. I cannot overstate enough the sheer volume of work you are asking for @Calinou1. On 3/25/2022 at 6:46 PM, Gez said: Timmy the Imp and Chuck the Chaingunner Expand If that is not the perfect setup for a wacky sitcom set in the Doom universe I do not know what is. I can already hear the theme song in my head. 1 Quote Share this post Link to post
dasho Posted August 31, 2022 GZDoom has video support, just play back a video of the demo. 1 Quote Share this post Link to post
Wadmodder Shalton Posted September 1, 2022 ZDoom/GZDoom will never official support older demos recorded with Vanilla Doom, Boom, MBF, PrBoom or any other source port other than its own format. 0 Quote Share this post Link to post
Reisal Posted September 1, 2022 Why don't the demos use all the gameplay behavior options in the port that make it operate more like vanilla? Say, the "Doom (Strict)" options set down that bring back old code changes so they're more in sync? 0 Quote Share this post Link to post
Shepardus Posted September 1, 2022 On 9/1/2022 at 7:21 PM, Armaetus said: Why don't the demos use all the gameplay behavior options in the port that make it operate more like vanilla? Say, the "Doom (Strict)" options set down that bring back old code changes so they're more in sync? Expand Compatibility options are enough to unbreak maps that would otherwise be broken (which is what they're for), but they don't make GZDoom behave exactly like vanilla Doom, which is what's needed for demos to sync. Due to cascading effects of desyncs as I mentioned above, there isn't really a "more in sync," as any desync with few exceptions will result in the playback completely falling apart. 2 Quote Share this post Link to post
Kinsie Posted September 2, 2022 On 3/27/2022 at 8:08 AM, MFG38 said: Seeing this thread reminds me of another one from a while back where someone brainstormed some ideas for a universal sort of demo format - I believe it was Fraggle? Would be interesting to see such a thing happen, provided it's even practically achievable. Expand Something like the Quake demo format, basically recording all actor movements and actions (I guess as a log of network packets?) would be pretty cool. Probably not trivial, though. 2 Quote Share this post Link to post
Edward850 Posted September 2, 2022 (edited) On 9/2/2022 at 5:18 AM, Kinsie said: Something like the Quake demo format, basically recording all actor movements and actions (I guess as a log of network packets?) would be pretty cool. Probably not trivial, though. Expand The funny part of that is the Quake and Doom demo formats are actually already both recordings of the client network frames. Just Quake's network frames are render state snapshots while Doom's are player inputs. Edited September 2, 2022 by Edward850 0 Quote Share this post Link to post
Graf Zahl Posted September 2, 2022 On 9/2/2022 at 5:18 AM, Kinsie said: Something like the Quake demo format, basically recording all actor movements and actions (I guess as a log of network packets?) would be pretty cool. Probably not trivial, though. Expand Yeah, we all know what clusterfuck of code this ended up in with Skulltag. Sadly the Doom engine is not made for it. The main problem here is to create an efficient delta format. EDuke32, for example, brute forces this by hand-crafting it with detailed knowledge of the game's data format. Needless to say, this stuff is not pretty, and might break as soon as some sync-critical new property gets added. The irony is that in the end Doom's way of handling demos is not really that bad - it can actually survive quite a bit of internal engine changes if sufficient care is taken - but it is utterly hostile toward deep refactorings like ZDoom's advanced inventory system or transitioning the engine to floating point math to reduce the risk of internal overflows. And the work to maintain it should not be underestimated. Demo compatibility is not a mere feature - it imposes a design philosophy that strongly emphasizes preservation and discourages innovation. Yes, you can still add stuff, but the framework in which this is allowed is very limited, and often the only workaround is to duplicate functionality with a modernized alternative so that original demos can use the original code and modern mods can use the improved version. 7 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.