Happy 40th Birthday to King's Quest

Quick Links:

  1. Play the Game (Use a computer with a keyboard and Chrome)
  2. Game Source Code (spoilers)
  3. AGI Studio Blueprint and Plugins 
  4. Using the plugins to code the game

In April of 2023, I gave a talk entitled Building And Deploying Omni-Channel Digital Experiences at Scale the Philly Emerging Technology for the Enterprise Conference, and I included a couple of references to Space Quest in the talk for some context and humor regarding the timeline in digital experience evolution.

CrafterCMS Philly ETF talk Space Quest

For the uninitiated, Space Quest is a “3D graphic adventure game” released by Sierra Online in 1986.  Like so many others who grew up playing these games that were revolutionary at the time, I loved them, and they inspired me to get into programming. Sierra’s games have a special place in my heart. They were not just games. They pushed the boundaries of what was possible with the technology at the time.

As a result of looking up the old Space Quest screenshots for the talk, the various web algorithms brought an interesting 9-year-old open-source project by Erik Sandberg called AGI.js to my attention. AGI stands for Adventure Game Interpreter, and this AGI system was the engine behind Sierra’s early adventure games. Erik had implemented a large portion of the AGI engine in Typescript. The project had not received any updates for six years, but it claimed to be able to run the old Sierra DOS “binaries” in a browser, and I was intrigued.

I needed a page to run the compiled Javascript on, so I created a site in CrafterCMS, and set up a basic page with the Javascript-based AGI engine running within it. Channeling my inner 80s kid, I gleefully loaded up Space Quest I and Kings Quest I. They kind of worked!

Backgrounds (called pictures) and sprites (called views) worked perfectly. Several other features were either not working correctly or were unimplemented. That didn’t matter. I was in awe. There they were; the games I had spent an untold number of hours playing in my childhood, running in a browser! 

I was so excited to see these old games [sort of] working in my browser that I started investigating the engine to learn how it worked. Because the engine was deployed in Javascript, I could also easily manipulate game states, for example, changing the character’s position on the screen, forcing the engine to paint the priority buffer that enables the “3D” effect or teleporting between rooms. These are things that I would have killed to be able to do as a kid.  

I found this to be so much fun that one Friday night in September, I created a few Crafter Studio plugins to access these capabilities easily. And that little project was so much fun that I extended the engine to fix a few bugs and play the game’s sound, an unimplemented feature in the AGI.js engine. Once this was working, I caught the fever.  I continued with additional weekend projects to create Crafter Studio plugins for editing existing games' backgrounds and sprite objects. At the time, the plugins would modify existing game resource files stored in the CMS. Today they read and write JSON source files that are stored as "content" in the CMS. 


In early October, I looked up when Kings Quest was first released. 1984. It would be forty years ago, in 2024.

This got me thinking and started me down a path that would consume my weekends for the rest of 2023. I thought you know what? I should finish this engine, build a compiler to turn AGI game source code into runnable game resources, and then use that to write my own Graphic Adventure 40th-anniversary fan game. So I did.

I came up with a story and maps. I extended my tools in Crafter Studio for accessing and editing AGI resources and wrote a compiler to build those resources into game resource files.

And then, I used those tools to turn my story script and map into an actual game. As a weekend gig, it was a lot of work that required a ton of pizza and coke — but I felt this was almost like walking in the shoes of some of my heroes, the people who made the real games we played. It was an incredible experience for me and a lot of fun. 

 The game is called Let Them Eat Cake. It plays entirely in the browser and was written, compiled, and deployed by plugins for CrafterCMS’ Crafter Studio tools. The Studio plugins and the game source code are both open-source.

For the CrafterCMS community: This project demonstrates the versatility of Crafter Studio and its plugin development support. It is another demonstration that Crafter Studio can be extended to edit, manage, and deploy any type of content for any type of experience.

For adventure game fans: I know it’s not perfect, and I’m certainly no Roberta Williams, Al Lowe, Scott Murphy, Mark Crowe, Josh Mandel, or any of the other legendary game designers of Sierra: I hope it provides some entertainment, a few hits of nostalgia, and a couple of laughs. Remember, it’s open source, so it can be extended, or you can use the tools to create your own game. 

Please contact me (russ.danner-at-craftercms.com) and let me know if you played the old games and what you think of this new one. Can you beat it? Happy 40th birthday to King's Quest, and much love to some of my childhood heroes at Sierra who first created these fantastic games.