Transferring data between games?

There isn’t any real reason to think I’ll need this yet. But I’d like to know what my options are.

I’m currently working on something that has a single hub area from which multiple stories are accessed. Some stories have characters in common, sometimes even main characters, and others take place in the same setting but have few or no appearance from characters in the other stories. Maybe one or two of them will be completely self-contained. However: I’d like them all to affect one another in small ways. Characters who pop up in two different stories will react slightly differently based on how the earlier story went, for example. Even smaller than that, I’d like the hub room to accumulate mementos of the completed stories. So far, this is easy: The hub room takes you into the stories, you complete them, the hub room is changed.

My concern is: What happens if this thing grows really big? It is, after all, intended to contain a multitude of stories. So I have two questions. Firstly, just how much data can the Glulx format contain (for that matter, how much can z-code 5 and z-code 8)? And secondly, if even Glulx proves too small to contain the project in its ultimate form, is it possible to have some kind of save file containing just a little bit of data be loaded into another game? I have an interesting idea as to how to get around this with what is essentially passwords, and in any case it is a bridge I will not have to cross for some time (unless Glulx is only slightly larger than z5 and I am very close to the z5 limit already; unlikely), but again, I’d like to know what my options are.

I think the general consensus is that Glulx, given the right settings, can handle games of any size you can think of, provided your computer can handle it. I know that a few people here are working on absolutely huge projects, with thousands of objects and rooms. I have seen an almost text-only game currently being developed where the final file was 30MB or something like that. So you shouldn’t worry too much about it, I think!

Performance may end up becoming an issue, though. If you find your game to be running too slow, Zarf recently gave some tricks to potentially make your game faster.

Getting slightly off-topic here, I can’t help but think that if someone made 2 games that would work off the same savefile and change behavior depending on what’s in the file, that would be super cool :smiley: I don’t really know how it would work, though.

It is possible to write out a file that would then be read by the same game or a different one. Counterfeit Monkey uses external files to handle its achievement tracking, but you could do something similar with a sequel. The chapter “Figures, Sounds, and Files” in Writing with Inform (the built-in documentation) goes into detail about how to do this.

The Glulx file size limit is about 4 gigabyte. If you’re making a text-only game, you’ll never reach that. If you’re not, you probably still won’t reach it. Kerkerkruip is a big game with a bunch of images and some music, and it is currently 20 megabyte – so we can still become 200 times as big.

The z-code limits are much, much lower. I believe 256k for z5 and 512k for z8.

I’ve always loved the idea of games that can transfer information between each other - when I first learned about it, I thought the cross-game password feature from the LoZ Oracle games was the coolest thing ever. It’s neat to know you can have your I7 game write out external files; I’ll have to keep that in mind.

As long as it isn’t like the Golden Sun games, where you had to write down a gigantic password of random-looking characters and transfer it to the second game. Terribly nightmarish memories.

My plan, if I had to resort to passwords, was to have completion of one story give you a series of Illuminati-style code phrases. When you boot up a new story, you’d be in the hub room and there’d be an NPC there, and if you ask him to send you to the new story he’ll ask you the code questions, which would be things like “the endless night beckons” to which you’d respond “dawn is blood red tomorrow” or something else pointlessly ominous. Answer correctly and the game switches a few variables and the new story will react to some of the choices you made in the old. Answer incorrectly and he just ignores you and sends you to the new story as-is.

I’m thinking of putting that in anyway because it is kind of cool, but with external save files being a thing I can create it shouldn’t be a problem even if I want to keep everything z8 compatible (and with less than a meg of memory space, it is possible that a single story will be too much for z8 to handle). I may recycle the basic codephrase idea at some point; an easy implementation that occurs to me is having a story or section of a story revolve around finding all the correct codephrases so you can sneak into some cult initiation thing.

The disadvantage of the code-phrase thing is that approximately 5 minutes after you release your game, players will have figured out what the code-phrases mean and posted the key somewhere so that anybody can get whatever Part 2 they want.

