I’ve been keeping a small “notebook of ideas” for a while, so whenever an idea pops up in my head I just note it down. With a growing interest in Alexa, I decided I would pick one of those ideas and make it a reality in the form of an Alexa Skill. I love playing games so decided to make something involving exploration and finding objects or “loot” in dungeons. I decided something sugary and addictive like doughnuts would be fun to find, so I decided to create the puzzle game Donut Dungeons.

What it does

Donut Dungeons is a platform-like, dungeon exploration, puzzle game. The aim is to retrieve hidden doughnuts by moving around and exploring to find them. Players will be faced by obstacles such as locked doors and chests, and will need to find them by way of trial and error.

There are multiple different dungeons. Each dungeon is played as a single level. Each level has an {x} number of different kinds of doughnuts. Players must complete levels in order but can repeat any previously completed levels as many times as they like.

How I built it

I used TypeScript, Node.js and Serverless Framework. I had a simple deployment pipeline that builds, tests, and deploys the skill to a development/live environment.

I created a JSON file for the initial state of each dungeon map/level. Each map contains a bunch of “cells”. A cell has its own coordinates and data such as the objects in the surrounding area.

When a player begins a level, they get their own copy of that JSON map for that level and can interact with the cells in it as they play the game. Depending on how a cell is interacted with, its information is updated accordingly. Each cell also has a direction (up/down/left/right). Each direction points to a “structure”. This might be a pointer to another cell (a ladder or corridor), or it might be a blocker such as a wall, floor or ceiling.

Challenges I ran into

I realised it can be hard for a user to remember what to say to trigger commands when interacting with a virtual environment using voice. I needed to ensure that the user can play with as few commands as possible so I trimmed down to 3 main commands: movement (up/down/left/right), pick up and unlock. This way, it’s easier to grasp the basics from the beginning and even if the levels get harder, the commands available would remain the same.

Although I had perhaps read about it in an article or two, I never really had any experience with NoSQL databases. It took a while to understand how they differ from relational databases since this is something that I am more familiar with. It was a fun challenge to learn to use DynamoDB as my datastore solution.

Accomplishments that I'm proud of

I feel like I’ve made a great start to Donut Dungeons and I’m looking forward to expanding it.

What I learned

I used this project as an opportunity to practice clean, DRY code and being as thoughtful as I can when fleshing out the code architecture so it can remain as maintainable and extensible as possible as I develop it further.

I learnt about the types of In Skill Purchases that exist and was able to implement something suited for the game.

I was able to get a better understanding of how developing for a voice user interface is different from developing for a GUI. I found that although it was easier to program for a voice user interface, it was harder not to annoy or confuse the user compared to a GUI. With a GUI there is more area for focus so sometimes you can get away with it! With voice however, there is only one area of focus: the sound, so mistakes aren’t so easily hidden.

What's next for Donut Dungeons

Firstly, I’d like to add more free and paid levels since there are only 10 right now. Some sound effects, a more descriptive and dynamic narrative will be a nice addition as it does feel a little repetitive at times.

Secondly, I’d like to add more dungeon objects for players to interact including but not limited to:

  • Buttons - these could be toggled to open/close a door or group of doors to allow the player to get to doughnuts.
  • Clue Scrolls - these could contain clues as to the whereabouts of certain items such as the location of a donut or key.
  • Donut Ingredients - in addition to finding doughnuts, players can find the ingredients that make up a doughnut and cook it up to create doughnuts.
  • Computers - players might use these to input some pin code values to open vaults or doors.

Thirdly, I would add more in skill purchase options.

Fourthly, and probably the most ambitious of all my intentions is that I’d like to provide a way for players to create and share their own dungeons for other players to play. If I can delegate the creation of dungeons to players, I can provide more dungeon content whilst allowing players to make creative dungeon puzzles in addition to playing them.

Built With

Share this project: