Eulogy for an old knave


I started this Knights and Knaves project in the spring of 2020, which was certainly an auspicious start. It ended up unfinished and abandoned for two years, until I rewrote it from scratch in Javascript. And I wanted to talk about all the odd elements in the original that got cut, and why the project stalled.

UI


The original game had a story alongside the puzzles. It wasn't a very good story, and implementing it also negatively affected the UI design.

The plot was that you played a little girl looking for balloons and getting lost in an amusement park (and then a hedge maze, and a mirror realm à la Alice in Wonderland). Because I wanted to animate the characters and camera moving around (entering doors, gaining balloons, popping balloons, etc.), I put the doorways in Unity's world space rather than its UI. I also had the guards standing in front of their doors, rather than off to the side.

This had two problems: I couldn't easily lay out each level to make best use of screen space (especially with two larger cut characters, the sphinx and the Cheshire skeleton), and the guards and doors couldn't be interface buttons themselves. Instead, each doorway had a redundant row of buttons beneath them, both for building questions and for choosing doors.

I wanted all text in the game to be spoken in-character by the guards you meet. Unfortunately, this meant all the tutorial text was being spoken by guards who could randomly be dishonest. This was frustrating to write, and I couldn't find a good balance between portraying guards as essentially untrustworthy while still giving the player the rules and useful tips.

Perhaps the biggest problem caused by the story was that the game didn't tell you whether you chose the correct door. At least, not explicitly - some guards had dialogue after you chose, but it was easy to skip over and had to be rewritten for each new level. The intent was to make the levels feel like a real navigable space - especially the maze. But the result was that players didn't learn the puzzle mechanics, and felt too comfortable just guessing randomly so they could explore. It also wasn't satisfying to successfully pick the right door.

Vendors in the original version gave out balloons. Balloons represented... something vague and inconsistent. They could indicate progress, but they were also used as a key item to enter the maze, and also you had to lose all your balloons to reach the end of the maze. Plus, balloons from liar vendors would pop instantly, so they weren't even a dependable measure of progress.


The climax of the story was bad. I had two vague themes: "What do you do when authority lies?" and "When is it okay to lie?". But in retrospect, I don't know the answers to those questions, and spending time programming and writing massive XML files was not conducive to the kind of philosophical introspection needed to come up with such answers. I do like the art and music I made for the climax, though.


In the released version, I cut all of the story and focused solely on the puzzle-solving experience.

Puzzles

A few special puzzles were cut. I miss them, but they didn't fit with the rest of the mechanics.

Originally, mirrors were intended to be "broken" by hacking the parser. The reflections behind the mirrors would repeat your question back to you. One mirror level merely required a question that threw a syntax error. Another required the player to recognize that questions were silently wrapped in an ASK symbol and parentheses, and to arrange parentheses in their question such that they had symbols outside the bounds of an asked question. All dumb fun, but fun; Qntm's knights-and-knaves parser talks about similar strategies using Javascript's eval function.


Another odd mechanic was granular lying. Much like how vendors are ignorant of doors, some granular liars would only lie about doors, or only lie about guards. This was an attempt to make a more convincing liar, but in the end it was just more busywork for question-building.

Finally, my biggest regret was the lion mirrors. These encounters flipped the game on its head by requiring you not to ask questions, but to tell lies in response. A lion inside one of a set of mirrors was trying to decide which to break through, and you had to convince it to choose the wrong one. This was the closest the game came to actually responding to the theme (but at the same time, "it's okay to lie to lions who are trying to eat you" isn't a particularly interesting stance). Unfortunately, it was hard to convey to the player how these new rules worked - and they didn't fit the question-asking framework, so the lion's questions were largely hard-coded.

Tech

While there were many problems with the interface, the main reason the project stalled was because of technical issues. I was exhausted by trying to work around Unity's animation system, and exhausted by my overwritten level format.

Much time in the original project was spent writing an XML reader, then handwriting the XML being fed into it, and then chasing down errors in the XML. Each level had a pool of randomizable guards, a separate pool for guard honesty types, another pool for doors and another for door honesty, plus lists of bespoke unrandomizable guards and doors which nevertheless ended up being randomized in code anyways. Since levels weren't linear, each one had to say where they went next for both success and fail, and describe not just the leaving transition animation but also some elements of the subsequent entering animation. Then, all the dialogue was shoved in - but since guards were randomized, and some guards were liars, certain dialogue lines had to search for a valid guard to speak them. And because some encounters had back-and-forth conversations, dialogue nodes had to be nested trees, and they had to sometimes link back to other dialogue nodes...

 

For the released version, I tried to go as compact as possible, and it was a success. The picture above speaks for itself - a simple small string describes everything we need.

Inspirations

The original game had a longer credits and inspirations list, and while many of these weren't relevant to the released game, I still want to mention them here. There's the obvious, of course: Lewis Carrol's books, and Douglas Hofstadter's Gödel, Escher, Bach. But there are also some more modern sources:

Leave a comment

Log in with itch.io to leave a comment.