"FrankenDrift": Play ADRIFT games on Mac and Linux

Back in May I started work on a project to make ADRIFT games playable on macOS and Linux. The project was quickly put on the back burner when COVID cases in Germany plummeted and I suddenly had a life outside of the internet again, so it’s still a bit basic – graphics and sound are conspicuously absent – but since we have an ADRIFT entry in ParserComp I figured I’d push this development version out right now.


As you can see, text effects (bold, italic, underline, color, and size) are all working.

How I Accomplished This and Origins of the Name

ADRIFT 5 is a .NET application, written in Visual Basic. Since .NET is cross-platform now, porting was mostly a matter of tearing out the Windows-only UI code (WinForms/Infragistics) and redoing the UI using a cross-platform library (Eto.Forms). That’s how I came up with the name: the application is a sort of “Frankenstein’s Monster” consisting of the original Runner logic code with a new UI layer stapled on top, using a healthy helping of ‘glue code’ to make an API that is compatible with how the original Runner interacts with its frontend.

Downloads and Instructions

FrankenDrift lives on GitHub. Downloads for macOS, Linux, and Windows are provided.

macOS

The GitHub Releases page has a .dmg download containing a self-contained .app. (“Self-contained” meaning that the .NET runtime and all libraries are included.) Simply download the version appropriate for your system (Intel and Apple Silicon versions are provided), place the .app in your Applications directory, and run (you’ll probably need to right-click and select “Open” from the context menu to appease Gatekeeper – I don’t have a way to sign these at the moment.)

Linux

Due to the plethora of distros out there, the Linux package isn’t quite as convenient as the other two.

  1. Install the .NET 6 Runtime. Instructions for most popular distros are available in Microsoft’s documentation.
  2. Download the .tar.gz file from the GitHub Releases page and extract it somewhere.
  3. Run the FrankenDrift.Runner.Gtk file.

(Versions prior to 0.3.0 used the .NET 5 runtime and required libgdiplus for graphics.)

Windows

As of Alpha 6, the provided Windows downloads are self-contained and should run on 64-bit versions of Windows 7 or newer. Simply download, extract, and run FrankenDrift.Runner.Win.exe.

Known Limitations

The following features are known not to work, or only with limitations compared to the Windows ADRIFT Runner:

  • graphics: available, but always appear in a separate window
  • sound: not available
  • map: for viewing only (since v0.6)
  • text justification (e.g. centering): not available
  • separate windows: available, but always free-floating
  • font changing: limited to fonts available on your system
  • setting the default text font/size (developer-chosen default colors work as of v0.2.0)

While we’ve come a long way, we’re not quite at feature parity yet – please keep these in mind when judging games.

Feedback

If you run into issues that aren’t related to missing features, please drop me a note or open a GitHub issue and I’ll see what I can do (no promises though).

26 Likes

That’s great! Do you think this will ultimately become a pull request on the ADRIFT GitHub? (I suppose you’d have to rebuild all of those remaining features first?)

Also, I see you’re demoing the ParserComp ADRIFT game, “Grandpa’s Ranch.” Does Grandpa’s Ranch include (or benefit from) any of those missing features? Graphics, sound, in-game map, etc.?

Maybe some day. No promises.

It does have those (it’s quite a nice example of ADRIFT’s multimedia capabilities, really), but as far as I can tell they’re not necessary to solve any of the puzzles. But I’ll say this again, just to make sure everyone gets the message:

If you’re using FrankenDrift you may not be getting the full experience in the games you’re playing! Please don’t judge a game’s presentation based on how it appears in this crutch of an interpreter!

2 Likes

I’ve heard tales of such a place. Tell us more!

3 Likes

Linux
Due to the plethora of distros out there, I don’t have similarly convenient bundles available for Linux.

Building from source is a valid option. I present you some universal package formats you could take a look if you’re interested in format that would work on most systems:

Snap

Flapak

AppImage
https://docs.appimage.org/

3 Likes

“Where’s the lamb dependency sauce?!” – me shouting at Visual Studio while it is having an existential crisis trying to decide whether or not my dependencies exist.

