HACKER Q&A
📣 simonebrunozzi

Best language/framework to develop web-based text games today?


If you were to develop a new web-based text game today (e.g. A Dark Room, Universal Paperclips), what language / framework would you use? RoR, JS, Typescript, etc?



👤 ramchip
If it's single-player, JS, so that it runs in the browser without having to constantly talk to the server. If it's multi-player, perhaps Phoenix LiveView, to avoid writing JS!

👤 vandyswa
Why do you assume you need a framework? JS in the ES6 world is a perfectly adequate language, and the obvious RESTful API back into the server can be coded directly. Hand code your HTML and CSS, and if you don't know how--learn.

On the server side, I use Python CGI's for very lightly used API's, a Python microserver for moderate, and Golang for high performance.


👤 joshxyz
yknow typical startup answer: the one you are comftable writing code in where you can iterate fast and ship to users fast

👤 kryptiskt
I like Inkle's Ink https://www.inklestudios.com/ink/, which can compile to Javascript (though Inkle uses it with Unity and do quite graphics-heavy games, albeit text-driven).

👤 segphault
You might want to check out Kni, a JavaScript-based interactive story language for text adventures and interactive fiction: https://github.com/borkshop/kni

👤 savanaly
I really like Elm [0] and write all my side projects in it. There are many reasons I like it, but the one that probably plays best around here is that it feels like a very learn-it-for-life type language. It has a release cadence measured in years (the latest version, 0.19.10, was released in October 2019!), and a community that has adapted to match. Elm doesn't release shiny new features often, or even necessarily ever again, but it has everything I need to make every web game I could possibly think of already so that's a good thing.

[0] https://elm-lang.org/


👤 toppy

👤 matrixcubed
Godot, for a few reasons:

- It out-of-the-box exports for web;

- Its GDScript has a low barrier to entry;

- Its UI is very well implemented and simple to learn;

- Should you decide to build your game for other platforms (Win/Lin/Mac, you can;

- If you have a budding interest in game development, you’ve already started with a good engine choice, and can pivot to adding graphics/sound, animation, 3D, multiplayer, etc afterward.

Edit: formatting


👤 IceMetalPunk
For something as simple as a text game, and with web-based as a requirement, plain JS/TS is more than adequate. (Honestly, for something this simple, vanilla JS would be enough, but I see no reason to ever use JS without TS if you can help it.)

👤 AlbertMoral2018
Javascript or Typescript. They are universally available and great languages to learn