Inform 7 v10.1.0 is now open-source

Z-code support has become steadily less important through I7’s history. That’s where this sub-thread started – see comment above.

Some of the new proposals get into territory where “works well in Glulx and C” is more important than “works in Z-code at all”.

1 Like

Though on the plus side, the ability to jettison kits (and even language features!) you’re not using does also make it easier to target the Z-machine again. In theory (meaning if anyone is interested in doing all the work for it) it should be possible to come up with a sort of “punyI7” that…well, certainly won’t be as puny as PunyInform for I6, but will be optimized to fit as much into a Z8 file as possible.

2 Likes

For me, support for the Z-machine is less important than being able to export to a wide variety of platforms.

I wouldn’t want its removal to reduce the number of machines that finished games would run on though, so the other export options would need to cover at least as many as they do now. Otherwise, I would see it as one step forward and two back.

1 Like

Personally, I far prefer virtual machines over platform-specific executables. I’m someone who’s fairly heavily invested in interactive fiction, meaning I already have interpreters for various popular formats on hand, and I run Linux, which means there are very rarely pre-compiled platform-specific executables for my system. For me, a Glulx file and a .EXE file both require some sort of emulation to use, and the Glulx one is far more likely to work without issues (and work in the way I want it to! I still haven’t found a way to make WINE respect my screen magnification settings).

Now, I fully recognize I’m in the minority here. Most people don’t run Linux and most people aren’t involved enough in IF to know or care about Glulx and Z-machine interpreters; they just want something they can download and run. But I think Infocom made the right decision when they decided to have a domain-specific VM that could be implemented on all different platforms. If you want to run Inform games on a shiny new phone, you just need an appropriate interpreter and suddenly all the games from the past 30 years are available, rather than needing to recompile decades-old (often-closed-source) games for a new platform or emulate an old version of Windows as best you can.

3 Likes

Remember that the goal of the C back end is not to give you .exe binaries to dowload for IFComp. It’s to integrate with larger game frameworks like Unreal. (Or, with a C# back-end, Unity.)

Which is to say: you are no longer the only use case here.

3 Likes

Oh, absolutely. And given how much effort has been put into keeping Z-machine support intact when it would be much easier to abandon it (meaning the entire Flex system would no longer be needed, for example) I don’t think it’s going anywhere any time soon.

I just want to express why I think it’s a good thing that Graham’s kept it around. C export is not at all a threat to that, especially when I7 can build a playable website for you (which is better than an executable for most potential players anyway).

1 Like

This actually brings up a question I’ve been wondering about, though.

There are two main reasons to use inline assembly at this point. One is if you want to do something that only one specific platform supports, and it makes sense that this would have to be platform-specific.

But the other is when there’s something every platform supports, but I6 doesn’t have a special syntax for it. For example, bit-shifts don’t come up much in IF, but both the Z-machine and Glulx have opcodes for it. So if I need bit-shifts in my I7 code, for whatever reason, I’ll define a routine in I6, to assimilate into Inter, which has the platform-specific implementations written in inline assembly. So far so good.

But what about C? How do I tell Inter that the C implementation of my right-shift routine should be x >> y? Is this a thing that can be done with splats?

Or, for another example, suppose everyone finally comes to their senses and realizes that the look-and-say sequence is vital to modern interactive fiction, and we get a @lookandsay opcode in Glulx that returns the Nth look-and-say number. I write an extension that wraps this extension in a routine so Inform authors can use it. But I also want to include a separate implementation in C, which doesn’t have a special syntax for this, but has a standard-library version I want to call. Is that currently possible, without making a new Inter primitive for it?

When you compile to C you can literally make up arbitrary opcodes that Inform has never heard of before – you just have to write the corresponding C code to handle it.

C Assembly

1 Like

Perfect, that is exactly what I was looking for! Thanks!

1 Like

I’m exploring the possibility of compiling games to C# in addition to C. Odds are it’ll be more for personal use than a fully functional thing, but that will work on Linux with no issues.

Compiling to C# is mentioned in Graham Nelson’s Narrascope 2022 talk as being interesting for Unity integration.

Compiling to Nim or Haxe would also be useful, as they both compile to multiple programming languages.

Concur and agree. I actually compile by hand with this commandline magic:

inform/inform6/Tangled/inform6 -v8 -w -~D '$OMIT_UNUSED_ROUTINES=1' $1.inform/Build/auto.inf -o $1.inform/Build/$1.z8

the power of $OMIT_UNUSED_ROUTINES gives a ~328k shell.z8, leaving an elbow space, in my very rough estimate, comparable with punyinform’s minimal.z3 so I guess that a punyI7 is not only feasible, but in a certain sense is already an I7 hidden feature :smiley:

Best regards from Italy,
dott. Piergiorgio.

3 Likes