News for hackers. Stuff that matters.
Re:Ask HN: Best language/framework to develop web-based text... by memalign on Wednesday August 03, 2022 @11:53AM (#32333379)
Re:Ask HN: Best language/framework to develop web-based text... by ramchip on Wednesday August 03, 2022 @08:58AM (#32331086)
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!
Re:Ask HN: Best language/framework to develop web-based text... by vandyswa on Wednesday August 03, 2022 @09:19AM (#32331316)
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.

Re:Ask HN: Best language/framework to develop web-based text... by IceMetalPunk on Wednesday August 03, 2022 @04:47PM (#32336489)
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.
Re:Ask HN: Best language/framework to develop web-based text... by joshxyz on Wednesday August 03, 2022 @08:38AM (#32330877)
yknow typical startup answer: the one you are comftable writing code in where you can iterate fast and ship to users fast
Re:Ask HN: Best language/framework to develop web-based text... by kryptiskt on Wednesday August 03, 2022 @09:40AM (#32331532)
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).
Re:Ask HN: Best language/framework to develop web-based text... by segphault on Wednesday August 03, 2022 @08:59AM (#32331107)
You might want to check out Kni, a JavaScript-based interactive story language for text adventures and interactive fiction: https://github.com/borkshop/kni
Re:Ask HN: Best language/framework to develop web-based text... by savanaly on Wednesday August 03, 2022 @12:37PM (#32333929)
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/

Re:Ask HN: Best language/framework to develop web-based text... by toppy on Wednesday August 03, 2022 @09:43AM (#32331563)
Re:Ask HN: Best language/framework to develop web-based text... by matrixcubed on Wednesday August 03, 2022 @12:27PM (#32333793)
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

Re:Ask HN: Best language/framework to develop web-based text... by IceMetalPunk on Wednesday August 03, 2022 @04:46PM (#32336485)
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.)
Re:Ask HN: Best language/framework to develop web-based text... by AlbertMoral2018 on Wednesday August 03, 2022 @08:36AM (#32330864)
Javascript or Typescript. They are universally available and great languages to learn