Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ask HN: what's a good JS (browser focused) text adventure engine? I see me making a text adventure (adding one mini chapter) each day as a good lockdown project.

Note: I might call it "Everything is better in quarantine." The goal would be to (not) go mad.



The classic engine is Inform, and a quick look in the manual says it can publish to a playable webpage: http://inform7.com/


Inform is definitely the leader in parser fiction and there's been some amazing games made from it (Counterfeit Monkey and Hadean Lands being two of my favorites).

I would throw Ink (from Inkle, creators of 80 Days, Steve Jackson's Sorcery!, and Heaven's Vault) in the ring for the choice-driven variant of IF. It also publishes a playable webpage. I made a sort of unconventional portfolio-like page with it here: https://maxsond.github.io/


I'm working on a text adventure that is simply hyperlinked HTML pages with some snippets of JS for state management (just a bunch of localstorage get/put) and fancy effects. It's refreshing to go back to using the "kiddie" tools to make things.


This is awesome! Do you have the code anywhere? This is the kind of text adventure I want to do but I don't know much js.


I haven't put the code up anywhere yet but here is all of the JS (minus some trivial inline scripts):

tools.js: https://pastebin.com/p7MQE7KD

The rest of it is like:

    <p>You stand before a cave.
    <p><a href="explore.html">explore the cave</a>


Thank you so much!


> Ask HN: what's a good JS (browser focused) text adventure engine?

Take a look on ISTEAD - Simple Text Adventure Interpreter.[0]

It has JS-based version[1,2] and native versions (SDL-based in pure C) for Android[3,4], Windows and Unix-like platforms (including Linux, macOS/iOS, Maemo/MeeGo, Symbian 9.x, various consoles, etc.).[5]

Text adventures for INSTEAD could include Lua-scripts (text adventure itself & modules) and various media assets (images, sounds, fonts).[6]

There is repo with free games & demos for INSTEAD, which in most cases could be installed directly from INSTEAD clients.[7]

[0] https://github.com/instead-hub

[1] https://github.com/instead-hub/instead-js

[2] http://instead.itch.io/

[3] https://github.com/instead-hub/instead-android-ng

[4] https://apt.izzysoft.de/fdroid/index/apk/org.emunix.insteadl...

[5] https://github.com/instead-hub/instead/releases

[6] https://instead-hub.github.io/en/#doc

[7] http://instead-games.ru


Ink[1] is pretty great, and has a nice editor you can download to get started quickly. I found it really interesting to learn. It is unlike any other language I know, because it deals with such a specific problem.

1: https://www.inklestudios.com/ink/


Single- or multi-player? I'm thinking of figuring out why https://evolvingstory.juliablewis.com/ keeps crashing, cleaning it up and open-sourcing it. Also thinking of rewriting it using a different event system.


I fixed the logging so should be able to diagnose next time it crashes. Doesn't crash just for me.


Inform and TADS are the two main ones out there. If you want to do the basic stuff, Inform is probably easier. I hear TADS is more powerful if you want to extend the capabilities, though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: