#dxforth — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #dxforth, aggregated by home.social.
-
Initially, I was just fooling around, creating code snippets to see how it all may fit together. Quick, dirty hacks you know.
But somehow things got more and more refined and today I was able to test my little two-word #textadventure #game #parser by walking between two rooms.
Written using #gforth but also works with #dxforth on #cpm80
-
Back to some code exercises. Technically, you could write a #textadventure game in #Forth using the dictionary and the command prompt. I've seen at least one code snippet following such an approach.
However, I want a "classic" #parser (e.g. TAKE SWORD) and make sure it keeps the user "fenced" inside the game engine.
This means I need arrays of strings to provide lists of words the parser can check the user input against.
So here is some basic research on how to accomplish this in #gforth (also works with #dxforth)