Open eriktorbjorn opened 1 year ago
I think you're right. I have a vague recollection that there was a problem if you saved and tried to restore during the fight with the thief also (the game crashed?).
I also just had some issue where I restored after messing up the balloon/safe puzzle. The newspaper burned out, and I restored, but then I couldn't get the balloon off the ground until I restarted Confusion.
So I guess that whole thing is a bit brittle.
Unfortunately this is pretty hard to fix. During the fight the ODESC1
of the "TROLL"
(dung.mud
) gets changed in the function TROLL
(act1.mud
). SAVE
/RESTORE
don't save/restore what the description text is, it is what it is. You can see this the other way around too:
SAVE
RESTART
RESTORE
The general recommendation is to never save or restore during a fight. This problem can also pop up in other places when the description of an object changes over time.
On potential fix could be to change functions SAVE-GAME
and DO-RESTORE
(sr.mud
) to, instead of saving/restoring variables, use the MDL SUBR
s SAVE
/RESTORE
that saves/restores the whole working memory of the interpreter. This comes with a size penalty of about 30x (current save-file (50 kB) would grow to 1.45 MB).
When I enter the troll room, the troll is described as being unconscious.
I assume that this happens outside of Confusion too. I seem to recall reading that the save/restore function was a source of some headaches. So it may not be worth fixing, but I figured it can't hurt to document these things.