[0.4.2] [Blood] Enemy state is reset on savegame load
Moderator: Raze Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 818
- Joined: Thu Apr 25, 2013 12:21 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
- Graphics Processor: nVidia with Vulkan support
- Location: The Corn Fields
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
This is an ugly bug indeed. Also mixing const data with non-const data... what are they thinking?
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
The saddest thing here is that the bug was 1:1 recreated with the source reconstruction for NBlood - it is very clear that the objective here was to remain as close to the base as possible, instead of reworking the setup to fix it. PCExhumed has similar problems that even the utterly broken parts of the game were recreated.
About mixing const and non-const - welcome to the 90's! This was how programming was done 25 years ago.
About mixing const and non-const - welcome to the 90's! This was how programming was done 25 years ago.
-
- Posts: 51
- Joined: Fri Oct 19, 2018 8:27 am
- Graphics Processor: nVidia with Vulkan support
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
I am really surprised that the savegame bugs were recreated in NBlood. This doesn't even have to do anything with demo compatibility.
Afterall, even many Doom ports (those that even retain demo compatibility) fixed the savegame issues.
Afterall, even many Doom ports (those that even retain demo compatibility) fixed the savegame issues.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
It was probably done to have a full recreation of the source with all its glorious issues, since Blood never had a source release and faithful ports until recent.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
Even though using C++, it recreated lots of things 1:1, among them the actor date clobbering after loading. I'm not sure if he just overlooked the problem or intentionally kept it broken.lowskill. wrote:It was probably done to have a full recreation of the source with all its glorious issues, since Blood never had a source release and faithful ports until recent.
That part itself wasn't so hard to fix - but I noticed that NoOne's extensions did not save any of the newly added data - completely relying on actInit to set everything up. So I had to go over the entire code first to see if there's other data that may need saving. I'm just through with that - now it's ensuring that actInit won't be needed here anymore and that everything it does is correct in the loaded data.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
I just finished going through the entire code.
It really looks like the only thing that needed treatment after loading was the AI state, so calling a full actor reinit for it was total overkill.
But thanks to the broken setup, NoOne's extensions never needed to save their added state, it all got reinited anyway. And examining this part was somewhat more work. It looks like I got everything right away yesterday evening but I had to double check. So with the indexer for the AI state I added yesterday and the saving of the extended state I hope this allows resuming the game from a proper setup. Of course this will need a bit more testing to make sure it's working.
It really looks like the only thing that needed treatment after loading was the AI state, so calling a full actor reinit for it was total overkill.
But thanks to the broken setup, NoOne's extensions never needed to save their added state, it all got reinited anyway. And examining this part was somewhat more work. It looks like I got everything right away yesterday evening but I had to double check. So with the indexer for the AI state I added yesterday and the saving of the extended state I hope this allows resuming the game from a proper setup. Of course this will need a bit more testing to make sure it's working.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
Groovy, it's rather impressive that this major issue was addressed so quickly.
I'll be sure to investigate the infamous Butchers in the next version.
I'll be sure to investigate the infamous Butchers in the next version.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
I just ran a quick test with the actor reinit disabled. The game still appears to work so this looks it was utterly redundant, aside from resetting the AI state, which is not written out in a way that allows restoring it. I'd appreciate if this can be tested a bit - if it works I'll make a PR for NBlood out of it - I'm really interested in how this will be received, it'd tell a lot about the project's goals.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
To emphasize again:
Once this is confirmed to work I can also make a PR for NBlood from it - right now is too early.
While the change seems to work for the regular zombie - at least in E1M1 - to be really assured that this thing is working it will have to see some more extended testing. Anyone up to it?Graf Zahl wrote:I'd appreciate if this can be tested a bit - if it works I'll make a PR for NBlood out of it - I'm really interested in how this will be received, it'd tell a lot about the project's goals.
Once this is confirmed to work I can also make a PR for NBlood from it - right now is too early.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
Welp, I guess I know what I'm doing tomorrow :V
-
- Posts: 75
- Joined: Wed Mar 15, 2017 11:43 am
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
There seems to be something wrong. I attacked a zombie that was charging me, then saved, quit, reloaded and he just walks around without seeing me for a few seconds and then stands at a random location.
Edit: Just tested it again – it breaks as soon as I save. The indexing and deindexing breaks it on its own.
Edit: Just tested it again – it breaks as soon as I save. The indexing and deindexing breaks it on its own.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
Ok, better there than during loading, though. Weird that it worked for me yesterday. I hit the zombie with the pitchfork until it fell down, then saved, reloaded and it resumed normal operations afterward.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
But did you also quit the game?Graf Zahl wrote:Ok, better there than during loading, though. Weird that it worked for me yesterday. I hit the zombie with the pitchfork until it fell down, then saved, reloaded and it resumed normal operations afterward.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
Tested out the new changes to the saving system in Episode 1 and 3 of Blood and so far, it seems to have done its job. Emphasis on "so far", who knows what else might show up later.
Zombies, Gargoyles, Cultists, Spiders, Gill Beasts, and even Butchers seem to do their job correctly. I've not been able to reproduce even the infamous missing knives of the Butchers, but I'm still cautious of that one, just a feeling that that's not the last we've seen from it.
Zombies, Gargoyles, Cultists, Spiders, Gill Beasts, and even Butchers seem to do their job correctly. I've not been able to reproduce even the infamous missing knives of the Butchers, but I'm still cautious of that one, just a feeling that that's not the last we've seen from it.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [0.4.2] [Blood] Enemy state is reset on savegame load
Good to see that the butcher issue was related to this. I'm well aware that calling success on this one may be premature but we're definitely on the right track.