The Magic Door Brings Alexa a New World of Interactive Adventure

Zoey Collier Feb 23, 2017
Share:
Spotlight
Blog_Header_Post_Img

“So I joined the Alexa team,” Andy says, “and immediately started playing around with the Alexa Skills Kit (ASK).” Only a few months after Amazon released ASK, Andy and his wife, Laura, created their first skill. The skill recited public domain works, like Abraham Lincoln’s speeches and The Jungle Book, but the Huntworks wanted to build something more interactive and engaging.

Laura recalls wondering, “What would you ask Alexa to open that’s exciting, even magical? Wouldn’t it be fun to open a magic door?”

From that simple idea grew The Magic Door, an adventure with Alexa guiding you through a growing number of original, interactive stories. Today, The Magic Door skill is a sophisticated adventure framework, hosting 10 adventure storylines, 30,000 spoken words, numerous character voices and hundreds of sounds effects.

Walking through the Magic Door

Alexa Blog

To enter a faraway land of magical creatures, perplexing riddles and hidden prizes, just say Alexa, open The Magic Door. Suddenly, you’re off on an adventure with Alexa as your personal guide.

Brought to life by Laura’s storytelling and Andy’s coding, Alexa narrates your travels through a rich landscape, not only with words, but voices and sound effects too. She describes the scene around you, your choices of where to go next and the curious items with which you can interact. Alexa might ask if you want to go to the garden, the mountains or the sea. Or she might tell you there’s a key on a nearby table, just begging for you to pick it up. What will you do next?

Threading a path through over 200 different scenes, you encounter talking creatures and riddles to solve. You don’t always know your final quest, but there’s always a reward when you reach the end.

Developing a simple story to an interactive adventure

The Huntworks first had the idea when Laura wrote an interactive adventure tale set in a magical forest. She emailed it to Andy, who coded the story into an Alexa skill over the weekend. Though simple, the skill let the player move around in a virtual world, while Alexa described what he or she could see around them.

Andy wanted to make sure the skill was extensible, so they could expand its capabilities and add new stories. Before any more coding, he broke down the initial tale into basic elements, creating a story domain model. Looking at the story flow, the initial elements in the model were:

  • Stories – Full adventures with a start and an end
  • Scenes – places you can be (or go)
  • Prompts – Questions to ask the user to elicit a choice
  • Choices – User responses and the corresponding scenes to go to next
  • Transitions – Descriptions the user hears when moving from scene to scene

Andy devised an XML schema for describing these story elements. The human-readable schema allows creation of a storyline without any coding. So, while Laura turned her initial forest story into XML, Andy wrote the engine to “run” these files. This state-based dialog manager uses Amazon DynamoDB to store the user state as the player moves through the story.

The skill worked, but just allowing you to move around and “see” a mystic landscape wasn’t enough for Laura and Andy. They enhanced the stories, the model and dialog manager with:

  • SSML and sound effects as soon as available through ASK.
  • Items and inventory, allowing players to pick up and interact with items in a scene.
  • Condition-based scene descriptions and action, depending on what a player is carrying or has already done before.
  • Validation of The Magic Door’s ASK interaction model (validator open source).

Finally, Andy automated several technical tasks so Laura could independently develop and publish her story content. For example, with Andy’s sound effect manager, she can automatically convert audio files into ASK audio format and upload them, instead of Andy having to do multiple steps via a command line.

Ensuring adventure lovers come back for more

Over the course of 12 months, The Magic Door evolved into a sophisticated adventure framework, hosting 10 adventure storylines and 200+ scenes.

But Andy and Laura aren’t nearly finished. They know the importance of keep their users happy and coming back for more. For one thing, they’re adamant about keeping the skill’s content fresh and relevant. That’s why they continue adding new adventures, not to mention seasonal stories, like their Halloween and Christmas storylines.

“If we’d launched our skill and just left it there, not developed it any further,” says Andy, “users would have been bored with it.”

Laura and Andy also stay busy with The Magic Door’s Facebook page and website.  Both are critical to the Huntworks’ interaction with their users.  Through Facebook, in particular, the Huntworks provide support to users, while also gaining an important understanding of user experience.  

Finally, to improve the game’s usability, Andy added analytics to collect data on where users “go” throughout the story and where they’re getting stuck. “This lets us know if a riddle is too difficult, or if a scene doesn’t handle what users are asking for. We know right where the bad scenes are, so we can dive in and fix them,” says Andy.

That’s why The Magic Door continues to grow and draw new users. “It’s absolutely an evolutionary thing. We‘ve really tried to figure out what users are trying to tell us, and to make the skill better as a result. The toughest thing is just finding more time to spend on the project.”

Get Started with Alexa Skills Kit

Are you ready to build your first (or next) Alexa skill? Build a custom skill or use one of our easy tutorials to get started quickly.

Share other innovative ways you’re using Alexa in your life. Tweet us @alexadevs with hashtag #AlexaDevStory.