I mixed a couple of things that I liked when I was young. The first is gamebook. A gamebook is a book in which the reader participates in the story by making choices. I felt really immersed in the gamebook's story. The narrative was different than a normal book because more engaging and more direct. The second is the dream I had to meet some important person from the past that actually made the history.

What it does

The player will travel in a precise year in the past, meeting some of the most influent persons of the world's history. The player can meet people like Albert Einstein, George Washington, and many others. The mission is to help them to shape the future as we already know.

"Alexa, launch time traveler" to open the game.
"start a travel" to list the available travels and start an adventure.

Structure of a single game

The game consists of 5 questions related to the life and works of a specific character. One or Two questions can be related to an event from the same period or a topic connected to the character. For instance, in the Einstein game, there is a question about Newton and a math question.

Initially, every user can play with the same set of initial "travels". When a travel is completed another one will "unlocked" randomly from a hidden list.

The experience is always different because the new travels are randomly selected. Every user will experience a different game.

Easter eggs. The hidden list can contain easter eggs as play with a character from a famous book or novel as Ulysses.

You can resume the game. If the player doesn't reply or the skill goes in timeout at the second opening the system will prompt a resume message. The progress is saved in a DynamoDB table.

Structure of a single question

Each game's question has an intro and the actual question.
The intro is narrated by the character's voice created with Amazon Polly. The question is prompted with the Alexa's voice.
For instance, you can hear George Washington saying one of his famous quote: "The Constitution is the guide which I never will abandon" or hear the voice of Einstein with a German accent.


Each "unlocked travel" has a code.
As explained before, games are randomly "unlocked" so, each player will have different games and different codes. With "lists my codes" the player can hear the travel's codes.
With "insert a code" the player can insert a code and unlock another travel.
The above logic promotes code sharing between friends from the beginning.

How I built it

I have created an "Alexa skill game framework" to handle a generic question/answer game. I used NodeJS, the ask cli and I covered the basic functionalities with unit tests.

Games can be loaded uploading a config file either in JS Array, JSON or CSV format. I.e.

  id: '1',
  name: 'Albert Einstein',
  intro: '1905, Bern. Mission: Help Einstein to get his memory back and complete one of his biggest theory.',
  hidden: false


  id: 1,
  questId: '1',
  intro: '<audio src="https://URL" />',
  question: 'Show Einstein you like math. 1, 2, 5 are? Say 1 for odd numbers, 2 for primary numbers, 3 for even number ',
  answer: '2',
  ifCorrectGoTo: '2',
  ifWrongGoTo: '3',
  id: 2,
  questId: '1',
  intro: '<audio src="https://AUDIO.mp3" />',
  question: '.......',
  answer: '1',
  ifCorrectGoTo: 'END',
  ifWrongGoTo: '5',

Each question can be described as a node of a binary tree. The answer can be right or wrong (true/false, 1/0) the second question is prompted based on the answer (can be the same question or another question). For instance, in the above question with questId: 1, if the user will answer correctly the question with Id 2 will be prompted; question with Id 3 otherwise.
The reserved word 'END' is used to mark the game as completed.
The framework is super flexible and allows different endings based on the user journey.

For my skill, I have decided to go for 5 questions per game and be focused on historical matters.

Challenges I ran into

The biggest challenge was to create the Polly speech with accents. At the beginning I was thinking to make an async call to Amazon Polly and output the speech on the fly, then for safety reason, I decided to pre-render the audio and store the mp3 files on S3 bucket.

Accomplishments that I'm proud of

I am proud of the "Alexa game framework" I've built and I have decided to make it publicly available as open source project. The framework as enough level of abstraction from the game topic and can be used in many other situations, it's a good base to speed up development of trivia games or Q/A adventure games.

What I learned

I learned to better handle the audio and to normalize the volume accordingly. I even partially automate the process via a series of Python scripts.

What's next for Time Traveller

  • One of the ideas was to ask for the player's name (I didn't finish to implement). Having the player's name could let the "famous character" to address the player by his/her name having even better custom experience.
  • Another idea was to grab the user's location and start the mission in a different year but at the same day, same time and same weather condition. So, Alexa could say: "1964 in a cold New York's night". With location could also be possible to "unlock" travels based on the state's history or even unlock a travel based on the current date (i.e. Independence Day).

Built With

Share this project: