Any FOSS Framework currently maintained to develop interactive fictions?

[For those who don’t know: an Interactive Fiction, or IF for short, is a console game where the user has to write down a command like “take hammer”, “open door with the key”, “go north” etc, and the game will reply with what’s happening, for example “you took the hammer and put it in your backpack”]

Hello everyone! A little overview: I really like interactive fictions, and I wrote my first (and only) one in high school after following the first 3 lessons of C++ programming… So I wrote it in C++. Without any while or for loops, as I didn’t study them yet. I wrote it using goto statements. Yeah, it was a pain, but I was pretty satisfied with the result, despite the many bugs and unintended behavior.

Now, after many years, I actually learned to code, and I’d like to try to write a new one. Searching the web for tools to do this I only found out graphics editor (like Quest) but they are all either unmaintained, very old looking, slow (I don’t want to wait 1 second everytime I insert a new rule). They were all advertised as “beginner friendly” as no coding skills were needed. I’d like however to use a more scripting-oriented framework, possibility written in Python, JavaScript or C/C++. I found something on github but all had the last commit many years ago. What I’d like to find is a framework that has to be used this way:


<span style="font-weight:bold;color:#a71d5d;">from </span><span style="color:#323232;">xxxxx </span><span style="font-weight:bold;color:#a71d5d;">import </span><span style="color:#0086b3;">*
</span><span style="color:#323232;">
</span><span style="color:#323232;">x </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">newIF(</span><span style="color:#183691;">"English"</span><span style="color:#323232;">)
</span><span style="color:#323232;">x.setting1 </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">something
</span><span style="color:#323232;">x.setting2 </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">somethingelse
</span><span style="color:#323232;">
</span><span style="color:#323232;">y </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">Room()
</span><span style="color:#323232;">y.property1 </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#323232;">something
</span><span style="color:#323232;">
</span><span style="color:#323232;">x.rooms </span><span style="font-weight:bold;color:#a71d5d;">+= </span><span style="color:#323232;">y
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;"># and so on
</span><span style="color:#323232;">
</span>

Is there any active framework that allows me to write an IF this way? If not, what tool do you recommend? I’d rather use FOSS solutions

Thanks for reading until here, and thanks in advance for the answers!

zongor, (edited )
@zongor@hexbear.net avatar

Sounds like you are trying to develop a MOO, i think you might find this interesting

Also if you wanted to develop one yourself I did a project a long time ago based on [queue.acm.org/detail.cfm?id=2068896](this guide for developing a language in Racket lisp to generate text adventure games) which might fit the requirements

rutrum,
@rutrum@lm.paradisus.day avatar

I never considered there could be libraries for building these games, just assumed any game would always start from scratch. I’ve not heard of any.

I made an attempt to build my own from scratch a long time ago, and I ended up with an engine in code and a yaml file to configure everything. I wonder if there are solutions where you dont write code directly, but you write plaintext configuration files and just pump it into the game engine.

bizdelnick,

Take a look at INSTEAD.

tubbadu,

Seems very interesting, but I’m not understanding if there is a way to “compile” the game or if the interpreter is needed to play it

bizdelnick,

You need an app (launcher) to play.

tubbadu,

Thanks!

JackGreenEarth,

I thought they were called text adventures.

makingStuffForFun,
@makingStuffForFun@lemmy.ml avatar

They are. That is correct.

agitated_judge,

You can look into inform6 and inform7 (totally different beasts, they are not older/newer versions of the same thing), TADS, or something like Quest perhaps. There should be more but these are the first that come to mind.

tubbadu,

Inform* is not foss afaik, right? I tried Quest and it is way too graphical, I’d prefer a more code-oriented one. Definitely will look into TADS, seems very interesting!

Kelly,
InfiniteFlow,
@InfiniteFlow@lemmy.world avatar

This. Inform was the language/platform developed back in the day to author/interpret Z-code, the basis for Infocom’s text adventures. It went beyond just that in more recent versions, but it is designed from the ground up for text adventure creation.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines