intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Nov 18, 2017 8:13 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Tue Aug 08, 2017 8:28 am 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
I put together a simple GitHub project to demonstrate the makefiles and a working structure to compile Glulxe + RemGlk to run on all the CPU variations of Android devices.

https://github.com/WakeRealityDev/IFTer ... ileAndroid

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Aug 08, 2017 2:24 pm 
Offline
User avatar

Joined: Sat Jun 25, 2016 12:13 pm
Posts: 150
Hi,

I tried this out and it compiled without problem using NDK 13b.

I've been meaning to pick up on our conversation about using JSON. It looks like we'd have to extend I6 to emit JSON for a richer interface to internals, and this could either be incorporated into remglk or go around it.

However, the first part would be how to build such an I6 extension. Do you know of any examples or templates to do this. Most extensions deal with adding new functionality to games, but this is different because it would have to (somehow) create and emit information to a new channel/window.

That's the bit i need to know how to do.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Aug 08, 2017 2:51 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
jkj yuio wrote:
I tried this out and it compiled without problem using NDK 13b.


Thank you for the testing, QC.

jkj yuio wrote:
I've been meaning to pick up on our conversation about using JSON. It looks like we'd have to extend I6 to emit JSON for a richer interface to internals, and this could either be incorporated into remglk or go around it.


Well, you don't really need to emit JSON from the inform level, from a RemGlk perspective that would be "JSON within JSON". They key technique is to do what I think around here is called "channel I/O" - which FyreVM extensions for Inform 7 do this. Essentially a zero-size Glk window (invisible) TextBuffer can be an output target to send either fixed or multiple commands. For example, "roomname=Tavern Bathroom" sent to command channel. The command channel concept is "cleaner" in terms of legacy fallback, as older interpreters should ignore the stream of data.

Alternately, develop some kind of tag system in the main window stream. Example tag system: _*|ADDIMAGE: _*|GRESET: - Worldsmith story does this, here are some details: viewtopic.php?f=32&t=20810

As far as extensions for out-of-band, Vorple this year was enhanced to support two VM's, both Z-Machine and Glulx, so it has a couple sets of extensions to reference. And I would look over FyreVM extensions.

jkj yuio wrote:
Most extensions deal with adding new functionality to games, but this is different because it would have to (somehow) create and emit information to a new channel/window.


Essentially we are talking "out of band I/O", how to get Inform to send things outside the visible content. Technically this can be done with no extensions other than ones for creating a second window (multi-window Glk stories go back more than a decade, such as Jon Ingold's Dead Cities). Vorple uses Glk files written to disk that it expects to be read, I would discourage this approach based on my experience working with it. Sending unicode text right to a hidden Glk TextBuffer window would accomplish the same thing and also can work remotely (the disk files that Vorple creates would only be on the server in a RemGlk situation, the client would have to download the files out of band or RemGlk software enhanced to send file data in the stream).

Worth nothing: Typically we are not talking massive amounts of data being exchanged. Mostly triggers, variables, etc. Mostly I think authors want to have predictable timing tied to the story narrative and information on what action or media they want (name of an asset such as a video file to play, etc). This is typically bypassing the legacy asset systems such as blorb files to work with a secondary asset system.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Aug 21, 2017 8:19 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
A related project has just been added to GitHub.com to build RemGlk+Glulxe using the clang compiler and CMake system of Google NDK 15c.

https://github.com/WakeRealityDev/IFTer ... droidCMake

Once you get the source code in place, there is no longer any need for a shell command line to compile the C code. Android Studio should compile the Glulxe interpreter and bundle it directly in the APK generated.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Aug 24, 2017 12:59 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
The CMake build system has now been structured as a library and packaged with a a sample app named Thunderfall that can do primitive parsing of the RemGlk JSON and basic input of Glk character and line modes. The JSON parsing code is largely taken from the February 11, 2017 release of Thunderstrike example app on GitHub. But now you can completely compile RemGlk + Glulxe and run them all in a single app. The code also demonstrates how to include a story data file in the APK assets and to extract it to play. Link: https://github.com/WakeRealityDev/IFTer ... droidCMake

This puts the technical side all on the very latest of Android Studio and Android NDK 15c. Now it's all pure in the new CMake system and demonstrates how a story author could bundle their story into a distributed APK. All the added Android stuff is licensed Apache 2.0 - which allows liberal use of the code, including commercial.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 25, 2017 9:18 am 
Offline

Joined: Thu Oct 28, 2010 12:29 pm
Posts: 115
Location: Utah
Bundling a story into a distributed APK? Heaven help us! You're talking about undoing ALL of the benefits of the traditional interpreter/story file separation.
Oh, well. It failed to catch on when they were doing it with Windows EXE files. Hopefully this idea dies quickly.

_________________
Nathan Simpson - The other Infocom bugs list


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 25, 2017 9:30 am 
Offline
User avatar

Joined: Sat Jun 25, 2016 12:13 pm
Posts: 150
You don't always want separation.

If you want to publish your story as a product, you're going to need it bundled all in one, regardless of how it works internally.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 25, 2017 9:32 am 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
Nathan wrote:
Bundling a story into a distributed APK? Heaven help us! You're talking about undoing ALL of the benefits of the traditional interpreter/story file separation.
Oh, well. It failed to catch on when they were doing it with Windows EXE files. Hopefully this idea dies quickly.


I clearly don't understand your point. There are thousands of interactive fiction stories being published on Google Play, Apple iTunes, Valve Steam, etc this way. It's a topic of conversation (how-to) on these forums years before I came along in 2016. In fact, that's exactly how Zork and classic IF is distributed - binary interpreter + binary data files in one "application" set of files. Putting a gblorb file inside of an APK in the assets directory is no different than putting a JPEG or GIF file or audio file or any other data file. It doesn't even encrypt it, you can use unzip to extract the story right out of the APK. An APK is literally just another name for .zip file. The app is entirely self-contained, never accesses the Internet, and can play offline - such as in airplane mode. Doesn't the Inform 7 IDE essentially do the same thing to create a bundle of the story data file + Quixe?

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 25, 2017 11:33 am 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5486
The Inform 7 IDE actually releases a base-64-encoded version of the game file, so it's a bit of trouble to extract the original.

But yes, the entirety of the IF renaissance of the past several years has been about packaging up game files. Nobody has to see that "traditional interpreter/story file separation" unless they really, really want to.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Aug 26, 2017 12:59 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
Posted on GitHub just now: In addition to Glulxe CMake file, there is now a git checkout script and CMake file for Git, Magnetic, and Level9 interpreters.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group