News for hackers. Stuff that matters.
Re:Writing web-based interactive fiction with Ink by anthk on Friday April 30, 2021 @01:55AM (#26990206)
Inform6 is better if you want something closer to OOP/old-kind programming.

Also, if you want to create a non-English game i7 gets messy fast.

Re:Writing web-based interactive fiction with Ink by Agentlien on Friday April 30, 2021 @02:34AM (#26990424)
Personally if I would want to write something I'd probably just write it in C++. But a friend of mine who's an English teacher had to create an interactive story with Inform7 during his education. I was really impressed how simple it seemed for someone with no programming experience.
Re:Writing web-based interactive fiction with Ink by pyotr55 on Friday April 30, 2021 @04:09AM (#26990911)
Although the core library is not updated anymore, I find TADS 3 to be the superior language for offline interactive fiction. It's the most technical language by far, but that's why it's also the most feature rich (and for someone with a programming background, probably also the most intuitive). I'm still regularly amazed at what's baked into the standard library, that would be an absolute pain, or even outright impossible to do with other authoring systems.

http://www.tads.org/

Re:Writing web-based interactive fiction with Ink by anthk on Friday April 30, 2021 @04:07AM (#26990897)
C++ would suck for that (and any other language) as Inform6 gives you an object table and a parser for free with lots of object types such as rooms, containers, verbs, cardinal directions... already defined in the standard English library.

And the Z machine games can be run everywhere.

Declaring some room with i6 it's literally four lines of code:

The object name and the internal one, the description upon entering it, a light attribute, and a semicolon.

Re:Writing web-based interactive fiction with Ink by stevekemp on Friday April 30, 2021 @04:25AM (#26991007)
I recently wrote a text-based adventure game in C, which I then ported to Z80 assembly language. My goal was to write a simple game that could run on a CP/M system.

Using C wasn't too painful, but I agree that using something else would have been more straightforward. I've ended up in a situation where the user can type "USE TORCH", but really they want to type "LIGHT TORCH". So I added that as a synonym, but once you do that in a few different places you end up accidentally supporting commands such as:

LIGHT THE BOOK READ THE TORCH

They work, but they're utterly bogus from a logical point of view.

That said I'm pleased I managed to get it working at all, and my next step will be writing a third version using an infocom compiler & interpreter.

Re:Writing web-based interactive fiction with Ink by anthk on Friday April 30, 2021 @05:48AM (#26991487)
Try Puny Inform, it may be a Frotz port for CP/M 2.2.

https://vetusware.com/download/Infocom%20CPM%20Interpreters%...

You can use infocpm. Just hexedit the COM file to match the DAT file (rename game.z3 to game.DAT).

For example, if the OG interpreter works with zork1.dat, hexedit the file and replace zork1 with "game" so it matches "game.dat".

Re:Writing web-based interactive fiction with Ink by anthk on Friday April 30, 2021 @10:06PM (#27002238)
From dm4.pdf, the advanced manual on inform6:

  Object  -> "flashlight"
    with  name 'flashlight' 'torch',
          description "It's a battery-powered flashlight, of the sort that switches on and off.",
          after [;
            SwitchOn:  give self light;
            SwitchOff: give self ~light;
          ],
    has   switchable ~on ~light;
Re:Writing web-based interactive fiction with Ink by pyotr55 on Friday April 30, 2021 @04:11AM (#26990922)
If you really want OOP, take a look at TADS 3 if you haven't already. Made the switch from Inform 6, and couldn't be happier.

http://www.tads.org/

Re:Writing web-based interactive fiction with Ink by Agentlien on Friday April 30, 2021 @04:21AM (#26990974)
I absolutely agree that the Inform languages are great for creating interactive fiction, hence why I originally linked it.

But I have created text based adventures (usually with some RPG-style combat) in C++ a few times for fun and it can be done in a fairly clean and simple way.

Re:Writing web-based interactive fiction with Ink by WalterGR on Friday April 30, 2021 @04:39AM (#26991093)
> And the Z machine games can be run everywhere.

Even on mobile devices!

Which IF programs support Z machine output?

Re:Writing web-based interactive fiction with Ink by mwcampbell on Friday April 30, 2021 @08:35AM (#26992587)
As far as I'm aware, the only modern compiler that supports Z-machine output is Inform 6. Maybe Inform 7 does as well, but that segment of the IF community has basically moved on to the Glulx virtual machine, which Andrew Plotkin created as a 32-bit spiritual successor to the Z-machine.