A few helpful classes for text generation

I’ve been in Greece for a conference on biomechanics for the last week, so I haven’t had time to write a proper article. As such, I figured I’d offer a consolation prize by way of a few helpful classes I’ve written while working on my text adventure game What Will You Do Next?.


The Word  class handles text input and output by storing synonyms for a word. When accessing the word, it returns a random synonym, when comparing words, all synonyms are compared.



CombinedText builds upon Word by holding a sentence, paragraph, or other concatenation of words and strings. Every time the combined text’s ToString() function is called, it polls the words and returns different synonyms to add variety to text outputs.


That’s all for now, folks, but come back on Saturday for some new screenshots of Speedrun!

Leave a Reply

Your email address will not be published. Required fields are marked *