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

13 points by simonebrunozzi ↗ HN
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?

12 comments

[ 3.2 ms ] story [ 38.3 ms ] thread
Javascript or Typescript. They are universally available and great languages to learn
yknow typical startup answer: the one you are comftable writing code in where you can iterate fast and ship to users fast
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!
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.

Honestly, though, if you're recommending JS on the frontend, then I'd say Node for the backend allows for an easier time since there's no language-switching required.
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

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/

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.)