Twine alternative (for C++)


#1

I developed a small engine for writing games. All it does is let C++ output to html, so that you can write a game in C++ rather than javascript or another custom language. This isn’t a release post, I’m just looking for your thoughts on design. It is complete though, so you can try it out.

interactivetext.github.io/


#2

Ok, it’s released now, since it’s mostly stable. The intended developer audience is people who are already specifically interested in writing text games in C++. Otherwise, if you didn’t already have this goal in mind, or if you’re not sure if it’s appropriate for your usecase, Twine is a better choice. This engine is trivial to use if you already know C++, but if you don’t, it will be painful.


(jkj yuio) #3

This looks pretty cool. it is possible to build as a standalone binary as well as transpile to web.


#4

No, this doesn’t support that. (Although you’re right, because I am also doing exactly what you describe, building as a standalone binary without the I/O.)

You could replace operator® to get a true console application. But you’d lose some features (formatting, keyboard shortcuts), because they’re only possible in HTML. The library would behave like std::cout with links. Doing this is pretty simple.