GL Texture Precaching with Demo Piayback

Sat Apr 18, 2020 10:25 am

Not sure if this is a bug or not, but the precaching option for textures doesn't seem to work when playing back a demo. I've been compiling a HD overhaul mod from multiple high quality texture sources and it has got quite large now as I'm using normal and specular maps on top of an almost full set of 2K textures. I switched on texture precaching in the options so that the game isn't loading stuff in during play and everything runs smooth as silk when I'm playing the game. The level takes a while to load at the start, but this is obviously expected when precaching is switched on. When loading a demo however, the game loads the level and starts playing it instantly with no precaching appearing to happen, causing drop outs and short freezes all over the place as the game tries to load in assets during playback.

If I warp to the map the demo is recorded on in player mode first so it caches in the assets then play the demo from there, all is fine and smooth with no issues as the assets are still in RAM. I don't even have to have that specific map pre-loaded, just have played other maps with the same assets in so that they're already cached when I start the demo, and the issue doesn't occur.

Is it by design that the precaching feature only seems to work for an interactive player session and not demo playback? If so, would it be possible to have this feature enabled for demo playback as well as normal play?

Re: GL Texture Precaching with Demo Piayback

Sun Apr 19, 2020 6:24 am

Yes, it is deliberately disabled - but this is very,very old code, coming from 1998 and I have no idea why it was a problem back then or whether the issue is still relevant. My suspicion is that the game timer isn't halted and delays in here can cause playback issues.

Re: GL Texture Precaching with Demo Piayback

Sun Apr 19, 2020 3:29 pm

When you say that the game timer isn't halted, I presume you mean between levels so it would cause a significant delay only in multi-level demos when it takes forever to cache the assets between levels? The way it is now, the demo loads very quickly, but there are significant delays during playback within a map even in single level demos (opening doors, going into a room with assets that haven't been loaded yet, etc.,) but they don't seem to cause any sort of desync or timing issues with demo playback.

Re: GL Texture Precaching with Demo Piayback

Sun Apr 19, 2020 3:48 pm

I can only guess, the code is from one of the earliest ZDoom revisions - long before I became involved. I simply do not know what the reason was.

Re: GL Texture Precaching with Demo Piayback

Fri May 15, 2020 3:23 am

Is turning precaching back on for demos something that would be simple to test and would you be open to it?