Stage Engine - A powerful, intelligent and flexible engine for creating interactive fiction games.

Hello all,

I’m not usually one for posting announcements and honestly it makes me nervous doing this type of thing. But, I have been working on a piece of software now since 2020 (during COVID, I had a lot of time on my hands as we all did) and while it was designed and built for myself, I have released it for others based on requests from colleagues and friends - as they wished to use it.

This project started as a pre-LLM era chat engine written in TypeScript, though quickly evolved into a system for creating adventure games, because that’s where my heart was and always has been.

I’ve been a software engineer now for 20 years and there’s a consistency to all of my projects that wasn’t surfaced to me until recently - my love of configuration files. It can be seen in all of the projects I release, whether open source or private.

So that said, this engine is built with configuration files, though under the hood it’s actually a powerful and flexible programming language which can be used expressively to create massive worlds that feel alive.

There are many benefits of configuration files, particularly YAML (the one i’ve chosen for this engine), but mainly it’s their in-built linting and ease of writing validators that draws me in. As a result, the Stage engine comes with static and compile-time analysis and validation, making sure your game’s source files don’t have obvious holes before somebody opens it at their desk.

The flexibility of the engine comes from the four core mechanics. I wanted to create an engine that felt at home just as much for non-programmers as it did for programmers. It also had to be simple, so reducing the amount of mechanics someone had to learn to a small handful.

Games can be ran via HTTP, in the terminal, via GUIs and also exported to MacOS, Windows and Linux (and i’m currently, slaving away writing runtimes for ZX, C64, C+4 and Oric-1 as experimental export options).

This is a passion project and has thrown me down many rabbit holes already, including the potential for me designing and building my own hardware that will run Stage games natively. But that’s a while away at this stage.

Anyway, I hope others find this engine useful, I certainly have. Reach out if there’s anything missing and I would love to chat about it.

https://stage.sgail.com

:heart:

Best wishes,
Bri

4 Likes

Many times I like making locations that cannot be reached until certain things happen. For example digging a hole. The outcome would cause the exit to the cavern below it to be created in the game logic. Something like the cavern would be flagged in your compilation step and it would be a false positive. I’m all for those compile time warnings but perhaps that ones opt-ness is something to consider. In regards to your “lamp” duplicate listing. Why is that a halting error?

Thanks for reaching out!

  1. The unreachable-scene warning also takes into consideration conditions (i.e when/how certain things happen) so that covers your case and would not warn you about that.
  2. The reason this (duplicate-listing) is an error is that it’s likely a typo (or copy and paste error), a single object with the same ID cannot be placed in the same scene. There’s extends which allows you to create other objects from a base template, with different IDs, which would be what should be used for that.

Hope this is helpful!

Yes, I make games with a different system currently, but was just curious. I’m sure someone will say “cloak of darkness” which is an interesting 3 room proof of concept. It has some strange logic which, in its own way, fuzzes on game engines ability to handle oddly defined errata and ending conditions.

As far as new systems go, the thing that has worked the best for me is in making a game with it and entering it into the jam. Nothing finds more rough edges, logic issues, and continuity issues like making a game with your own engine

Absolutely, this engine has ported Zork 1 (with 2 and 3 on the way) flawlessly, for example, and indeed I’ve written quite a few of my own games with it, including a demo i’ve open sourced (albeit this game is small): GitHub - stageengine/ferryman: A demo game for the purpose of learning the engine mechanics. · GitHub

But porting someone else’s game to my engine is actually a bigger test than my own, which is why I wanted to port Zork, for example.

Do tell in how you ported Zork I. I’ve always wanted to port it myself but don’t really know how to start that.

It was really fun actually, and a real stress test since this was software written in the 70s by someone that wasn’t me with restrictions that I do not have (though I now share those with porting to ZX funnily enough - hardware that Infocom never built on for a good reason).

First thing was writing a tool to read ZIL from the source ( GitHub - historicalsource/zork1: Zork I (Microcomputer Version) by Infocom · GitHub ) to understand just how the mechanics actually worked, not just from playing the game, though I had to do a lot of that to get the quirks.