Also, the advantage of the code-phrase thing is that approximately 5 minutes after you release your game, players will have figured out what the code-phrases mean and posted the key somewhere so that anybody can get whatever Part 2 they want.

People can trade save files too, and that takes approximately five minutes more. If they want.

True! I’ve never seen people actually do that in IF, but then the number of games which employ either system is pretty miniscule.

You know, I’ve thought about that sort of thing a lot - the potential, especially nowadays with the wide prevalence of the Internet and plethora of disassembling/hacking/modding tools for different games and engines, for people to save-hack or publicly post secret passwords and 100%-complete save files. Honestly, it’s my personal stance on the matter that people who do such things know what they did and can’t claim to the mirror that they earned whatever benefits that sort of thing gives them.
But really, even for games like Zork and others there are walkthroughs, so that can’t be too far removed in an ethical sense, right? If I wanted to, I could most likely look up a valid linked password for LoZ: Oracle of Seasons and just use that without having to play through Oracle of Ages first.

It’s art, not a trial. Experience it in whatever way is most meaningful to you.

^This. And my experience is that the more contortions a game goes through to make sure it doesn’t get hacked, the more it winds up inconveniencing users who just want to play, and even forcing them into cheats. (My example is permadeath games like nethack that delete their old save files on starting rather than on exiting, so you can’t get yourself out of an impossible situation by forcing the application to close without going through its exit routines; the nethack I played was crashy and had a crash-recovery system that didn’t work, so this meant I would often lose characters to crashes until I started backing up my save files. Which is exactly what you’d do if you wanted to circumvent the permadeath system.)

My impression regarding the permadeath aspect of NetHack wasn’t so much that it was to prevent hacking (you can already give yourself cool stuff in-game with Wizard Mode, if I recall correctly) as it was to increase the challenge and make you more cautious in progressing.

Right – but I think the reason it deletes the save file when you start up, rather than when you die or exit the program, is to prevent hacking. If it waited until you die or exit to delete the old save file, then once you got into an impossible situation you could force the program to quit and your old save file would still be there. But, what that means is that if the program crashes your old save file is deleted and you don’t have a new one (as I said, there’s a crash recovery program but it didn’t work on my computer). So I had to back up my save files anyway, which is what I’d have had to do if I was trying to cheat permadeath… all because the program didn’t trust me to try not to cheat.

Why didn’t do it the Kerkerkruip way – overwriting the save file each turn? Was that too costly on older hardware?

No idea. There are a lot of ports of nethack to a lot of different architectures, so maybe it’s not always implemented the same.

I seem to recall discussing this with you when Permadeath was in development. (I may bring it up a bit obsessively… losing that Wizard after clearing the castle was traumatic.)

Curious question, since the Kerkerkruip way appeared decades after the Nethack way. :wink:

I would imagine that your guess would be correct, plus the fact that is was probably the way it was done on Rogue, and possibly other roguelikes. I’m a bit out of my depth, but I’ve played a few of these games, and they all seemed to work this same way. It could be that no one really thought there was a need to change that way of doing things.

Until Victor Gijsbers came along, that is, and changed the face of Roguelikes forever. :smiley:

Sorry to bring this up again. I just noticed something.

Blue Lacuna is 5,41mb.
Counterfeit Monkey is 14mb.
Kerkerkruip is 21mb.

Now, anyone remembers Flexible Survival? It’s a sort of RPG furry/yiffy post-apocalyptic adult game. It’s 24,1mb.

The game that no one acknowledges much, because it’s part of such a specific community, seems to be the biggest (though not more complex - surely that honour goes to CM), and more oft-updated, Inform work ever, and it’s still expanding.

Just a thought. Quantity doesn’t mean quality, of course. But it’s still interesting. There actually exists an IF work that’s 24,1mb and growing (it has images too. Not sure about sound).

I saw some of the code for that when I was trying to find a way to preserve saved games between releases, and isn’t it mostly community-generated? As in, anyone can create an extension which will be compiled into the next version? If so, has something like this been done anywhere else (aside from IF Whispers)? It’s an interesting idea.