[Bug] Mist isn't visible in recorded demos

Issue #115 resolved
Purkkaviritys created an issue

I noticed a curious thing in 23-Jan-2015 build (Windows ver). When I join a multi-player server with a map that has mist in it. If I record a demo running around in that map and then disconnect and playback the demo it will not have any mist in it.

I think it probably lacks some other effects too. But I am unsure of what exactly is missing.

Comments (13)

  1. Purkkaviritys reporter

    Additionally I just tested 19-May-2015 build and it has the same issue. I also noticed a lack of the rain sound. Also sometimes the client crashed when trying to playback demo which is probably related to the issue #110. I'm now downloading the latest nightly build to see if that fixes the issue.

  2. Frank Sapone

    Certain things aren't saved as part of the packet. I can't find a good way to resolve the client crash issue either, so you may have to live with these shortcomings of demo recordings.

  3. Purkkaviritys reporter

    I tested the 30-Aug-2015 build and the lack of mist and rain sound while playing back a recorded demo is an issue in it too. But if it isn't easily fixed then ok. It isn't end of the world since there are probably better things to address. Mark this "won't fix" or what you feel is the best.

    Also the new build doesn't crash when trying to playback a recorded demo. Another thing is that the Daikatana is a really fast to launch and load a map. It takes less than a second to be in a game which is really cool.

  4. Frank Sapone

    The very quick startup is part of the upcoming new protocol. Before, the game was capped at a certain limit (which overflowed anyways) on level startups regarding how big of chunks the data is sent down for what needs to be loaded. In single player, the limit is very high that most maps wouldn't hit such a limit so it can all be loaded in one large chunk.

    In multiplayer, the data is now compressed and is limited to the size of a standard MTU packet. If you try connecting to the new protocol server you should notice it's much faster compared to the other servers online as the data is compressed on the fly with liblzf normally halving (sometimes triple reduction) of the startup sequence.

    Good to know my playback demo workaround at least is holding up. It works for most situations, but won't fix the issue of constantly doing this..:

    Load a demo, while the demo is still playing load the same demo (i.e. just drop to console hit up arrow then enter). Keep doing this over and over and it will eventually crash. Loading a demo while another one is playing sometimes screws up because it appears certain game assets are removed from memory (which has to happen to load a new map/demo) but the game is also currently processing part of a frame. I can't find a good solution to that particular problem, or even a decent hacky workaround.

  5. Frank Sapone

    Now, I'm guessing, but I would imagine that the issue with the particle effects not being saved is related to something in physics.dll. I believe there was game specific code to not save rain/snow effects because of an apparent bug in win2k where it was somehow corrupting the stack if it was saved. I think that was in the physics.dll but I haven't looked in a long time so I can't say for sure.

  6. Purkkaviritys reporter

    I don't know how the Quake 2 demo recording works exactly but I've understood that it merely saves movement data and stuff like that. Visuals like static mist and background sounds like rain wouldn't be part of the demo recording and would be loaded as a part of the map when loading stuff. That's why I was thinking it's weird that they're not part of the demo recording.

    You've slightly misunderstood me. The rain and snow effects are visible in the demo. It's just that the sound the rain makes isn't there. And it's weird that certain mist effects are missing from some of the maps. Like for example if you make a record of e1dm2a the mist won't be in the demo. If you make a record of e3dm2 or e3dm4, you can see that the in-general white mist/fog is missing from the map but e.g. "the teleport fog" and the "red lava fog" are part of the demo. I think that if the map creator has defined a general environmental fog as a property for the map then that general fog property isn't loaded when loading demo. But handplaced fog boxes are properly shown.

    Yeah, if I give you some approximations out of my head then with this new build the single-player takes around ~2 seconds to load. Multi-player from clicking the server name to be in the game is something like ~5 to ~7 seconds. And it's even faster when servers which are closer to me.

    I did what you suggested... I tried to repeteadly load a demo while the same demo is already running on a background... it did crash eventually but it took lots of tries. At first I was thinking I wouldn't be able to trigger it.

  7. Frank Sapone

    I don't know exactly how quake 2 saves it's persistent data into the demos either, but I'm guessing it could be a potential flag that needs to be set either by the mapper or one that was omitted in code, or even omitted on purpose for some kind of issue with loading/saving. It's been admitted to me by a Daikatana Developer that the whole aspect of save/restoring (and likely demo recording too) was a total afterthought. They were more concerned about porting all the game code to the new engine and getting the single player aspect finished and then they realized they didn't even write a save or loading system! it's quite possible they overlooked storing some persistant stuff that may have been controlled by the dlls/server side.

    At some point, I'll peek into it and see why it's happening, but I can't promise I'll be able to solve why it's happening.

    The main server to test multiplayer speed is the New Protocol Test server, all other servers are using the older protocol, but they do have a fix for the MTU sizes being over 1400 (well only my servers do, daikatananews.net may have the fix as well). Set developer to 65536 to enable extremely verbose debugging messages that would normally be hidden from setting developer 1 and you will see on connect that it received a compressed packet and it will tell you the original size and the compressed size.

  8. Knightmare66

    Fog around teleporters and lava is volumetric fog, and is part of the BSP, which is handled on the client side.

    The distance fog, or mist as you put it, comes from a worldspawn key that's sent by the server to the client as a special server command. That probably has something to do with why it's not getting saved in the demo stream.

    As for the rain sounds, they're just looped sounds in the maps themselves, but with special values set for audible distance. They should be recorded as part of the demo, but perhaps the audible range values aren't making it in.

  9. Американский Шпион

    just found out that missing ambient sounds in demo playbacks is still a thing. no news on it?

  10. Frank Sapone

    Okay, I found out the cause of ambient sounds not being recorded to demos and this part is now fixed. It will only work on newly recorded demos.

  11. Frank Sapone

    The particle volumes from sfx_complex_particle is a difficult fix. It's optimized to only send the track entity update when someone is in the PVS. When someone leaves it or re-enters then messages are sent to either track or untrack it. Because it's not a true client side effect if you record in a spot where there is sfx_complex_particle effects, if you leave that room then come back to it the effect will then be there because the trackent message will be resent.

    The real fix would be to make it a true client side effect that is dictated by the baseline at load, but that would also be difficult. So I won't be fixing it.

  12. Frank Sapone

    Fixed it so fog data is sent down with configstrings. Will only work on servers and clients after 02/24/18. It won't break the current protocol however, so older versions of the clients will simply ignore the configstring.

  13. Log in to comment