In order to publish an Inform 6 as an Android apk, I’ve been using node and Cordova to publish a mini site (that uses Parchment), building it to an apk with PhoneGap.
However, the Android apk that I get has a few problems:
- After entering a command, the Android keyboard vanishes and I have to click on the screen every time I need to use the command prompt
- At the start of my game I use inform’s BOX to display a text box: in Parchment / browser it appears complete but in the app it’s displayed with blank lines and “undefined” text in between
Has anyone had success publishing Inform 6 as an Android apk and / or any hints on what would be wrong here? I can provide files if needed.
Ah, this was reported once before, but I don’t really remember the details. Can you please check how it works in Lectrote?
I’m in the process of a major update for Parchment which will change over to the new ZVM and GlkOte display system. You can have a look at this branch for the work in progress code: https://github.com/curiousdannii/parchment/tree/ifcomp/
You could mess around with that code now and probably get something workable, but if you can wait just a couple of days it will be even simpler.
Thanks for your prompt reply!
I’ll try Lectrote and report here, but so far I’ve had no problems whatsoever with any interpreter, either executable, JAVA or browser based.
This is a first and since it’s also my first attempt at creating an Android apk, I’m not surprised that there is a learning curve
I can certainly wait for a few days to see if it’s addressed in a Parchment update… but I’m sure that is more a problem of my lack of experience at building Android apps rather than a Parchment problem, per se.
BTW: If anyone already has a template of files/folders working for building Android apk from HTML with Parchment, I’d be most grateful if they could share it here (say, as a .ZIP file). Note that I’m trying to build from an HTML page that already works with Parchment and a StoryName.z5.js story file: this is for an Inform 6 work, not an Inform 7 project; the Inform 7 solution (as far I understand it) it’s addressed here.
I’ve tried the z5 original game in Lectrote and two different Windows based browsers using the Parchment mini site that I’m using to create the app: no displaying problems, as the screenshots below illustrate.
However, this is what I get (so far) on an android phone:
In case it may shed some light on the problem, I’m including a .ZIP with the mini site that uses Parchment and the config.xml file which are then used to build the android apk.
android.zip (458.4 KB)
Using an older version of Parchment I’ve solved the “box” and most of the keyboard problems.
I guess that this would solve the Android publishing needs of most Inform 6 works.
In my case, however, I use an additional library that creates a menu based interface for clues and help (PISTAS and AYUDA commands in spanish). The resulting z5 works fine in interpreters (Fabularium in Android, and Windows both executables and browser based)… but the Android apk that I build on PhoneGap simply doesn’t work with that library for displaying clues (help worked just fine).
I consider the problem solved… but sadly enough, not for me.
As before, I include the mini site that uses Parchment and the config.xml file which are then used to build the android apk on PhoneGap. I also added the resulting apk created with PhoneGap.
forPhoneGap.zip (454.4 KB)
android_apk.zip (683.6 KB)
Sorry, I’ve only just got around to try to test this, but your APK there seems to be working alright.
Try to use the “i” key or the “r” key on the box initial screen, before gameplay.
Try to use the PISTAS command, during gameplay.
Okay, I can see that the ‘P’ button for hints doesn’t work. Can you add some logging to show what character code it is getting back at that point?
How do I add said logging?
I don’t know exactly sorry, it will depend on which menus/hints library you’re using. But hopefully you can find the place where it requests character input and then you can add a print statement afterwards.
I wouldn’t know where to begin: I’ve haven’t used the library in more than a decade and I never really looked into its code.
Worse, right now I don’t have a working environment to compile a Z5 file.
For the time being, no can do.