Previously I announced a little Lua and C++ based text adventure engine I created and published on GitHub, freely available and playable. I intend on using it to figure out some technical problems with the Nth Society engine planning.
That link again is: https://github.com/thrize/textadv-engine
I've ported the C++ bindings to Javascript and integrated it with Node.js, my favorite way to run Javascript locally and as web apps. It wasn't too hard, the Lua library I found for it turns out to be excellent, though missing a few features.
As a result there are now three engines, all which use the same Lua game scripts:
- C++ console engine
- Node.js console engine
- Electron app engine
The most fun one is of course the Electron app engine because it's an actual app with GUI. Electron is a great framework for Node.js that allows the easy creation of desktop apps from Node.js code. I also use the Phototon UI toolkit.
^^^ You might notice the "Text to speech enabled" checkbox? Check it and see if it works for you ๐ You'll need to have the say
command installed though.
The directory structure in the project now looks like this:
textadv-engine
|-img
|-lib-js
|-src-c++
|-src-electron
|---config
|---e2e
|---fonts
|---scripts
|---src
|-----helpers
|-----menu
|-----stylesheets
|---tasks
|-src-node-js
|-testgame
The three directories starting with src-
hold the source for the various engines, and the instructions are easy to follow on the readme of the GitHub repo.