Table of Contents
- What it does
- How I built it
- Challenges I ran into
- Acomplishments I'm proud of
- What I learned
- What's next for Miniventura
After creating some small games/utilities for the Alexa vocal assistant (Mode désagréable, Perdu en forêt, and Programmer la machine), I threw myself into my first "big" skill: Miniventura.
I always loved point'n clic games, and also textual games where we feel free to do anything, simply by writing whatever we want, and always having a funny and coherent answer. I was finding such system quite... magic ! As soon as I started putting hands in Alexa skills, I imagined how wonderful it would be to translate such concept to vocal assistants, where the display is no more a brake on imagination (even it could be an helpful support when present, as in Miniventura).
Also, I already had the occasion to test and apply the last Alexa features in my previous skill, and the addition of dynamic entities API was the last feature I was waiting for being able launching this project.
And lastly, this skill was the occasion to put in place my first skill with a business model, using ISP and modular content.
What it does
Miniventura is grouping a set of "small" adventure games (some of them free, some other that you can purchase) where you guide Alexa in quirky stories, burst with humor (sometimes dark) and some enigmas.
An adventure games, not a simple "choose your own path", but more the transcription of what was a game like the first Monkey Island: a ton of possibilities, a funny scenario, with the welcome surprise to discover how the developers anticipated with a humor any twisted player request, pushing to try everything instead of going ahead directly.
"Alexa, use the pen on the man toilets."
"Don't count on me for drawing a penis on the wall !"
The concept is simple, the application is dizzying: You will have to guide Alexa through several places, and in each of them are placed numerous elements or characters with which you can interact. You have 9 actions possible (open, close, take, give, use, use with, talk to, walk to, and look) that you can combine as you want with the objects and characters, but also with the objects of your inventory (that you will fill progressively).
Alexa, answer him that a pause is different than working.
I answer her: Working and doing a pause, that's two opposed terms ! I don't see how we could imagine that we have a rest while we are working at the same time... excepted if we are doing nothing at work, which would not be so unpleasant. His fixed grin widens and he mutter: "hum... very interesting", while he strikes a name on his notebook. Hey ! Is it my name he's crossing with his red pen ?"
While discussion, several subjects are proposed, and after each exchange the available subjects are evolving as a consequence.
Possibilities are huge, and Alexa's reactions are funny and varied (requesting several times the same thing can often result in different answers). To do so, a very long writing (and tests) work was needed, in order to predict quite all the possible and thinkable actions that the players will request.
The goal being to not feeling narrowed by a simple multi-choices game, but instead to experience a feeling of full control.
"Alexa, open the young man."
"With a scalpel or a corkscrew ?"
The skill will host a lot of small adventures, and the duration of each of them should be around 1h to 3h, depending on adventures (or at least 15/30 minutes if you listen nothing and run over the game while knowing in advance all the answers... which is not the goal). Because of that, you will probably not finish these adventures in one session and will be allowed to quit the game at any time, the save being automatic.
Several adventures (ISP)
Two adventures are currently available, but the list of available adventures will get longer over time (a new adventure being already under work: see "What's next for Miniventura" section):
- The horrible cat (Free):
This adventure is like a demo. It's a complete adventure, even if it's shorter than classic adventures, allowing to taste joys of Miniventura, before diving in some more deeper adventures.
In this adventure, Alexa will be locked in her neighbor apartment, with a cat that she loathe, and a vocal assistant parody which refuse to let her out.
- Dream job (between 1€50 and 2€):
This time, Alexa will have to work her way up in a caricature of company, speaking with several characters with crazy comebacks, and making a demonstration of all her awfully internship skill.
And if it's not sufficient, each adventure have several ends ! The player progression is displayed on the game home screen, and when all the ends of an adventure are reached, the game is highlighted with a premium gold color !
Hints for lazybones (ISP)
If you block on a point, that you are too lazy for searching, or if cheating is you hobby, don't worry: You can ask anytime to have a hint about how to process, adapted to your current state in the adventure.
Note that the first hints are free, while the player will have then to buy additional hints packs (5, 10 or 20 hints packs).
"Alexa, take a candy."
"I take a big handful of candies in the jar. The girl of the front desk look at me strange attitude... perhaps disapproval ? I take a second big handful, and I put my two hands inside this time. At least I won't be out of stock before a while !"
How I built it
I do not have a lot of time to work on my personal projects, so for building this skill, I tried a new way to work: developing the skill using only my iPhone and iPad (no computer) as much as possible, in order to optimize my time, allowing me to work on the skill anytime, anywhere (most of time during transportations). Thanks to several tools and technologies (like a server to centralize the code, Code Editor for editing this code properly on iOS), I managed to do this for 99% of the development. I was then using the computer only for some steps impossible to manage on a small screen today: creating the interactions model on the Alexa Developer Console, transferring the source code to the Amazon Lambda function, and testing.
For hosting the source code, I'm using the AWS Lambda service (with node.js), combined with DynamoDB for storing the player back-ups.
Since the content of the skill and the combinations are really huge, I also developed a test tool, that explore the full combinations of the full content of each adventure, to ensure that there is no error, no blocking point, no SSML error, ... whatever the user does.
For display (APL) tests, I used my Alexa devices Echo/Echo-Dot devices, on my Echo Show, and on the simulator for other devices (Spot, TV screen, or other formats).
About the content of the skill, this game was the occasion for me to put in place a business model, using the IPS features: A free adventure is proposed, while the next ones must be bought. I also included a system of hints, with a limited number of free hints, and buyable additional package of hints.
Since the business model is relying on selling adventures, the game has been designed to be able to add easily new adventures, without having to modify anything in the code. To do that, I created a structured text format in which I write the full content of each adventure (places, items, answers, interactions, conditional answers or interactions, ...) that the lambda function read to execute the skill for the chosen adventure. This, combined with dynamic slots, allows to not touch the interactions model neither.
And finally, I updated the skill with this challenge to add APLA support. This allowed me to improve significantly the game ambiance, by unlocking the maximum sounds I can use in each answer.
Challenges I ran into
This skill is combining a high amount of new complex features, that I never used before, some of them bringing with them difficulties that I had to go over:
APL (Alexa Presentation Language)
The good placement of elements on the screen was quite complex, and even more when taking into consideration that this placement must be dynamic to match any screen size and proportions. Added to that, the touch behavior, when interacting with the screen, can be hard to manage in complex structures.
To go over this, I had to restructure the APL document slowly, taking care of the domino effect of each property, one by one.
APLA (Alexa Presentation Language for Audio)
After some difficulties with his new feature, because of time computation on complex APLA documents, and sounds number limit, I managed to find the good way to reach my goal: Going over the classic sounds number limitation to improve the game ambiance.
Balance between screen & voice
Designing a vocal game while making the screen really useful was a big dilemma. I wanted the skill to reflect all the advantages of having a screen, then the player would be proud of having such device and would not think playing it another way. On another side, I wanted the vocal game to still be a vocal game, playable by voice only, and still being really enjoyable anyway.
I managed to reach this goal by applying several rules:
- The screen must be an help to vocal interactions, not a replacer.
- Any action done by touching the screen must also be doable by voice.
- Anything displayed on the screen must also be presented by voice at least one time.
- The voice speech must not be too long, so the full content of the screen must not be presented each time by voice: presenting it one time is sufficient, next voice iterations should do it shorter.
- Some important information (bold word, highlight color, ...) can be presented by voice thanks to a sound, to do it shorter.
- When presenting a list on the screen, there is a need to have a command for the player to request it's content (it's harder by voice to remember all choices)
- When a list of choices is too long, the player should be able to choice by giving the choice number, instead of repeating the choice text.
- The elements on screen must be all touchable... else it is frustrating
Storing the game sessions was needing a database. That's why I used DynamoDB. The usage of this tool was quite simple, but I faced difficulties with some other features: ISP was requesting to store the session info, also I had to be able to detect when a new game was added compared to the last games the player saw, in order to propose him to try these new games.
I finally managed all of that by using here also DynamoDB, storing the known products, and the session state.
The usage of dynamic entities, launched in 2019, was also a challenge, since I had to pass over several issues and strange behaviors. But this feature had to work perfectly since the whole skill is entirely relying on using this (in order to have dynamic content, and avoid having to create a hard coded interfaces model with thousands of entries).
By using retro engineering and lot of tests, I finished by domesticating this feature, avoiding bugs, and getting a stable and powerful result.
Last point, not specific to this skill, but even more complex due to the complexity of this specific skill, was the debugging process. Amazon Lambda propose a service named Cloudwatch, logging the lambda function errors. But these errors can sometimes provide absolutely no help about the source of the error. That's why, after several laptops broken by brutally crushing it agains a wall, I had to test each feature one by one, and to finally develop an automatic tool for testing each individual adventure.
Accomplishments that I'm proud of
I'm really proud of... this full awesome skill ! Grouping quite all the latest Alexa features, my dreams of open adventure worlds with (quite) infinite possibilities, dark humor in every corner, easily upgradable content, and a deep usage of Alexa screens with the perfect balance between screen usage and voice independence.
I hope that you will be as proud of me !
"Alexa, look at the mirror."
"But, who is this wonderful person ? My God, how she is pretty, how she looks intelligent, how I would love to meet her !"
What I learned
Well, what I learned can be resumed in difficulties I encountered. But to resume, I learned:
- To create advanced APL interfaces
- To Improve voice interface with APLA
- To put in place a real business model with ISP (In Skill Purchasing), both consumable and on time purchases.
- To balance well voice and display content
- To persist data over DynamoDB
- To use Dynamic Entities
This skill was also the occasion to launch my own company: Nutyzeta (EIRL Guillaume Pelouas). A firm dedicated in software development, which own currently 4 Alexa games:
- Mode Agréable (FR / US)
- Mode Désagréable (FR)
- Programmer La Machine (FR)
- Perdu En Forêt (FR)
- Miniventura (FR) So I could say that I learned to create and manage a company... thanks to this last skill !
What's next for Miniventura
As stated above, the game has been designed to be easily upgradable, adding fully new adventures without having to change the source code. One of the future adventures is already under preparation:
- Space Invader (between 1€50 and 2€):
It will be a space odyssey, in which Alexa will have to survive to a serious spaceship damage, travel between several planets, and discuss with strangers equipped with tentacles, to rig favors up with the galactic administration.
Also, the game has be designed to be able to support multi-languages, simply by adding the missing language in the texts files (here again, no source code needed). But since this game is really verbose, I'm not able to traduce it by myself while keeping all the spirit of the jokes. That's why I will invest in a professional translator if I win the first prize, to traduce the game to english.
I would also love to add some continuous background ambiance sounds, if in the future Alexa APLA API allows such thing in the future, which would help even more the player immersion.