Browsing & finding IF stories on Android, apps for downloads

I’m working on a new Android app called Thunderword that will be able to run Z-code, Glulx, and, as things progress, basically any C compiled interpreter engine that can interface with Glk via RemGlk… so HUGO, TADS, plan-9, etc.

I know that there is some demand “out there in the world” for fiction writers to publish their own app that basically provides one single story. Such authors want to be able to track downloads (and possibly monetary sales) of their work. But the headaches of publishing, maintaining and getting to work a full “interpreter engine” in their own app can be difficult. Many fiction authors may not want to deal with security fixes and complex things in computer software. Beyond those issues, I have found that browsing + surfing + collecting + organizing a large number of stories and games can have many different user interface ideas. By allowing multiple apps to be the front-end chooser + picker of what to play, we can have more open and flexible choices.

In that spirit, I’ve made the decision to promote and encourage third-party apps to interface with Thunderword. For example, a browsing app could be made called Lightning that downloads and picks files from a library. Of course, any player can also fire up a web browser like Opera, Firefox, Chrome and download a story blorb file and open it directly in Thunderword without needing a second app on their Android device.

I encourage people who are interested to make apps now. Basically, to interface with Thunderword, you would save the game file on public storage space such as “/sdcard/Interactive Fiction/mygame.gblorb” and then your app sends an Android broadcast Intent (in the background) that tells Thunderword app to load and play that story… And when the player exits the game in Thunderword, it can notify your outside app back with a similar background Intent (Android BroadcastReceiver). Your app could keep track of how much time the player spent in the story, and Thunderword could even share with your app information about how many responses the player made to the story - so you can determine if they just launched and walked out or actually interacted with the story. Save games and such can be shared with your app (the one that launched the story), in standard format that the existing RemGlk and interpreters would use, and your app could do what you wanted with those files (for example, share them to another Android device or PC the user may own, or email a save game to another person).

Even if you don’t want to make your own Android app, you can take advantage of some of these integration features. You could email the player a copy of your blorb and have it launch into Thunderword from their Gmail client. Or, it may be possible for you to build a normal HTML website instead of an app - and have it launch stories from Opera, Firefox, Chrome, etc directly into Thunderword - and if so wished, have a URL on your website notified when the user has exited the game you requested launched (the user would have the option of blocking this notification for privacy concerns). In other words, you could build a website for browsing Interactive Fiction stories that users could consider to be a library organizing tool for Android.

Of course, Thunderword can play stories entirely offline in airplane mode. I’m giving these online examples to inspire developers to create fancy and nice looking tools to help locate and download the stories! I am currently targeting modern Android 5, 6, and 7 devices. I also have in hand one Amazon Kindle Fire, generation 5 device (just updated to Fire OS 5.3.2.1), and Thunderword should also work on Kindle Fire devices too. It should not take much to get the app working as far back as Android 4.1 devices, so that won’t be too far down the road…

I encourage you to work on apps and ideas today to pick and download story files on Android! Thank you.

If you are interested in developing your own app to browse/find Interactive Fiction stories - you can start to play with the early Thunderword Experimental release.

Join the Alpha test: play.google.com/apps/testing/co … perimental

IMPORTANT: Right now it’s probably best to use a 7" (or larger) Tablet and a Bluetooth or USB keyboard. Usability needs work with where (and when) to fit the keyboard and size-of-emulated layout on smaller screens (phones). However, Z-Machine and Glulx stories are mostly working and pretty stable.

Screen shot running a Glulx story ifdb.tads.org/viewgame?id=a0iqpsz74a0bx118 from 2008 on a 6" mobile phone:

I’m going to be adding an option to expose RemGlk JSON input/output to other apps. This is to encourage people to focus on the user-interface side of how to best adapt classic and newly created Interactive Fiction.

So, you will be able to make your own app and tell Thunderword to load the interpreter of your choice (currently: bocfel. frotz, git, glulxe, nitfol, scott, tads) with the data file of your choice. Then your app will have a full JSON interface to the interpreters.

This will allow you to have lightweight APK files and not have to get involved with the NDK cross-compiler side of Android development. If anyone is interested in using this now, let me know, and I’ll be more detailed on what’s ready and how to use it.

Hi,

I’m most interested in how you’re getting on with TW. It seems that we are both making something similar, but i am not specifically targeting legacy terps with Brahman - although i did follow up your suggestion of making a GLK engine adaptor.

