Page 1 of 1

Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 02:29
by Wolfechu
Quick question, which I could probably try by experimentation, but it seems quicker to ask: Are savefiles compatible between OS platforms? I tend to use dual-boot PCs with Crawl installed on both Windows and Ubuntu, and I have this mad notion of have both versions use a common highscore table and saves. Would this work, or is it a Nethack-like situation where the savefiles just won't port?

Re: Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 07:17
by danr
I was just about to post the same question, but for a different reason - I use Linux on one machine and Windows on two others, and I have a dropbox folder that syncs to all three computers.

If I set the savedir to be in my dropbox folder, should the same version of crawl be able to use the same save files on each OS / computer?

Re: Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 09:20
by jpeg
As far as I know, save files are entirely compatible between operating systems. As a dev I've repeatedly loaded Unix save files (uploaded in bug reports) on my Windows machine (and vice versa).

That said, I've recently learned that Lua is getting compiled into the save itself and that that might cause problems, but that's all hear-say and I don't understand why, myself.

It's probably best if you guys try it and report your findings back here. 8-)

Re: Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 09:57
by galehar
I just tried to load a windows save file under linux and it works fine. Haven't tried playing it yet, though

Re: Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 17:06
by danr
I've noticed that saves used to use a bunch of separate files, and now there is just one .cs file (crawl save, I assume) in the latest builds.

I guess it would be easy to try. What I'm not sure about is how to change the default save location on my linux box. Is there an option that can be set, or does this need to be set when compiling the game?

- wait, never mind - I'll just delete the saves folder from usr/games/crawl/data/saves/ and make it a symlink to a saves folder in my dropbox!

I don't see why that wouldn't work! Then I'll be able to continue my games from any of my computers at any time!

Re: Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 21:58
by galehar
There's a save_dir option, but I haven't tested it. Default location can also be set at compile time I think. Be careful to avoid the savescum temptation with dropbox ;)

Re: Compatibility between platforms?

PostPosted: Tuesday, 21st December 2010, 23:54
by Wolfechu
Thanks for all the feedback; no Internet access right now, but I'll certainly give this a try with dropbox tonight and let you know how it turns out ;)

Re: Compatibility between platforms?

PostPosted: Wednesday, 22nd December 2010, 05:09
by Wolfechu
Just transferred an Ubuntu save to Windows through dropbox. Oddly, crawl sees the name and places the char on the start screen, but if you select it, it just takes you further into character generation like the file didn't exist. Further testing may be required here, as I could well be bodging this up somehow.

Re: Compatibility between platforms?

PostPosted: Wednesday, 22nd December 2010, 07:30
by Napkin
What versions of Stone soup are you using? Could you please list all the files you copied?

Re: Compatibility between platforms?

PostPosted: Wednesday, 22nd December 2010, 09:22
by Wolfechu
The prebuilt windows binary of 0.7.1, and the straight tiles compile of the same version on Ubuntu. Only thing I copied over was the <playername> tarball, which windows didn't recognize initially and I unzipped out of experimentation in the saves folder, which seemed to at least pull the name up.

Did I miss something?

Edit: For completeness, just checked the exact build: 0.7.1-1-g7ce9b19 on both

Re: Compatibility between platforms?

PostPosted: Wednesday, 22nd December 2010, 16:40
by danr
I would try copying the entire save folder?

Re: Compatibility between platforms?

PostPosted: Wednesday, 22nd December 2010, 19:30
by Napkin
In the past the save game files on Linux had the UID of the Unix account running the game added to the filename (<charname>-<UID>.cs). Not sure this is still done and not sure how this is handled in Windows, but I could imagine that there is a discrepancy between what Stone Soup is looking for and what you gave to it.

That's why I asked for the filenames, but you can check yourself. Create a new char with a different name in Windows and compare the filenames.

Re: Compatibility between platforms?

PostPosted: Wednesday, 22nd December 2010, 21:56
by Wolfechu
Yep, you're absolutely right. The Linux savefiles are <charname>-1000, the windows ones have no such suffix.

Will try copying the savefolder just in case, danr, but I suspect this is where the problem is coming in.

Re: Compatibility between platforms?

PostPosted: Thursday, 23rd December 2010, 00:12
by Napkin
Removing the "-<UID>" part from the save game files should make it work in Windows then :)

Re: Compatibility between platforms?

PostPosted: Friday, 24th December 2010, 10:31
by jpeg
Wolfechu wrote:Yep, you're absolutely right. The Linux savefiles are <charname>-1000, the windows ones have no such suffix.

Doh. Somehow I completely forgot about that when claiming I was able to switch games without problems. I'd gotten so used to it that renaming saves in the process seemed entirely natural to me. Sorry about that! :/

Obviously this makes repeated switching between different OSes more annoying that it has any right to be.

On the upside, this won't be necessary for 0.8 anymore.

Re: Compatibility between platforms?

PostPosted: Tuesday, 28th December 2010, 12:26
by galehar
I just had to reboot in windows to load a save file someone uploaded on Mantis. I had a lua error when I tried to load it under Linux. So there are compatibility issues.

Re: Compatibility between platforms?

PostPosted: Saturday, 1st January 2011, 12:37
by galehar
To ensure good compatibility with windows, compile crawl with BUILD_LUA=y

Re: Compatibility between platforms?

PostPosted: Sunday, 2nd January 2011, 09:48
by Napkin
Weird, galehar, neither the mingw32 builds nor the native builds for CDO - built on CDO - need to enable that option manually. Either you are missing something or the portion responsible for natively building in Windows needs adjustment then, I'd say.

Re: Compatibility between platforms?

PostPosted: Sunday, 2nd January 2011, 11:36
by galehar
I mean, if you want to be able to load windows save files under linux, compile crawl under linux with BUILD_LUA=y. This options force the makefile to use the contrib lua instead of the system one. The contrib lua has a special patch that makes it incompatible with standard one (hence the windows/linux compatiblity issues). See mantis #3079.