Thank you so much for playing! This was made in HTML5 using Construct 3.
Construct 3 doesn’t have traditional source code, or at least no file that you can open without a paid plan, but I’ll give a rough description of what’s going on under the hood:
- This spreadsheet is loaded in as an array: https://docs.google.com/spreadsheets/d/1iuRogC2fPwGq4a4f6Jte9lYoKAw_waMUbX3FDyJAY1w/edit
- The program then clicks down row by row with each tap, displaying the text and images called by that row.
- If a row is marked “check”, the program rolls a number 1 to 100 and checks it against the threshold of that stat’s point amount. (0 points for 1-30, 1 point for 1-60, 2 points for 1-90, 3 points for 1-100 or no chance of failure.)
- If the rolled number is within the threshold, then the check is a success and the associated text and image is displayed. If not, the game automatically clicks down to the next row.
- If the check is marked with UnlockA, UnlockB, UnlockC, or UnlockD, then a successful check unlocks a dialogue option for the next dialogue menu. (If the check is a failure then the dialogue option in the next menu will simply not show.
- Dialogue menus are signaled at the arrival of “CHOICE [#]” lines. The options are listed below, with numbers to the right. Those numbers give the program the number of the row to jump to if this dialogue choice is selected. (There has GOT to be a less clunky way to handle this, but I don’t know it.) (Also, note that Google Sheets start at 1 and arrays start at 0.)
- The player proceeds downwards through options until they reach an end.
- While the spreadsheet presents the branches in a linear fashion, the actual structure of the game utilizes what I like to affectionately call the “Shadow the Hedgehog Framework.” You can see a rough visual representation of the branches here: https://docs.google.com/open?id=1DsntJdyh0Rbw62pQm0oEV84Q50uXWAN-0ytOnLFAgbU
- (This is not en exhaustive diagram—just what I worked off of while writing. There’s a few very careful decisions you can make to get from the far right to the True end at the last minute, for example. I wanted to prioritize player agency over stat consequence, if that makes sense.)
Hopefully that answers your question without overloading you with information! I’m a narrative designer as my day job so I’m very passionate about new ways to play with dialogue trees. If you’d like to play something even more experimental (and clunky…), I have another DirkJake dialogue game here: https://iconoclastcafe.itch.io/elevatorstuck
Thanks again for playing, and for your comment!