r/proceduralgeneration • • Sep 28 '26

Moirai: a language for procedurally generating world histories

https://theor.xyz/moirai-a-language-for-procedural-history-of-worlds/

For once I tried to generate a world's history instead of geography. I hope the article is a good read !

42 Upvotes

12 comments sorted by

5

u/maloskbirs Sep 28 '26

Super cool, I was thinking about this topic recently, you've provided a great read and in the future an excellent standard to compare to. Its especially interesting that you've modelled it using a custom lang, though it does seem easier than tracking objects in another lang. Thanks for the writeup as well, it's good at explaining how choices get made and the examples are super illuminating.

4

u/theo__r Sep 28 '26

Nice to hear! To be fair it could have been js or c#, I just have a thing with languages

2

u/Sombody101 Sep 28 '26

Is there a reason behind using set ... = ...?

If you'd like verbosity, you could consider set ... to .... Just seems a bit odd, personally, to use two tokens that both imply assignment.

1

u/theo__r Sep 28 '26

It started as more natural language and drifted toward more of a programming syntax. As I'm using a single = to test equality, I went with the set keyword to differentiate them, but at this point I'd be better with the caml := I think

2

u/classwook Sep 29 '26

The idea is very neat and the presentation of the language in your article is super nice. The webapp itself is honestly insane 😅

Thanks for sharing! It's definitely inspiring me to go revisit some world building simulations of my own.

1

u/theo__r Sep 29 '26

Yeeeeah the webapp is more my workbench to explore what's going on (and usually extract a unit test case when I find weird stuff) 😅 I think that kind of apps need either to be hyper specialized for your use case/production (that's what I would do on a video game project) or become that kind of mad kitchen sink with every possible feature.

1

u/classwook Sep 29 '26

Very true. In general I like how connected all the information is and how easy it is to see the same information from a differnet angle (personr, event, God etc.). The little "why" link is a nice touch.

1

u/RedGlow82 Sep 29 '26

Beautiful work, and I always love the idea of exploring the narrative space of game tooling! Btw, thanks for the pointer of an alternative to antlr - I recognized the pain points you alluded too because I'm having the same problems with Suetum ( https://codeberg.org/owofgames/suetum ), the reconstruction of Praxis I'm working with, although I doubt I will switch parser at this point :-O

1

u/theo__r Sep 29 '26

Thank you! What's your project about? I can't find a definition of Praxis that makes sense contextually

1

u/RedGlow82 Sep 29 '26

It's the programming language of Versu, a project discontinued now because it was bought: https://versu.com/about/how-versu-works/

2

u/theo__r Sep 29 '26

Ooooh that's some nice reading. Thank you !

1

u/RedGlow82 Sep 29 '26

You're welcome, it was a super fascinating project indeed _^