The nostalgia of coding and playing Dangerous Field on the calculator inspired me to revive the series with an all new version of the game. This latest incarnation is implemented as an Alexa Skill for the Amazon Echo. Although the interface is completely different, I think that it has a certain charm due to the simpleness and silliness.
From a technical perspective, there are two parts: the voice interface and the game implementation. Amazon makes the voice “Interaction Model” fairly easy to configure–it least for this simple scenario. The Intent Schema basically defines a way for users to specify how to move (direction and with an optional movement type) as well as indicate that they want to play and support some basic Amazon intents.
{
"intents": [
{
"intent": "move",
"slots": [
{
"name": "direction",
"type": "DIRECTION"
}
]
},
{
"intent": "movewithstyle",
"slots": [
{
"name": "movementtype",
"type": "MOVEMENT_TYPE"
},
{
"name": "direction",
"type": "DIRECTION"
}
]
},
{
"intent": "playGame"
},
{
"intent": "AMAZON.NoIntent"
},
{
"intent": "AMAZON.YesIntent"
},
{
"intent": "AMAZON.HelpIntent"
},
{
"intent": "AMAZON.StopIntent"
},
{
"intent": "AMAZON.CancelIntent"
}
]
}
I added two custom slot types to let users specify which direction to go and which movement type to use.
DIRECTION NORTH | SOUTH | EAST | WEST MOVEMENT_TYPE hop | skip | jump | leap | walk | run | gallop
With that in place, it was easy to provide a handful of sample utterances.
playGame to play
playGame to play game
playGame play
playGame play game
movewithstyle {movementtype} {direction}
move move {direction}
move go {direction}
move travel {direction}
move {direction}
And that is all there is to defining the user interface to parse what the user is doing. Amazon’s magic converts what the user says into JSON which is passed to the actual game implementation.
I wrote the game portion as a Lambda Function using Java. I installed the AWS Toolkit into Eclipse and found that made it a lot easier to write code on my computer and then push it up to the cloud.
So, here’s how a basic game goes:
Me: Alexa, start Dangerous Field. Alexa: You are standing in a field. What do you want to do? Me: Go east. Alexa: With a jiffy jog you jump joyfully to the east. You are standing in a field. What do you want to do? Me: Leap south. Alexa: South you leap like a lascivious leprechaun launched over the rainbow. You fall into a hole. You die. You are standing in a field. What do you want to do? You failed to escape from the Dangerous Field.
Anyway, click the picture below to go to the Echo page and enable Dangerous Field.

I have long been familiar with Tolkien’s The Hobbit and also The Lord of the Rings, but remained mostly ignorant of his other works apart from a 1982 print of The Silmarillion which somehow ended up in my collection. This past Mother’s Day my wife received a couple volumes of other Tolkien tales and I noticed in one that among the “other books by the author” it listed The Adventures of Tom Bombadil and was intrigued enough to order it in a volume combined with Farmer Giles of Ham.
Back in the magical decade known as the 90’s I got my first graphing calculator. It was one of the Casio FX-7000 variants–I don’t recall which one exactly, but I do clearly remember that it had 422 bytes of memory to be used by programs. While I wrote some programs to do mathy stuff, most programs were games. I think the first game I wrote for the calculator was a number guessing game where the game would generate a random number and the player would enter guesses and be told it the actual number was higher or lower. There were various other games along the same vein. Then I started coding with a friend and things got “Dangerous”.
The first book is a 45 year old Le Petit Prince in the original French. I believe I stole it from my parents’ home and it most likely was previously claimed by my mother or sister. I remember as a kid reading an English translation (which my parents probably still have along with another French copy) and enjoying the story while marveling that my parents and sister could read it. Later when I was studying French I read portions of the text and experienced the story in new ways because I was forced to slow down (and often read it aloud).
When I saw the word “Triby”, my mind jumped to a classic Star Trek episode and I imaged Captain Kirk and a bunch of fuzzy things. A quick search revealed that those are “Tribbles” and that the Triby is very different, but the similarity in name grabbed my attention enough that I put forth to answer the question, “What’s a Triby?”
To me the Triby looks like a toy radio for children. It has a magnet on the back so that it can be attached to a fridge. The buttons are also have a toy-ish appearance. The screen is a small e-ink display–probably to reduce power consumption (the battery lasts about two days on a charge). The neatest physical aspect of the Triby is the mechanical flag that pops out of the side when a new message is received.

