[Scummvm-devel] Maniac Mansion in Day of the Tentacle support.
silver_coast at hotmail.com
Tue Nov 17 02:35:47 CET 2009
I noticed we still have a big TODO regarding the Maniac Mansion in Day of the Tentacle support.
Ive been speaking with Tobias and Eugene about this and thought it best to
post to -devel to get some more opinions. I'll openly admit right now that I will probably make a few mistakes
in this mail, Im not a ScummVM wiz, and Im not a great programmer, I also dont know exactly how this will work.
I did a brief test earlier, this did not get me very far as RTL support is curently unreachable in the SCUMM engine code without
using the GUI(yet)
I simply added "requestSave(0, "MMDOTT");" under the "startManiac();" function.
I chose the save slot 0 because it is currently used for Autosave, since we are saving and exiting I didnt
see a need to keep this for autosave(perhaps somebody could tell me otherwise)
and as a quick test I used "restart();" It became clear that I would need to silence the
"Successfully saved game state in file:\n\n%s" dialog.
This was as far as I got today.
It is important to mention that in these past couple of months have been quite productive for the SCUMM engine
not only did we see Loom TG16/PCE support arrive, but a quick look at the patch tracker
shows me that we are also heading towards C64 SID sound support(Maniac Mansion and ZAK), PCE/TG16 HES sound support(LOOM TG16)
Also, please dont think I am trying to impress you or show off, but I added patches to support MI1 SEGA CD passcodes,
and I created a patch to support save/load with the original Maniac Mansion NES save/load dialog.
Admittedly these patches were only a few lines of code but I feel that they bring the SCUMM engine that much closer to
Wouldnt it be nice to get most of the large SCUMM TODO's out of the way before the next release?
Since GSOC 2007/2008?? we now have a nice clean way to exit from games
(SCUMM at least)(PS. Is anybody actively maintaining this for newer engines?)
I spoke with Eugene and Tobias, both agreed that a nice start would be to
create a temporary save game, which could be restored later to return to Day of the Tentacle on Maniac Mansion's exit.
Eugene stated that we should not use the same method that the original implementation used,
they kept Day of the Tentacle interpreter and vars in memory and simply instantiated the Maniac Mansion interpreter and vars
in memory too.
In the modern day, where ScummVM supports both versions in one interpreter natively there is no
need for this.
This ends my input from Eugene.
The actual switch between Day of the Tentacle and Maniac Mansion occurs in Day of the Tentacle room 42. One of the object scripts
calls a function to load Maniac Mansion(If you open the Day of the Tentacle data in SCUMMEX, and visit room 42, it is the last OBCD script)
(Without the disassembly I dont know anymore about what this function actually does)
All I know is that this script is groped by SCUMMVM and further processing 'should' be done
by the SCUMM engines function startManiac()
Speaking with Tobias today I was discussing the best method for saving/loading in both Day of the Tentacle/Maniac Mansion when startManiac is called.
It is important to keep the functionality of the Day of the Tentacle saves and the Maniac Mansion saves standalone. since both games can be run by SCUMMVM
we need to ensure that we do not create a saved game that is incompatible with the current standard.
A consideration is that to run Maniac Mansion through Day of the Tentacle we may need to either add it manually to the games list or implement some
function which will detect Maniac Mansion data files under the MANIAC directory, underneath the Day of the Tentacle directory.
In conversation with Tobias we discussed various methods in which we could achieve the save game problem.
Im going to quote Tobias directly because I could not put it any better. I hope he has no objections.
Create saved games individually for each version(Day of the Tentacle and Maniac Mansion)
This would mean we allow each version to save their own game, and this would mean that we could restore a Maniac Mansion save we created while
running the game through room 42's method of loading.
Benefits: We can continue on in Maniac Mansion, without having to return to Weird Ed's room each time to play.
Negatives: We have saves if we wish to play Maniac Mansion as a standalone game
Method 2) Implement a parentSave variable in the SCUMM engine for Day of the Tentacle, which would allow the included Maniac Mansion game to save
its current position in a save game appended to the Day of the Tentacle save. Upon exit of Maniac Mansion the var parentSave would be checked and Day of the Tentacle
could be restarted (we could pass this to a "stopManiac();" function which would set the required vars and load the correct
script to have Day of the Tentacle respond with "Jeepers" after Bernard finishes playing.
In this method we would save the parentSave var to the Maniac Mansion savedgame too, which would allow us to locate the correct save to restore.
Benefits: We can keep Maniac Mansion in Day of the Tentacle saves specifically for when we run Maniac Mansion in Day of the Tentacle.
Negatives: We cannot access Maniac Mansion in Day of the Tentacle saves when we run Maniac Mansion standalone.
Tobias also introduced the possibility of keeping the Day of the Tentacle save in memory after closing the Day of the Tentacle engine
and restoring this when Maniac Mansion quit happened, Instead of saving directly to the disc.
My understanding of this reasoning was that after restoring we would no longer require the temp
Day of the Tentacle save to be stored on disc, this could cause some confusion to the user.
I have a questions about this.
What would happen if SCUMMVM crashed with a temp save in memory, would we expect the user to play through again?
I hope this mail attracts some discussion from the recipients.
Thanks for reading this far.
View your other email accounts from your Hotmail inbox. Add them now.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scummvm-devel