NOTE: This is entirely vaporware at the moment, so if you’re looking for working code, come back in a month or two.
I’ve monkeyed with many different IF platform ideas over the last two-plus decades. Back in the late 90’s I created an editor for Inform. I tried XML, Visual Basic, and later on FyreVM (the credit for FyreVM really goes to Jeff Panici, a friend of mine who game me the idea of “channels” and Jesse McGrew who took my ideas and made them real in C#). I was probably not a focused enough programmer to implement a virtual machine or my own compiler, so my efforts have always died in their infancy.
Even so, this is just one of those things that’s always been on my mind. I like building tools. I love telling stories too, but finding the time for story-writing is challenging. Tool-building is easier to jump in and out of on an erratic schedule.
One of the ideas I’m exploring is data-driven IF. So everything about the story would be stored in an in-memory database and a program simply runs based on that data. An object tree is never inflated. The story progresses by manipulating the data. For this I’m building a customized graph data structure (Vertex/Edge with properties).
Another idea is that output should be a first class service. To be able to identify parts of text, types of text, and have the ability to provide the logic on how all of the given text for a “turn” is aggregated, formatted, and emitted.
The code itself is C# with fluent constructs. This just means that objects can be built in steps with functions that continually return the initial object, but with more detail. It’s also very readable.
Debugging. I really like the idea of being able to step through code. To be able to write unit tests. To show that code is functioning in the order we expect and when it doesn’t, identify the flaws.
Rules. Use some of the same concepts from Inform 7 regarding rules.
Eventually there’d need to be a text version of the story, but honestly that’s a future item. If I get past these initial design elements and get this working as I envision it, a more robust library would be required. So the verification steps are:
- Make Cloak of Darkness work
- Make Adventure work
- Identify weaknesses, refactor, rebuild, repeat at least once (but probably more than that)
- Create language syntax for import into C# program and export back out
- Implement web version in Web Assembly (assuming C# compilation in Web Assembly will be further along by then)
All the work will be contained in a github repository: github.com/ChicagoDave/refly