Here’s a shot of Marnix’ XVAN GLK running as a Brahman back-end engine. I added some markup to his text so that it could work without typing,

My plan is to make my engine interface richer so that new engines like the Brahman game system can be closer to the UI. eg I’d like animation at some point. To that end, I’m less interested in supporting legacy terps. Although it will (and does now) do the basics.

What we’re both doing is similar but going in different directions. Good news for Android, anyhow.

It was a long journey to end up making Thunderword. It’s evolved to where I’m encouraging multiple apps to work together. Good to see you making such fast progress.

Thunderword sharing RemGlk JSON to other apps is working out well. Thunderword also has a built in WebSocket server - so, in theory, someone could pretty easily adapt GlkOte to use a WebSocket to exchange RemGlk JSON from app to app. This would allow a proven and popular interface (GlkOte) on Firefox, Chrome, Opera, etc to have the performance and storage features of compiled git / Z-code interpreters… and would even allow offline (airplane mode) to work.

I silently follow this thread :slight_smile:

FOR DEVELOPERS looking to roll their own User Interface and leverage a wide choice of compiled interpreters: Newly published on GitHub, an open source sample of how you can consume and emit JSON for RemGlk to Thunderword. The Java code is relatively short, only a few pages long, and hopefully easy enough to follow for an Android developer. Apache 2.0 license in Android example convention. The example app has been named “Thunderstrike”, here it is: github.com/WakeRealityDev/Thunderstrike - ready for Android Studio version 2.2.3 & SDK 25

This also serves to show an example of how to tell Thunderword to open the data file of your choice, but some more explanation needs to be provided on the various options (the example code as it stands now opens it headless as commented in the Java code, that parameter can be changed). Please let me know if have questions on getting this working. You will need to install Thunderword on the same device from the Google Play store link: play.google.com/apps/testing/co … perimental

EDIT: I notice some downloads were showing up for “Thunderword [test]” - I suggest you uninstall that from your device. It’s currently code that is a couple weeks older and I didn’t like using the name “test” after a few days, so I created a new Android package with the theme of “Experimental”. There will be 3 different variations on the Play Store: “Thunderword” - the main app ( not yet released, likely a couple months ), “Thunderword Experimental” (the one up on Play Store now) and “Thunderword Test” - from here forward, only people I specify can download “[test]” - as I have no plans to use it unless some oddball device crashes come up - and want to give certain users a special debugging build to track down problems. Working with NDK / C code in Android can be sometimes painful. There are no secret features in the “[test]” version, it is currently not being updated as I haven’t had cause with any reports of specific crashes on problem hardware. Thank you.

I’m adapting the popular Text Fiction app to a custom version that can talk to Thunderword (app to app data exchange via RemGlk JSON). This should allow classic layout Glulx and other Interactive Fiction stories to work in Text Fiction (two windows, status window and main window). I hope to have testing release up on the Play Store soon - if you know how to use Text Fiction already and want to give it a try, let me know. You can prepare by installing Thunderword experimental on your device now and make sure it is working. Thank you.

And running a Glulx story via app to app JSON data exchange:

EDIT: Level 9 interpreter has been added to Thunderword build 164. Rolling out right now on Google Play.

How about playing Counterfeit Monkey at high speed with Text Fiction’s wonderful interface! Latest beta version of Text Fiction for Thunderword on the Play Store can do this!

Android 7.0 and newer tablets can do multiple windows. I evenly split the screen for this screen shot of Thunderword running The Moon Watch Glulx story on the left with the enhanced Text Fiction for Thunderword app on the right used as a launcher. Both apps are working together, the right being the tool to organize and pick stories, the left to run the story. Of course, they don’t have to be on the screen at the same time, but it demonstrates how the apps really are working together. This is on a Pixel C tablet layout.

Immersive mode is also possible so that the title top title bar on Thunderword yields space to the Interactive Fiction story. Here is a link to a second screen shot showing more space given to Thunderword on the split screen: github.com/WakeRealityDev/Scree … g?raw=true

When I posted this topic at the New Year start, I hoped someone would step forward to make an IFDB browser app for the community… as visual app design is clearly not my strong suite. But I’m plodding along and hoping someone is inspired either out of criticism or inspiration :wink: I’ve restructured the open source Incant! app to split it’s story browsing of IFDB into a module that other apps can include. This week I added a new RecyclerView that is much more flexible in presenting the list. Code is now up on on GitHub. Here is a fresh screen shot of the latest progress, picking a story on an Android tablet: