Let The Struggles Fall Away: General notes
Jan. 1st, 2021 11:01 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
"Let the Struggles Fall Away" ("Struggles" for short, so I don't have to type the full name a lot) is probably the longest fic I've ever written for Yuletide. When I looked at the assignment, my brain went "oh, they are okay with interactive fic? Cool. Let's do interactive fic this year!". This was followed with "Oh, hey, is Twine still being updated? I've met Twine."
So, one download later, I had a local copy of Twine 2. After reading some of the documentation, I decided to go with the default Harlowe for writing the story, as it seemed to be the easiest to pick up very quickly with basic knowledge of programming.
The first thing I did, since I knew that I needed to pull random words from word lists, was figure out how. I created a test game in Twine to test my first concepts while I was writing the beginning text for the game. For various reasons, like the complete lack of planning, the first attempt at the story did not do so well. (Among other things, you got the same text in the area if you'd been there one time or a thousand times.)
What did I do next? I restarted Epistory, played through the first two areas, then got to the Drowning Halls and recorded my efforts (you can see them at https://youtu.be/DgeoSl9RZGs). I used that recording to plan out each of the areas that the player could visit or needed to visit, counted all the words that needed to show up, and started planning what I needed to do. I used the test story to test out some of the coding before it went into the actual game (for example, the magic code). I learned how to make the background white, the text black, and the links a shade of brown that came as close as I could manage to the tile color in canon (with one or two exceptions) from the default black background, white text, and blue/purple links. I also removed the undo link that came standard.
And then I started writing. And writing, and writing, apparently, because this thing has a word count of about 9000 words, not counting any of the coding.
The title page is there because up until very late in the game (later versions of Harlowe allow you to designate a passage or passages where you can define your variables) that's where I was sticking all the variables, such as the word lists the game uses. I figured it was nice to leave the title page in at that point, so I did. There were a ton of word lists that were created for everything from the statues to the various pottery/rocks/brambles, to the chests and the insects. There's a small bit of checking in the game to make sure that certain words didn't repeat in certain areas (not perfect but fixed 90% of the issues).
For each room after that, I wrote a passage for the player's first visit and then one for the player's subsequent visits. So if you went back to the entrance area, you wouldn't get the whole exposition that I dumped on the player the first time around, you'd get some reflection on the area and maybe something else - for example, your cousin talks about a programming concept if you revisit the 3rd ice puzzle. Some of the bits I added in were purely random, especially in areas where the player wasn't required to go back to. For example, the player will sometimes see a reference to the game "Colossal Cave" when re-entering the hallway next to the 2nd ice puzzle room. In the 2nd ice puzzle room itself, there's a chance to get a solution to Chip's Challenge level 18 on subsequent visits. In the room where you get your magic, if you go back, you'll get to count from 1 to 10 in one of 6 different languages (German, Swedish, Spanish, Mandarin, Japanese, and Esperanto). At the cliff area where you find one of the chests, if you return you will have a friend trying to cheer you up... but she will have one of four different actions. If you return to the flooded hallway, you will see one of three different passages. In the room next to the hallway leading out into the garden, you have a chance of getting one of three special dialogues.
(I will add this in, because I mention the original Chip's Challenge a lot in this game: it became permanently free on Steam (see https://www.polygon.com/2020/9/22/21451025/chips-challenge-free-steam-windows-pc) a few months ago. There is also the open-source Tile World/Tile World 2 (which are two different forks AFAIK, not versions 1.0 and 2.0) which gives you the experience but does not contain the main levelset for copyright reasons, though if you have a copy of the original copyrighted levelset you can play it using Tile World.)
People familiar with canon will notice that the player automatically fights bugs and solves the ice puzzles. The bugs automatically get blasted because they have this irritating tendency to move plus multiple words attached to them and I didn't want to go through the frustration of coding that in a limited time frame of getting the story written and debugged in time for Yuletide. I looked at the ice puzzles and basically said "Nope. These are too complex to code in text." I also had the game freeze all the ice pathways for you, partly because the difficult-to-code part and half because I tended to do it automatically in canon anyway, why should the player have to?
Most people playing the game will probably have feelings about that puzzle. The original puzzle in the game was a bit easier/more obvious; you just had to step on the origami pads in numerical order. I wanted something a little more challenging, so I used a variant from a prior level that had stylized Greek letters. These letters shuffled in every new game. The other change I made was instead of the order being posted in the same room as the origami, it was posted across the way in the corridor. This confused my beta testers, and one of them suggested that I put an anti-frustration feature in, either by giving the player a reminder of the order if they visited the corridor, or give the player the chance to skip the puzzle. I chose to code in the reminder function. You can't solve the puzzle until you see the letters in the corridor, but once you have, you don't have to memorize the order because the game will do it for you. (You just have to click on a link while you're in the puzzle itself to have the game give it to you.) The puzzle mini-map is set up to check which square of the puzzle you're in and mark it on the map. The map was once hidden behind a link, but both I and my beta testers found it more useful if it was on all the time, so it is now. The same section of code that shows the mini-map also displays the hint if you've visited the corridor.
In a sense, the puzzle was a pain to code, but it was outshone by one particular thing: the magic! It seemed like if anything went wrong in the game, 90% of the time it was with the magic.
Each magic area either had something you had to click in it or didn't. The places where you didn't have to click anything were the easiest of all and I only had one code fragment for that. The places where you did? Those were the ones where things went wrong. I originally had the text "you see words form above (piles of pottery)", with no count and the words separated by spaces. These eventually were separated by forward slashes and then later on by commas (which took me a while to figure out how to make sure they only showed up when I needed them to) and actual counts. Sometimes I typoed one of the variables so either the game got confused and threw up an error, or gave incorrect input (for a while, I had the Mysteriously Reappearing Bramble in one room, and in another, the related Pile of Pottery That Wouldn't Go Away). The game had to keep track of which pottery/brambles/rock (from now on just pottery) words you'd clicked on for which room and display the correct amount of clickables and words for those accordingly. To save memory space, I did not choose the words for the pottery beforehand, so if you go to a room, leave, and come back they will have different words associated with them. The reason they bounce up and down when you click is based on tester feedback to affirm that yes, you did click on them.
(The three brambles had colored links instead of the standard brown, and on the 29th of December the rocks got grey-colored links. I'll go into why later.)
There were five clickable chests in the game that were handled a little bit differently than the pottery. Each of these had to have multiple words/letters associated with them, and true to cannon, the words/letters had to appear sequentially. The system kept track of which words/letters you'd clicked on so if you didn't finish opening a chest, you could go back and finish. Four of these were memory chests, one gave you inspiration. Because of the way the coding works for making each word/letter show up in sequence, unlike the pottery/brambles/rocks, the words/letters for the chests were determined beforehand. Each displayed my interpretation of a canon memory, since I didn't want to use the canon pictures. I chose a length of 2 letters repeating 3 times each for the repeating letter chests as it gave a good idea of how exasperating those could be without totally annoying the player.
A late addition for most of the game was the spear puzzles that block some rooms. They use some of the same coding as the chests and some of the same coding as the pottery. The words are not chosen at the beginning and don't show up sequentially, like the pottery, but you don't get access to the rooms until you lift both spears. I at first only had the player solve the spear puzzle that allowed you to get inside the building, but coded the rest of them in based on tester feedback. One set of code makes sure the player has clicked on both words for the spears and records that, and the second piece of code looks for that record and allows the player to enter the room.
The battles were fun to write! They display victory text depending on how many pieces of pottery and so on the player has clicked. If the player hasn't clicked on a lot of stuff, they'll die a few times; if they click on everything, the battle is no sweat. The word list for the battles is drawn from a variety of word lists, and a large amount of the words are from the Epistory word list (though not all - some Japanese and Swedish words crept in as well). The colors on some of the words depict monsters that can only be defeated by fire or by ice, and I tried to get as close to the canon colors as possible by taking a screenshot from my playthrough and using GIMP to figure out the colors. (The links for the lava brambles are the same color as the fire-only bugs because I had the color handy and silveradept, my canon beta, suggested changing the link color for those; I also changed the rock colors between story and author reveals for fun.)
One of the features that was implemented late (around the same time as the statues and the anti-frustration feature for the puzzle) is printing out the player's score at the end, to mimic the canon inspiration and number of chests found.
I had a few non-fandom beta testers (family and friends) test, and then I was lucky to get silveradept to do canon beta testing and Karanguni to SPAG. Both of my named betas are incredibly cool people who helped me out. One of my non-fandom beta testers is in IT so I asked them to see if they could break the game. They didn't, but they did have a fun time testing some rather buggy builds.
Trivia-wise, my mom did play Chip's Challenge, but I don't think she ever beat it. (I also have played Chip's Challenge, but have never beat it.) The reason for the references is because when I was playing through the ice puzzles for the first time I was having Chip's Challenge flashbacks! The original title for the story was "To Let Her Sleep" and the beta test title was "Something Something", before I decided what theme/reference I was using for my titles this year. (The title actually has a small typo; the translation I was working off of said "Let the struggle fall away", but when I emailed the mods to let them know my then-12 word fic was actually a very long Interactive Fiction, I goofed and wrote "Let The Struggles Fall Away". To keep consistent, I stayed with that title for posting. Three of the friends/relatives that you can encounter are named after "Youth With You 2" performers - Keran is named after K Lu/Lu Keran, Esther is named after Esther Yu/Yu Shuxin, and Marco is named after Marco Lin/Lin Fan.
Things I would have done had I had time, and may yet do in a version 2.0? I would change certain word list arrays into datasets. Certain things like the statues and the single-letter chests are supposed to have their words/letters reflect each other (statues are palindromes; letter chests are supposed to have you type the letters opposite one another). Maybe add bug battles.
But all in all, this was tremendously fun to write and code. Even debugging seemed to cheer me up - it was weird! But my recipient loved it, so I got done exactly what I wanted to do, which made me happy.