Show HN: Loreline, narrative language transpiled via Haxe: C++/C#/JS/Java/Py/Lua(loreline.app)
71 points by jeremyfa 5 days ago | 20 comments
- afavour 2 days agoNow this is prime Hacker News content! Thank you. The idea of a narrative language is fascinating and I'll upvote anything that's using Haxe.
I took Haxe for a spin years ago and was really impressed, just haven't been able to find the excuse to use it in my day to day work. I find the idea of cross-platform transpilation rather than compilation to be very interesting. Particularly when working with platforms like iOS where Apple can change the ground underneath your feet, being able to continue to use first-party tools while writing in the language of your choice is a valuable niche.
[-]- jeremyfa 2 days agoHaxe is such a great piece of tech, which becomes more and more powerful as you get to know it better. I wish it was more used by companies and developers in general, but it's versatility is also what makes it hard to master I guess.
- jeremyfa 5 days agoHi, Loreline author here,
I linked to the technical overview of Loreline, a narrative language to write interactive fiction and dialogues in games, because it shows how Haxe can be used to create software that can run as a library on many other platforms.
You can try the language syntax directly here: https://loreline.app/en/playground/ And look at the code there: https://github.com/jeremyfa/loreline
Feel free to ask any question/feedback!
- jayd16 2 days agoSeems pretty promising. The language looks clean which I can't say for some of the alternatives.
The thing that I find so challenging about these types of systems is scaling up the richness of the playback.
Very quickly I find I need to integrate animations, lip sync, vfx, timed event triggers... For that you really need some kind of timeline. Delays don't cut it. So then these clean text driven systems are at best an early step in a large process or abandoned for a more integrated solution.
But I really do long for the ability to import simple narrative scripts like this even in a full production system.
One of these days I'll try to build the high production value system in a way that keeps both the full, in editor, narrative graph and the simple narrative script files alive and synced.
[-]- jeremyfa 2 days agoI actually plan to tackle the "graph in sync with the narrative script files" in the future, just not the focus yet :)[-]
- jayd16 2 days agoNice. Something short of the full lift that might be useful is to add a reflection API along with the playback API. That way implementing import/export of .lor files to an engine format becomes a lot more appealing. Something to think about, anyway.[-]
- jeremyfa 2 days agoFor more specific use cases, you can already export a JSON representation of any .lor content (can be done at runtime).
- dwroberts 2 days agoThis is very interesting - I’ve tried to make custom syntaxes for describing dialog etc multiple times, for embedding into game projects, especially since things like Ink aren’t really amenable to porting to other languages easily. So the multitarget/multi-language focus is very attractive.
One thing I will say though - I think something that would set a language/toolset like this apart, would be a high quality UI for showing how different parts flow into each other (a diagrammatic view as an essential / main view instead of just eg an addon).
I mostly say that out of jealousy after seeing the kinds of tooling that companies like eg Obsidian have for writing dialog and narratives
[-]- jeremyfa 2 days agoI talk a bit about the roadmap there: https://loreline.app/en/journal/march-2026/, and yes, there are plans to make an actual app with UI that helps navigate and analyze the narrative content, it's just not the focus yet (better to have a solid language and runtimes to run it first). More should come on that subject during the year!
- Keeeeeeeks 1 day agoThis looks nice! Would love to integrate it into an intfic project I'm working on: storyloom-weld.vercel.app
How would you say this is inspired by, and compares to, writing in literate programming languages like Inform 7?
[-]- whitten 1 day agoI like how Loreline transpiles to multiple languages. I wonder why a transpire to Inform 6 or Inform 7 has not already been done as it seems an easy conceptual leap. Perhaps I don’t fully understand the use cases here.
- jamilton 1 day agoThis seems more like Twine than Inform. Inform is for parser fic, where you enter commands ("get key", "go north", "open door"), Twine and this are for choice-based fiction.
- jeremyfa 1 day agoIt’s closer to Ink or Yarn Spinner (or to some extent Twine). Loreline isn’t doing any user text parsing, but is pretty good to manage branching dialogues and choices.
- xkcd-sucks 2 days agoI'm familiar with Haxe through the game Dead Cells, which has absolutely exquisite controls/gameplay and graphics
- ciroduran 2 days agoI used Haxe a lot when OpenFL + HaxeFlixel were still more common. Haxe is a nice programming language.
- zephyrwhimsy 2 days agoThere is an interesting parallel between the early web and the current AI ecosystem. In both cases, the winners are not the ones with the most advanced technology — they are the ones who solve the mundane infrastructure problems well.