A poll conducted by National Geographic recently showed that one-third of respondents couldn’t pinpoint Louisiana on a map and 48 percent were unable to locate Mississippi. When I found out about this statistic, I was a bit shocked. To be fair, it is a bit hard to remember the locations of all 50 states of a country even if you live in one of them.

But I mean it's only 50 states. There are 1264 music genres and many people would probably recognize more than 50 of them. So I decided to build an Alexa Skill to help kids learn the geography of the 50 US states in a way that's simple, fun, and entertaining.

What it does

State the State assigns the player with the task of driving a truck from a state on one coast to a state on the opposite coast. As the game progresses, the player decides what states to travel through to reach the destination state as fast as possible.

Every now and then the player runs out of fuel or something else happens requiring the player to spend (virtual, of course) money. If the player makes it to the destination state without running out of money, the game has been won.

The states the player has to start and end in change every hour. (and are same at any moment for any player)

How I built it

I built State to State using the Alexa Skills Kit, the Alexa SDK, and AWS Lambda. The code was written entirely in Node.js.

Challenges I ran into

The biggest challenge I ran into was California leaving the United States. No, seriously, after I got pretty much everything else working whenever my truck was in Arizona, Utah, or Oregon and I tried to tell my Alexa Skill to go to California, it would tell me that California doesn't border the state I'm in. (It does, by the way, still border Arizona, Utah, and Oregon)

I tried everything I could, but I couldn't get Alexa to recognize the state I was trying to travel to was California. My code worked perfectly for every other US state. Since it was the only state not working, I managed to get it to figure out if what the user is asking to drive to is California by checking if they're NOT asking to drive to any other state. I think it works fine now.

Accomplishments that I'm proud of

I have built a fairly large Alexa Skill to accompany a recycling app I made some time back, but this is definitely the biggest Alexa Skill I've ever built. It's also the first game I've built on the platform, something I will definitely look into doing again sometime in the future.

What's next for State the State

I hope to make State the State more educational in the future by perhaps adding some trivia, fun facts, interesting decisions players get to make, and more.

Built With

Share this project: