A Twitter bot turns old Sierra games into beautiful glitches

There’s a narrator who routinely mutters random, bewildering sentences to Adam Mathes on his Twitter feed. He’s fine with it. He put the narrator there himself. It’s actually somewhat of a comfort.

This narrator exists under the Twitter handle @quest_ebooks but started out life in Sierra Entertainment’s many classic adventure games. Mathes grew up playing those adventure games, he loved them, and so he wanted to bring their “omniscient, antagonistic, baffling” narrators through his life with him. This is why he created a Twitter bot for them to exist within.

Mathes was inspired by Andrew Vestal’s “YouAreCarrying” bot. That one tweets out item lists based on various inventory from Infocom games. Wanting to recreate a similar bot, but one concerned with Sierra games, Mathes took to figuring out how to make it work. “The hard work here was done by others long before me,” Mathes says, “Sierra in creating games, a community of fans who created tools to disassemble Sierra games, understand the formats and engines, and create new ones using the same engine, and people who created frameworks to easily create ‘ebooks’-style Twitter bots.”

With these frameworks already in place, all Mathes found that he needed to do was connect the dots. He customized a bot created by Jaiden Mispy to extract the text from early Sierra games and then generate similar Tweets using statistical models Mathes had constructed for it (if you want to know more about the technical side of this then check out this post). 

“simulating if the original bits had rotted away” 

But Mathes didn’t stop there. Creating that led to a discovery which, in turn, had him creating yet another bot using Sierra games as a basis once again. While working on @quest_ebooks, Mathes was surprised to find that the background pictures in early Sierra games weren’t stored the way he had expected. He explained that later Sierra games were bitmaps—”a straight forward mapping of pixel colors to a specific position“—but the early ones used a vector format instead. According to Mathes, this means that they are built using a series of commands. They worked like this: “draw this line, change color, draw this circle, change color, fill this region starting here with this pattern, draw a rectangle, etc.”

Using the vector format makes the background images much more compact. This would have been useful for squeezing the game’s data onto older computers (from the 1980s onwards) so it makes sense that Sierra would have used this method. For Mathes, though, it opened up his mind to the idea of trying to “glitch these things out based on understanding that data format.”

First, he found the source code to old DOS utilities by Lance Ewing. These display the images and update them to work in a modern OS X environment and output PNG images. Then Mathes had to experiment with the drawing commands of the images to try to produce interesting results. He shuffled the commands and randomly generated new ones but no significant or eye-catching results were produced. 

“Eventually, I wrote some straightforward code in C to glitch out the underlying picture files, simulating if the original bits had rotted away or changed in some way, then generated the PNG from that corrupted data,” Mathes said. With a little bit of tweaking, he got what he was after, and this is what his Twitter bot @quest_glitches now regularly shares.

endlessly remix the games of his childhood 

As with all glitches, the quality of each of the corrupted background images is subjective, but the best ones tend to be the more abstract or messy ones. You get some in which the source image is easily recognizable, it looking like a toddler has scribbled over a Microsoft Paint drawing with different colors, leading to a rather underwhelming finish. The ones that work really well are those with only one or two objects displayed on a single background color. With these, the corruption is able to completely transform whatever was once in the image into something completely different. 

For Mathes, the existence of this bot, as well as the narrator-based one, is enough. He says that, for him, “there’s some sense that with these generative programs, simple and primitive as they are, there’s this little bit of illusion of infinity and immortality to these things we loved.” His bots endlessly remix the games of his childhood in new ways, reigniting his interest in them over and over.

You can follow @quest_ebooks and @quest_glitches on Twitter. For more of Adam Mathes’s work check out his website.