More Undum examples

Here's two more small Undum examples, with commented source code. They use slightly more advanced techniques than the previous one.

Monty Hall Paradox

An implementation of the Monty Hall paradox, this example lets the player guess which door holds the best prize in a game show. The correct door is randomized and the story text changes according to the player's choices. The player is asked to give their name before the story begins and the name is later used in the story text.


A simple randomized combat system. The player character and NPCs are given attributes and combat is resolved by throwing dice. The player has health potions that restore hit points.

Did you find this article useful? By subscribing to the blog's mailing list you will receive an email whenever a new blog post is published. The address won't be used for any other purposes.