Game Engines/tools with player choice save option

Hello, I am an interactive fiction writer and currently developing two fiction works in Unity 5. Though Unity 5 is not for making interactive fiction games, it does support a lot of features like;

  1. Saving variables (player choices) to external binary files and access on requirement
  2. Multi platform launching (Android apk, iOS etc.) for finished game
    I’ve checked Twine and ChoiceScript for easy implementation as Unity scene text UI layout, and polishing is a nightmare for every scene :astonished: ! But I couldn’t find the said features in Twine and ChoiceScript.
    Are there any other tools/engines with these features?

INSTEAD (with “prefs” module) can give you cross-game variables and cross-platform support (Android, Windows, Mac, Linux, Maemo, *BSD, Windows CE, Symbian, CAANOO; iOS port is currently only for jailbroken devices). Web platforms can use server-side saving, but that’s hard voodoo.

I don’t know a huge amount about this, but have you thought about using ink ( which might help clarify things.

I have assigned feature code 118 and lump name XGRANGE.BIN for cross-game variables in TAVERN (although the implementation does not yet exist, but it should be easy to implement if anyone wishes to use this feature). TAVERN is open-source and open-specification and is meant to be portable to many other computers, although currently the only implementation is in C using stdio for Linux, and does not implement XGRANGE.BIN or feature code 118 (although your game will still run unless your game’s FEATURE.SET lump specifies feature code 118; the cross-game variables will just be reset each game instead of persistent).

There is a C# implementation of the Z-Machine:

This would allow you to embed an Inform project in Unity. Or if you use JS in Unity, then you could probably embed one of the JS interpreters.

1 Like

One of the JavaScript implementations of Z-machine is my own, called JSZM. There are others too, and if you want cross-game variables you may need one of the other ones anyways because JSZM does not implement XZIP/YZIP (and XJSZM is not yet written). You might also see if one of the implementations in C of any VM that you want to use for interactive fiction you may be able to convert into C# or JS or something else (or possibly even interpret it if you really need to!). I believe Glulx (another target for Inform) also supports cross-game variables by the use of the Glk file I/O mechanisms. Another possibility to use with any VM may be to add new verbs that are used to save/restore such data, and for the interpreter to automatically execute them!