Helion icon indicating copy to clipboard operation
Helion copied to clipboard

Restored-game corruption possible due to differences in PWAD ordering

Open lemming104 opened this issue 1 year ago • 2 comments

Here's an interesting one. I am able to produce saved games on MAP04 of Legacy of Rust that, when restored, show incorrect sprites.

This is a monster closet that contains a Cacodemon and some fuel canisters for the flamethrower, except the fuel canisters have turned into chairs. helion_20240911_10 50 00 0257

Note that I loaded all four WADs (id1, id1-res, id1-weap, id24res) on top of a DOOM II 1.9 IWAD, because I don't know which ones I actually need.

savegame52.zip

lemming104 avatar Sep 12 '24 05:09 lemming104

I've played around with this a bit more, and this is actually an ordering thing with regard to WADs. This is something we should think of a solution to.

Basically, depending on which order those WADs are loaded in, the saved game will either restore correctly, or with this kind of hilarious sprite confusion. The game cares what order the WADs are loaded in, since successive PWADs might replace the same lumps. However, when we restore saved games, we make no such distinction.

I'm guessing many people use launchers, but I do not. I just drag and drop PWADs straight onto the executable, so if I'm loading multiple PWADs, there's the possibility that I might inadvertently select them in a different order and thus produce a different ordering of command line args.

lemming104 avatar Sep 12 '24 06:09 lemming104

The funniest part about this is that it seems like you only need the id1 WAD to play LoR. I still think the issue presented here (whether ordering semantics should matter for saved games when multiple PWADs are loaded) is worth thinking about, although hopefully this is an edge case.

lemming104 avatar Sep 12 '24 06:09 lemming104