3 ms·
Although I hate to recommend proprietary software, you might be interested in looking at Inform 7, designed for authoring interactive fiction; https://rosettaco
by kragen 5y ago
Although I hate to recommend proprietary software, you might be interested in looking at Inform 7, designed for authoring interactive fiction; https://rosettacode.org/wiki/FizzBuzz#Inform_7 https://rosettacode.org/wiki/FizzBuzz#Inform_7 has an example:
The space is a room. An item is a kind of thing. In the space are 100 items.
To say the name:
let the count be the number of items carried by the player;
say "[if the count is the count to the nearest 15]fizzbuzz.[otherwise if the count is the count to the nearest 3]fizz.[otherwise if the count is the count to the nearest 5]buzz.[otherwise][the count in words].".
To count:
if an item is in the space
begin;
let the next one be a random item in the space; silently try taking the next one;
say "[the name]" in sentence case;
count;
end the story;
end if.
When play begins: count. Use no scoring.
- anthk 5y agoInform6 is almost as simple if you are a programmer. I mean, is not "real life language alike" but the IF6 library makes the easiest platform to write a text game as you can set the structure of the game by design, with "literal" objects.
- mindcrime 5y agoOne day... yes, one day, Inform7 shall become Open Source.[1] Or so they claim. At this point, I'm not sure which will happen first: 1. Inform7 source is released under an OSS license 2. Patrick Rothfuss finishes the Kingkiller Chronicles book 3 3. George R.R. Martin finishes the final A Song of Fire and Ice book 4. Dean Koontz finishes the Moonlight Bay trilogy book 3 I'm skeptical any of these events will happen in my lifetime. Or the lifetime of the universe we live in. sigh [1]: https://news.ycombinator.com/item?id=20421189 https://news.ycombinator.com/item?id=20421189