Anyways, there now is a GitHub repository, and Alpha 3 is up with support for graphics and secondary text windows. A Windows build is included for the sake of completeness, but it kinda sucks unfortunately. (WPF has a very, shall we say, limited idea of what a RichTextBox should do, and doesn’t actually support any text styling :face_with_raised_eyebrow: so I’m afraid the experience is not representative of what you would get on Mac or Linux.)

Note that, on Linux, you will need to install libgdiplus through your distribution’s package manager for graphics to work properly.


Update 2021-07-14: I’ve pushed out Alpha 4 which should address arbitrary hangs/crashes (Windows only) and duplicate text output. (See the issue report and discussion here.)

4 Likes

Aaand we’re up to Alpha 6, with the following fixes and improvements:

  • Increase default font size slightly (#2)
  • Fix crashes when graphics window is closed (#3)
  • Attempt to substitute a different monospace font when the requested one isn’t available.
  • Text styling now works on Windows
  • Windows download now includes all dependencies (including the .NET runtime)
5 Likes

I was hoping this interpreter would work with my screen reader, and serve as an alternative to the standard ADRIFT runner (which also isn’t accessible), but it doesn’t quite work.
I’m assuming there are two text boxes, one for input, and another for output, but I can only access the output box. There is no way for me to input commands, or switch to the other text box, and I was able to delete the text in the output box for some reason.
I use NVDA, which you can get from www.nvaccess.org.

1 Like

Hoping for some guidance here… I’m trying to playtest a game on my mac using Frankendrift. I downloaded the dmg file, and it will open the game and it looks like the opening screen of a game should, but it won’t take any commands. I can type, but nothing happens. The game’s first prompt is to press any key, but pressing any key just types that letter.
It is always the best bet that this is my fault as an illiterate user and not the author’s, so I wonder if anyone has any suggestions?

1 Like

There’s a bit of an issue in FD where it allows you to type into the output area (which does nothing). You probably just need to click into the input bar at the bottom of the window for your key presses to register. (Similarly, your commands will need to be typed into that bar in order to be registered by the game. This is different from how Inform or TADS games usually work, where input and output go into the same window.)

1 Like

That was surely it! I just knew it was user error. Thanks- I would never have seen that white bar at the bottom. Thank ye kindly!

One more question: can I record a transcript on FD?

Embarassingly enough, that’s not currently possible.

Well, I couldn’t play the game at all without FD, so I think it’s forgivable!

I’ve posted a minor update to GitHub that makes the default colors match on all platforms, allows recording transcripts, and also allows replaying a series of commands from a text file:

5 Likes

I’ve been wondering. Do you think it would be possible to run FrankenDrift (or a fork of it) in a browser on the client side, the way Parchment does? Perhaps using Blazor or some other way to convert IL to WASM…?

Yes, that would be the final boss, so to speak. At the very least I’d have to write a new UI layer, which is frustrating but hardly a show-stopper. Microsoft’s pitch for Blazor sure makes it sound like it should be possible in theory:

Because it’s real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application.

…but whether I can figure that out is a different question. I’m not much of a web developer, and I have exactly zero experience when it comes to today’s client-side/SPA stuff. I’ll look into this when I have some more spare time, hopefully in March or thereabouts.

1 Like

Quick update: v0.2.0 is up, bringing support for developer-chosen default colors, and command recall using the arrow keys:

2 Likes

Question about FrankenDrift. Currently we don’t recommend FrankenDrift on the list of ADRIFT Interpreters on IFWiki https://www.ifwiki.org/ADRIFT_interpreters because FrankenDrift is marked as “Beta” instead of “Stable.” https://www.ifwiki.org/FrankenDrift

Granting that FrankenDrift isn’t “1.0” yet, do you think FrankenDrift is ready to be considered a “stable, recommended interpreter” for Mac/Linux users?

(I think it might well be…? On Mac, the only alternative is Spatterlight, which doesn’t support ADRIFT 5, and the WebRunner, which does a round-trip to the server every time you type a command.)

1 Like

Eeeh, sure. I’m not currently aware of any stability issues.

4 Likes