Stand Alone Inform Games With Phonegap

(The main doc for this that will be updated and polished as I have time is

If you feel like distributing your text adventure through one of the marketplaces for mobile phones, you’ll need to create a standalone installer package. This is a quick, rough and ready, tutorial on how to use Adobe Phonegap Build to do that. This should work for Android, Windows mobile, and iOS packages, but my main focus is Android.

The first thing you’ll need to do is sign up for an account on Adobe Phonegap Build. There’s a free option and I can’t imagine any Inform based game will get over 50mb in size, so it should work just fine.

After you’ve got your account set up, you’ll want to grab this zip file which contains a template you can use as a starting point for “releasing” a website that can be turned into apk, ios, and windows phone installer packages with Phonegap. You’ll probably need my “dark” version of the Quixe interpreter too, come to think of it, since I made some color changes there for my “dark” template. I like white text on black screens.

Unzip it into your Templates directory, modify the stylesheet and so forth to get the look and feel you want, and then add:

Release along with a "Android" website. Release along with a "Quixedark" interpreter.
to your Inform 7 source.

It’ll look a bit like this:

Hit ctrl-shift-r or use Tools->Release to release your project.

In the release directory, rename config.html to config.xml (I had to use .html to get inform to run substitutions, so this is a bit of a kludge, but so be it)

Now, modify the config.xml file as needed. You might have to look up how to add icons, get/generate developer keys for each platform, etc. That’s a bit beyond this quick tutorial. I have included an example icon you can work with.

After you have your config.xml as you like, zip up everything in the release directory.

You’ll upload that zip to as a private project. (You can also make your code open source and release many games that way)

Phonegap will guide you through a very basic build wizard and you’ll have an apk of your game you can download and install on your phone/tablet/TV/etc. You should also be able to get packages for Windows mobile phones and iOS devices, though those require signing keys.

P.S. - It’s possible to use this same basic setup to create standalone packages/games from Twine, Undum, RPG Maker MV, and anything else that outputs to HTML. However there is a 50mb limit on the free Adobe Phonegap Build account, which most RPG Maker MV games will easily exceed.

  • I have been asked elsewhere why one would do this when Inform games compile to bytecode and there are interpreters etc… Put simply, people are more likely to install a packaged standalone app that they can get through the marketplace of their platform, so this has the potential of making your game reach a much wider audience

I haven’t tried this, but it looks very helpful. Does the user’s phone need to be jailbroken or unlocked in any way to install the finished build?

Once the developer has a key to sign the apps with and such, (s)he can upload it to the Google Play/Android marketplace and it’ll just install and run like any other marketplace game. As for the initial tests on the dev’s hardware with the unsigned apks that one will generate (without having made signing keys), you’ll have to turn on the ability to load packages from “Unknown Sources” to sideload the app. … s-0161947/

However, in the long run, one would want to sign up for a Google Playstore developer account and get the key signing etc worked out: (Google charges a $25 fee for that, I think, so I haven’t done that yet…)

That would let the developer add it to the marketplace and distribute it to pretty much anyone with an Android device.

Same would go for the iOS and Windows phones marketplaces, though I know very little about both of those.

Cool. Thanks. You can also use Cordova with a similar result and even go for Ubuntu Touch (even though is quite easier to go with a template for Ubuntu Touch) you can go with a file and build for any system.
Anyway, thanks for this. Prety helpful.

Edit: This is an example of Cordova work flow. Jump to ‘Ok. What do I do now’ and change ‘ubuntu’ for your platform. … ebfb4070d6

Yeah, there are ways to do this with Phonegap installed on your system too, but I wanted to give people a method that required the least setup. :slight_smile:

Very cool!

Thanks for the information. Very cool! I hope to see people making use of this in the future and announcing it here on the forum.

You’re more than welcome :slight_smile:

I hope people find this useful and that it helps spread interactive fiction to new gamers. I want to work out some on-screen buttons for n/s/e/w and get/drop etc at some point too, to make it easier. Maybe work in one of the hyperlink extensions to make it easier for people on phones to play the games.

thank you, that’s very interesting. Do you know some stand alone tool which could do the same with html files (only for android for example)?

Yeah, this actually does HTML files. You basically have to release your inform game as a website and then process it with this to get an android app. As far as an app that sits on your android that makes other apps? Nope, haven’t heard of anything. Android/iPhone/etc are really appliance operating systems and terrible for development work of any kind.