Help me with my "Choose Your Own Adventure" app please

Thanks for your patience!

Here is the link to the remixable project:
https://x.thunkable.com/copy/742b4af32e2e1a782b0df119060665d3
(after 60 days it expires, so DM me if you need an updated link)

Short Answer:
The Bandersnatch-esque / Choose-Your-Own-Adventure style of the game maps beautifully to JSON hierarchies! The key to this app is that the map of the Game options (choices) can be transformed into a saved LIST used to access that point in the game.

Long Answer:

I will start with apologies for the UI. It is miserable, but I wanted to get the core functionality out there. The key is the parallel structures of the STORY and the GAME.

I have NOT included block for Firebase Authentication. Search the group for how to set that up. For an app with multiple players that is essential. In this example, I have hard-coded the player to drted (me). I would recommend using the UserID returned by the Firebase SignIn Block. That will give you a unique user ID for the firebase database.

The Reset App button creates some sample games to help you understand the hierarchy.

Let’s break these down.

First let’s talk about the Story. As @anderson28dss31 indicated, this is a Choose-Your-Own-Adventure (for those over 40) or a Bandersnatch (those under 40) style game. This solution is based on the one way decision structure outline (This solution could be adapted to other structures with some effort). For each level, there is a narrative (telling the player what is going on) and the choices they have.


Other properties could be added, such as images. This object couplette can be repeated with any number of choices and for any number of levels. As long as this pattern is followed, the saving of progress is a very straightforward.

Here is a JSON hierarchy of “PLAYERS” and “GAMES”. This allows for any number of player with any number of games. The Reset App button creates 2 games, but this could (and should) be easily expanded to handle any number of games.

Notice that the GAMES for a give player is a list. And each element in the list (the saved game) is also a list. The list mirrors the STORY Hierarchy.

The first game is the starting point in the game (just the STORY level of the JSON hierarchy). The second game starts with the story and includes one “choice” the player made (go Left).

So this list represents the JSON hierarchy of the story. So to display the next play choice, simply navigate to the position in the story indicated by the saved game.

The JSON Hierarchy can have all sorts of decorations, but the core of the system is a couplette. The first object of the couplette must have 2 properties (but there can be more).

When the player makes a choice, the game LIST is updated with both the CHOICE level and the actual choice the player made (e.g. Go Left). Following this structure. There can be any number of choices at each level and any number of levels.

Again, I apologize for the abismal UI. But hopefully this will get you started. Please feel free to DM me to talk about how do adapt this to your existing game structure.

4 Likes