A kindred spirit!
Dungeons and directories is great! I've only played the beginning so far[Edit I've beat the game now and joined the secret club!], but I really laughed at the "You walk through the southern door, and straight into the chasm you saw earlier..." Picture : "you walking straight into the chasm with a smile on your face".
I ran into the same problems you did, any variable leads to an exponentially large state. Other than, "scoping" as you put (or branch merging as I put it), the most space-efficient way I found to keep state was to ask the player to remember a passcode. So the player can keep track of the state, but I don't have to (ie. exponential space savings!). Even when entering the password, you can keep the space small (n*2 rather than 2^n) see [0]. Players used to retro PC games will remember entering passwords found in their instruction manual, so it's an added nostalgic appeal.
Let me know when your error dialogs game is done. If you want to collaborate on some games, hit me up, I too love games where they shouldn't be.
I had a similar "variables" problem when designing a choose-your-own-adventure book with my kids. I wanted your character to be able to reach the same pages but have state -- e.g. have a key or not have a key. I didn't want to have to duplicate pages with different state (which I kind of remember from old CYOA books -- there's be pages with almost the same thing, but now slightly different because you entered the room with a sword or whatever).
In the end, because it's a book and not a computer game, we could just ask the user: "If you have a key, turn to page 43..." and it just depends on the user being honest (or as honest as any reader of a CYOA book is, with nine fingers stuck between pages).
I assume there were similar books in the past that used the same mechanic -- maybe the Fighting Fantasy books? I forget.
Could you have used the key as a simple crypto-key? As in, give them the two digit number, and tell them "Turn to page 17+the number of the key".
Or if you wanted to make them work a little harder and maybe teach a little math, "17 times the number mod 47".
Of course they can still be dishonest, but it gives them an opportunity to have solved a simple puzzle. They get to the correct page because they "won".
The other thing we did, slightly simpler, was introduce a plethora of choices where only prior knowledge would get you (easily) to the page.
E.g. You can land on page A a number of different ways, but only from one path do you find out the suspect is in a certain city. Then from page A you're asked if you want to go to B, C, D, E or F. Without the prior knowledge there are too many choices.
This is exactly how the game Seventh Continent works, its just a collection of 1000 cards and if you have a symbol then you sometimes draw a different card for if you have key items.
Thanks! Just played through fontemon now (I think, the final battle is unbeatable right? I think I tried every move combo). Had a bit of trouble getting it to work in system programs, but on your site it worked just fine (in libreoffice it would just repeat the intro if I changed the font size, and gimp would shift things up and down depending on the highest pixel in the frame).
Overall, awesome stuff :D Ever since I read [0], I knew you could do some funky stuff with ligatures, but I never imagined you could take it this far :D
Yeah it still has a lot of quirks. On libre office, you have to change the font size to size 2px (and zoom in) or so to play the game all the way through without resetting. Same thing happened to me in gimp, it's annoying but playable.
I ran into the same problems you did, any variable leads to an exponentially large state. Other than, "scoping" as you put (or branch merging as I put it), the most space-efficient way I found to keep state was to ask the player to remember a passcode. So the player can keep track of the state, but I don't have to (ie. exponential space savings!). Even when entering the password, you can keep the space small (n*2 rather than 2^n) see [0]. Players used to retro PC games will remember entering passwords found in their instruction manual, so it's an added nostalgic appeal.
Let me know when your error dialogs game is done. If you want to collaborate on some games, hit me up, I too love games where they shouldn't be.
0: https://github.com/mmulet/code-relay/blob/main/markdown/how/...