Ramus is a system for authoring (and reading) self-contained non-linear documents, a.k.a. hypertext. Though not exactly a game engine, it can be used to make one, as well as learning tools and interactive literature.

Ramus is more than a little inspired by Undum, which I think is a very good concept, needlessly complicated.

In fact, I see Ramus more as a starting point than a finished product — which it isn't in any event! For a more complete solution that preserves the simplicity, see Squiffy.


On 2012-03-17, I got around to finishing my port of Starborn to Ramus.

The 2012-01-22 release includes an example of how to link to several fragments at once, and a new F.A.Q.

As of 2011-07-06, the full version features smooth scrolling. I also fixed a bug whereas the starting fragment was not being parsed for templates when initially displayed.


License? What license? All right, here we go:

If you are asking what license this software is released under, you are asking the wrong question.

Last but not least, for a real-world example see my port of Starborn, by Juhana Leinonen. Starborn is covered by the MIT License. Other works were made with Ramus; see the official website for details.


Ramus was made by Felix Pleşoianu, with the help of two excellent libraries:

Smooth scrolling code based on this ITnewb tutorial.


Development blog.

Textallion, an electronic literature preprocessor, supports Ramus as an output format.

Template system

While Mold is quite rich in functionality, the two template operators you're likely to use the most are [?do ... ?] and [?if ... ?] ... [?elif ... ?] ... [?else?] ... [?if.?] (don't use XML processing instruction syntax! The browser will gobble up your template operators before they are ever processed.) The former takes arbitrary Javascript, but usually you'll just set flags, like this [?do passport_taken = true; ?] and test them like this: [?if passport_taken?] Blah [?if.?].

Another construct of interest is [?do clear_links(); ?] -- it calls a built-in Ramus function which makes all previous links vanish, in case you want to funnel the reader into just the current choices. Otherwise they can go back and try something else, as if they were reading a paper gamebook. I'm okay with that, but other authors may not be. There is also a [? clear_text(); ?] call which erases all previous text, starting with a blank slate.

Frequently Asked Questions

Why raw HTML? Wouldn't wiki markup or Markdown be easier on beginners?
No, not really. In my experience, people who are baffled by HTML are equally baffled by wiki markup, BBCode and the likes. Moreover, people who do get wiki markup often have very strong opinions on what makes a good syntax. Markdown may be less controversial, but it takes quite a bit of code to parse, and I want to keep Ramus small.
Why doesn't Ramus hide all links from previous turns, like Undum? It's weird.
Because you may want to have a type of link that displays a couple of sentences and sets a flag, but doesn't otherwise advance the action. If you know you want previous links to vanish when you visit a particular fragment, put [?do clear_links(); ?] somewhere inside it. Or you could use [?do clear_text(); ?] instead to clear the previous text completely.
Can I include a fragment inside another?
Sorry, no. That's because of how I'm using the Mold library. If there's enough demand, I'll consider changing the code to maybe allow for it. Consider linking to multiple fragments at once instead.
Why doesn't Ramus use jQuery?
Because jQuery is too big to comfortably embed in an HTML file, and provides much more functionality than Ramus needs.