3 ms·
A goal of mine that I currently lack the time or energy to execute on is a simple open world game with most of the game world rules exposed in a Forth-like API/
by eximius 3y ago
A goal of mine that I currently lack the time or energy to execute on is a simple open world game with most of the game world rules exposed in a Forth-like API/programming language.
Then take some runes/glyphs/circles/shapes and train an NN to translate them into programs using that Forth-like. I think it would make a game world with a significant amount of wonder in the magic. And a bit of unknowability as I'd probably add a bunch of extra features (astrological cycles, environment effects, etc) that slightly affect the spells.
- Xymist 3y agoWhy Forth, of all available languages? Unless you're riffing on that really weird series of YA fantasy where the guy falls into a world full of demons and starts converting magic into programs because it makes debugging the universe easier. Think that involved Forth. Still not sure why.
- eximius 3y agoFun book, but no. And I wouldn't describe those as YA. YA doesn't typically rant about ANSI C conferences. It's more like Discworld in that it's quite silly but not necessarily targeted at youth. My reason for Forth is quite simple: it has extremely little structure which makes it a much much easier output target to work with. At it's simplest, a series of glyphs could directly transliterate into Forth words. More complicated schemes are more interesting, for this purpose, but it would defeat the purpose of its use to target, say, C. Also, Forth is easily embeddable and interpretable with only the words I want exposed. Whipping C again, but targeting C would mean a whole mess of sandboxing and C bindings which sounds much harder than Forth words or some such. I have many other ideas too. Multiple rings of circles represent threads or some kind of concurrency, mana is used like 'gas' in the EVM to naturally denote the cost of spells and prevent abuse, possibly compile from Forth to some WASM target or something for performance, etc. Edit: put another way, Forth-likes blur the lines between a programming language and a mutable environment of high level bytecodes which makes it a natural intermediary language for some cases.