I found a 411 step walkthrough (https://github.com/stageengine/abandoned-empire/blob/main/tools/zork1-350-walkthrough.txt) online that was a .txt file and I use that in my automated tests. It runs through a fairly happy path though since it was a walkthrough, so I had to do more tests for sad paths, anything the engine did when it couldn’t parse, etc.

Take a look, it covers everything from the thief’s chance rules to storing items in the trophy cabinet, and even achievements too!

https://github.com/stageengine/abandoned-empire

What kind of games would this engine be good for, and how does it stack up against existing systems like Inform and Dialog? Are there any existing games written natively for the system (not ports)?

The common wisdom is that the best way to get people interested in your engine is to write a good game that makes people say “I want to do that!” Barring that, from an author’s point of view I’d at least want to know what the strengths and weaknesses are. And I’m not much of a programmer, so the simpler the explanation of those the better!

2 Likes

Like a person who finally admits they never learned how to read, I must sadly admit that I have never finished Zork I. I’ve always meant to but, well, never have. There’s my dirty secret; hope it doesn’t change anything.

1 Like

The common wisdom is that the best way to get people interested in your engine is to write a good game that makes people say “I want to do that!”

I agree, and I’m working on a full game, though released the engine before. I did release a demo game (“Ferryman”) for the purposes of showcasing some of the mechanics so people didn’t have to just read documentation though it’s nothing to shout about.

  • Written in YAML - not a proprietary programming language someone needs to learn specifically - it’s a format that many people already understand, and comes with built in features like & and * for referencing and anchoring.
  • Linting and compilation validation - find errors or issues that might sting a player.
  • Not restricted to a specific genre - you can create RPGs, Whodunits, MUDs, GUI-driven, Choice, Parser, it has flexibility for many different types of games.
  • Mod-support - providing a way for developers/creators to add their own conditions, events, triggers and more. The engine is designed to be modular, and the things in core are for every game, not just a specific genre, so mods allow the engine to flex it’s muscles and build many more types of games. For example, you can create procedurally generated worlds and characters from mods using extends keyword in YAML.
  • Multiplayer support - If you want to add multiple playable characters, all you need to add is playable: true to your character file and all of a sudden you can expose the engine to multiplayer. On boot, a player can choose which player they want to play as. I even changed my Zork port locally as a bit of fun and played as the Thief!

Well now you can! and earn achievements :wink:

1 Like

To be a bit blunt - is this your opinion of Stage’s strengths, or was this the result of an AI query? I find that AI summaries of this type often don’t get at the heart of what players or devs in this space actually care about, likely because text games are a niche in a niche and there’s not a ton of information available for it to draw conclusions from. And the use of “multiplayer” to mean “multiple separate playable characters” and not “multiple players at a time” threw me.

Either way - from that list I don’t really see what sets it apart from existing tools other than being able to write in YAML?

2 Likes

I don’t mind you being blunt, that’s fair. I can assure you that I am a real person and I’m not talking to you via AI or using AI in my responses to you.

I’m a software engineer and those are strengths that I find valuable but I appreciate that to a non-engineer those might not quite land like they do for me. I don’t really like comparing what I build with others too much, though I do sometimes look over the fence, so to speak.

Equally, something being similar to something else is fine, sometimes it’s the little things that make a difference for some people, not the big differences.

Fair to point this out, I didn’t articulate myself well enough with that part. Yes you can choose a different playable character for a single player game, but you can also have multiple people choosing different characters in the same game to achieve “multiplayer”.

There have been a lot (and I do mean A LOT) of new IF platforms announced over the last year, the vast majority LLM-assisted to some degree. If you’re interested in getting traction for this platform beyond “here’s a toy I made, other people can use it too” (which is fine!) you’re going to need to look hard at other existing tools and articulate exactly what yours provides that’s missing from the others.

Not only are you fighting against some very well-established and well-loved languages (many parser authors here have over a decade of experience with Inform or TADS, for example), but you’re competing with the weekly parade of new platforms for the attention of people interested in switching, plus general community fatigue from the flood of new platform announcements. That’s a tall order and will require a lot of work to overcome.

6 Likes

I had a look at the source for your Zork implementation and it’s certainly easy to read, but it looks like a chore to write! Did you use some automated tools to generate all that YAML?

I also noticed that “out of location” actions, like brushing your teeth, seem to have to be implemented again and again in every scene. Is there a concept of a meta scene, or game-wide rules, or is every file self-contained in this way?

3 Likes

Yes I’m planning on some QoL improvements for making it easier to write things that would otherwise need to be duplicated around. Some of the new features like “extends” exist to solve that but not everything.

I have automated scripts for helping that port, as well as laborious copying and pasting at times. I tried AI to help me test but honestly it was quite poor especially with sad paths.

thanks for checking it out and glad it was clear and easy to read for you!

You say it can export to HTML? Do you have any online playable versions of your games?

One of the transports of the system is HTTP (the other two are GUI and terminal). When exporting the system will be bundled with both GUI and terminal access, so you can run the executables directly with --gui or --terminal (gui is the default).

That aside, I built a launcher which is an easy and convenient way to play and launch games, as well as store achievements. It doesn’t require a login, games can be loaded in offline and it has no analytics, especially if not logged in, since nothing gets stored other than your games and saves.

If I will eventually put these games on a web browser (i.e HTTP with HTML) - maybe. Though anyone can do that right now by running with the HTTP transport.

I hope this makes sense.