ClubFloyd on Slack?

A friend is interested in trying to use Zarf’s remglk to allow for arena ClubFloyd-style play of Glulx games through Slack. Has anyone trod this path before? (Also: is Slack a viable potential prospect for hosting the XYZZies?)

Slack was mentioned in the xyzzy thread. The big problem is that people have to be invited into a Slack group, which is too much friction for a public event. Auto-inviters seem possible but perhaps also too awkward.

Connecting remglk to a XMPP bot to Slack’s XMPP gateway should be a simple matter of plumbing. I don’t think anybody’s done it, but I’ve seen each step demonstrated in various projects.

This seems to be a relatively painless way to setup an auto-inviter for Slack:
The Boston Ruby meetup group uses it, and it’s super easy to sign up, just go to a web page and enter your email address.

I should probably start a new thread for this, but maybe someone can just give me a quick rundown or pointer:

I’m fascinated by this idea, from what little I know. I know Slack is used for team collab mostly, but there’s a method for piggy-backing Glulx games onto it to make an ifMUD sort of thing?

Are there people actually turning Inform based stories into MUDs (or MUD type worlds)? Are there any articles or write-ups about projects that already exist, how to go about doing so, etc.?

I’m guess I’m looking for a primer on how Inform content is delivered outside of local Z-Machines, especially in a multi-player remote format, but I don’t know the right questions to ask as I’m not familiar with remglk’s purpose or the logistics of ClubFloyd.

For the first part of this question, look into Guncho.

For the second part, a lot of interpreters use the Glk API for input and output. There are a lot of different implementations of Glk, ranging from the fancy to the simple. Remglk doesn’t do any rendering directly: it encodes all of its output (with separate windows, styles, etc) in JSON so that another program can do what it wants. (Going even further, cheapglk is a very simple implementation that just reads from stdin and writes to stdout, ignoring any other fancy effects.) So by compiling various interpreters with remglk as their frontend, they can be hooked up to Floyd on the MUD and be usable.

Guncho, wow, amazing. I wasn’t aware of that as a possibility.

Thank you for pointing me in the right direction.

There are two libraries that rely solely on stdin/stdout. CheapGlk drops all styles, multiple windows, and other fancy effects and produces a simple text stream. RemGlk encodes all the effects as JSON data so that the receiver can display them appropriately. Floyd uses the latter.

Oops! Corrected my original post.

Google Hangouts could be an alternative to Slack. I know it can handle a lot of people, like when Obama’s had hangouts. But it doesn’t support XMPP anymore, so someone would need to write a connection using their custom api. Which I’m sure is possible, but I also suspect there isn’t anyone with enough free time and inclination to do it…

I’ve been fiddling with this all day with no luck. The process is just so opaque I’m having trouble wrapping my mind around it. I could follow a tutorial but when stuff starts out with “compile x and y together” I’m just like “whoosh”.

Ideally I’d like to be able to run frotz on my webhost (I’d settle for locally), then have my slack team users interact with it. Something like this.

I feel pretty confident that I can take content out of Slack (they have reasonably robust methods in place for this) and put content back in (I’ve used IFFT with it). What I’m not sure of is how to get the command into an interpreter and the resulting data out of the interpreter. Remglk seems wonderful, but I don’t know how to compile an interpreter with it or if it’s possible on OS X. This is my next step, to try and figure it out? I think?

Slack would be a great platform for working through an IF game and I think it’s pretty clear how to make it work. But I just can’t figure out how to “put it all together”. Is anyone else interested or working on this by any chance? Am I missing something? Any help would be much appreciated.

So… got it working. I’m pretty excited.

I messed around with the perl wrapper but ultimately I just don’t know enough perl. I ended up setting up a debian virtualbox (in the hopes of eventually moving it to a server), then compiling dumb frotz with glk. Using slack client for python, I wrote a script in python to handle the input and output.

Just need to test it thoroughly to catch any subtle issues and then I can introduce my friends to 9:05. My next goal is to incorporate remglk for the formatting but I feel pretty good about the progress so far.


Yeah, it’s pretty awesome to see it working! Only one “oops in a while loop that spams the result to slack” while working on it too. :wink:

I spent most of yesterday tweaking. It now runs frob, dfrotz, and glulxe (glk). I also rewrote it to be more like a standard bot, so it resets itself after a game closes and goes back to waiting. And I moved the game list, which is already getting unwieldy, to a separate file.

It would probably be nice to have it automatically get games and their information (I’m sure the info needed is on ifdb) but given that there’s very little safety stuff in place (primarily “run in virtualbox” and “if one of my friends messes it up I know where they live”) I think manually is really the best way to go.

I will probably look into this github thing and make it available for everyone who wants it, if I can figure out how!

Hey absinthe,
That’s awesome - it looks like you’ve knocked something off my TODO list without any effort on my part!
Please update us with your Github travails… (I’d also be happy to help out if you get stuck)

Glad to help! It’s not super pretty, but it’s done and I’m confident that it works as intended. And it’s not the worst spaghetti I’ve ever made. Hah.

I kind of cheated on the github thing by using the web interface for everything. Hopefully I didn’t mess anything up. I downloaded a zip copy and tested it against the tutorial in the readme (very cursorily) and it works. Of course, it’s subject to the same issues any parser that outputs to terminal is, ie, the game doesn’t necessarily look exactly as the author intended. Careful game curation will be a must.

Also, I have frobTADs, glulxe, and dfrotz in my install, but the tutorial only covers compiling dfrotz (so far). I don’t see any reason it couldn’t accept any interpreter (or command line program that outputs text, with some tweaking), as long as it outputs similarly to GLK (frobTADS in “-i plain” mode, for example, works fine).

I’m hopeful this will get my team interested in IF too! Playing “multiplayer” is a whole different experience.

Here is another option. Use to create a linux machine on which you install frotz and the games you want. Then run it and share the link with other. The instance will be used by your friends in their terminals and you can control when you launch and kill it. If you use less than one hour at a time, it will remain free. At worst, it is 0.6 cents per hour for the smallest instance, which will be largely sufficient for frotz I think. Quite affordable :wink:

Have a look at the video presentation here:

Scroll down half a screen and click on the red ‘watch video’ button. At 1:15, it shows you how to share your running instance. Others will be able to actually run commands in frotz too. This may or may not be what you intend but there is also a chat area…

I am not affiliated with them in any way but I seriously plan to use them in ~1 month for a programming tutorial I will be giving.

Do you think this could help you?

Well, for me, the main reason to use Slack is I’m already on Slack with the people I’d want to play with. If I want to get my friends interested, I have to set the bar to entry as low as possible, and “set up another login” is probably not going to happen. I can also see a use case where someone might set up a specific game and keep it persistent, almost like a MUD. With Slack, you also have a built in transcript that is very easily searchable.

Also, I updated the readme on slackifpy and made a few minor tweaks so all messaging from @ifbot is being sent to the terminal when in debug mode (instead of just most of it).

I am having some trouble with zblorb files (I was trying to set up Headless, Hapless for Halloween and Fragile Shells since my team loves The Martian). If I try gluxe, I get “Glulxe fatal error: This Blorb file contains an executable chunk, but it is not a Glulx file.” and if I try frotz, I get "Fatal Error: Unknown Z-code Version. This is using my Debian compiled versions. Is there an interpreter I’m missing? Renaming the files to gblorb doesn’t seem to help?

You need a more up-to-date frotz interpreter.

Interesting. I’m definitely using the most up to date source (from github, 2.44), at least as far as I can tell. If I compile it regularly (on OS X) frotz runs zblorb just fine, but the dumb frotz compile won’t (same “Unknown Z-code version” error). Unfortunately, it looks like the “-p” options for frotz isn’t clean enough. Part of the problem, I’m sure, is that I don’t really understand how encoding works*. Which I think will probably be my next step unless there’s some way to compile dfrotz better (or some other alternative)?

  • To be honest, I’m kind of out of my depth here. Still swimming. Maybe I should try to use remglk? Gargoyle? Just let zblorbs be unsupported?

Oh, I found frotz 2.5.0. It was super easy…

“It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard.”

Seriously, though, my google fu has failed me. I think it looks like dumb frotz is slightly behind regular frotz (?). And I don’t know how to link frotz to glk. The gargglk version of frotz has a readme that suggests it’s possible but I’m having trouble figuring out how.

I did locate a program called bocfel that basically does what I need it to, and I can compile it using the techniques I’ve collected over the last few days. So Headless, Hapless and Fragile Shells are both playable (yay).