Inspiration

Lemonade Stand is a unique Alexa kids game skill that pays homage to one of the earliest computer games, Lemonade Stand. This version is completely redone from the ground up, enhancing but maintaining the fun and spirit of the original game for an Alexa-world. I remember having lots of fun playing the original game as a kid on my Apple II+ (dating myself!) and want to share the experience with others in a contemporary way.

What it does

This game skill simulates owning a lemonade stand. A weather forecast is stated for a (simulated) day and then the player buys cups of lemonade to sell, buys signs for advertising, and sets a price for a cup of lemonade. The player then makes or loses money depending on the weather, the choices they've made, and behind the scenes random supply/demand simulation factors that keep the game interesting. The player starts with five dollars. If they ever go below two dollars, they're automatically bumped up to five.

What makes Lemonade Stand special?

I took the mandate to "educate, entertain, and engage" and the recommendations in the video "How to Build Engaging Kid Skills for Alexa" very seriously.

  • Fun and Unique Alexa Gameplay - Lemonade Stand is a proven winning concept, but now completely updated for Alexa. As far as I can tell from the skills store, Lemonade Stand is the only real money/business game for kids!
  • Dynamic Verbiage - Lemonade Stand keeps the game interesting by speaking how a real person speaks, varying what is said and not repeating the same boring text over and over again. Almost every part of the game has this feature.
  • Funny Talk (aka "Playground Moments") - Lemonade Stand says many random but contextually aware, funny responses and jokes. For example, on a windy and warm day, Lemonade Stand might say "I think I'll take a snooze in a hammock. I hope I don't roll out."
  • Achievement Badges - A player earns badges for number of simulated days played, number of cups sold, and amount of money earned. Badges are heard and can also be seen in the Alexa app immediately when they're earned. All of a player's earned badges can be shown in the Alexa app by saying "badges" at any time. Currently, there are over 70 badges that can be earned. Badges have cool and silly names like, "moxie mixer", "dancing dinero", "squeezy peezy", and many others!
  • Player Ranking - When starting a new game session (after at least one cup is sold), the game immediately incentivizes game play by stating a player's ranking relative to all other Lemonade Stand players, AND what is needed to get to the next ranking level. This provides a powerful incentive to revisit the game regularly. As as example, Lemonade Stand says "You're a top twenty ranked player for selling five-hundred and thirty-seven cups of lemonade. You will need to sell two-hundred and three more cups to become a top ten ranked player."
  • Speechcons - Over 60 speechcons are used in a contextually aware and dynamic way without being overused. I categorized speechcons into categories such as PositiveSpeechCons, NegativeSpeechCons, GoodByeSpeechCons, WarningSpeechCons and others.
  • Positive Reinforcement - Dynamic statements of praise (e.g. "spectacular selling") and encouragement (e.g. "I sense your lemony greatness. Believe it. Achieve it.") are spoken on lemonade sales successes and failures. Corresponding speechcons are also leveraged.
  • Sound Effects - Multiple audio files are used to simulate the weather. For example, rain and thunder sounds for storms, or happy kids playing and birds chirping on a sunny day.
  • Game Music - Over a dozen audio files are dynamically played for the initial intro, welcome back intro, and game round interludes
  • Easter Eggs - There are a few hidden items that are revealed when input is unexpected or irrational. For example, if a person says a negative number like -5, they hear funny messages.
  • Continuous Gameplay - The gameplay can go on forever. Current round information (a "game day"), number of cups sold, and net worth are persisted between sessions. The player also has an option to reset their game to the beginning ("day #1").

Here is a feature breakdown by "educates, entertains, and engages":

Educates

  • The player inherently becomes familiar with concepts of chance and probability (e.g. likelihood of an event occurring)
  • The game inherently helps a player improve ad-hoc math skills such as multiplication, addition, subtraction, and estimation
  • The player learns basic money handling skills
  • The player inherently learns basic business concepts, such as supply and demand (e.g. on a hot and sunny day there is higher demand for lemonade than on a cold and rainy day) and the power of advertising. For the player, this is great acclimation to the "KickStarter" and "Shark Tank" world we live in.
  • The player inherently learns about managing risk and expectations. The weather can change both expectedly and sometimes unexpectedly
  • Learning is not merely rote and "in your face", like a times table game (which is the first type of Alexa game I created!)

Lemonade Stand is a great tool for either family or classroom discussion on all of the aforementioned learning topics.

Entertains

  • The game simulates an activity that many kids do (selling lemonade!). It's a great game for winter nights, when they're dreaming about the summer ahead.
  • The game is just at the right pace and provides a good balance between challenge and reward for a kid to keep playing
  • Lemonade Stand leverages many funny speechcon interjections, custom music stingers (for interludes) and sound effects for the weather
  • The game in general says funny things (aka "playground moments") in game appropriate contexts
  • There are hidden Easter eggs to find in the game

Engages

  • Sentence construction and speech text is highly dynamic and randomized throughout the game. For example the weather forecast is said with thousands of permutations
  • The game requires listening and interaction. The game builds listening skills via a player needing to pay attention to the weather forecast and how much money they have
  • To enhance their gameplay, a player is expected to ask questions, like "What's the weather?", "How much money do I have?", and "What day is it?"
  • Achievement badges are given when achievement targets are met. Within the Alexa app, a player can show their badge achievements to their friends.
  • On a new session (after selling at least one cup of lemonade), the player is informed of their ranking for total cups sold, relative to other players AND how many cups are needed to get to the next ranking level. This is a great incentive to keep playing!
  • Praise and encouraging statements (and corresponding speechcons) are provided on daily lemonade sales successes and failures
  • The game provides just in time, temporal, and contextual help. Help can be requested at any time and is provided in the current context. Additional help is also provided (automatically) initially and then drops off as the player plays more rounds and gains experience

How I built it

  • Lemonade Stand is an Alexa custom skill developed using C#
  • AWS EC2 Windows VM is used to host the skill
  • AWS RDS MySQL is used for persisting session state and profile information
  • AWS S3 is used for hosting the skill audio files
  • The skill leverages a .NET platform I developed called Bitzki Conversation Server which abstracts the ASK custom skills JSON protocol and automagically handles session state and profile persistence. Bitzki uses Owin Katana as the basis for an internal web server, and techniques such as multi-threading, parallel programming, asynchronous tasks, and object pooling to improve performance. MAF is used to create bot plugin scripts (like Lemonade Stand) that get dynamically compiled, so new features and bug fixes can be implemented rapidly.

Challenges I ran into

  • There is no built-in money Intent in Alexa. I had to create one and the coding logic to handle it properly
  • I had one difficult (and relatively silly) bug that took about an hour to find the problem and fix. For the most part, Alexa diagnostics were great, however in one strange case Alexa diagnostics only provided a generic “Internal Server Error” and no detailed information, even though the problem was that I provided bad SSML
  • Handling edge cases, like a player stating negative amounts

Accomplishments that I'm proud of

  • Releasing a stable product that educates, entertains, and engages
  • Creating a balance of dynamic text, speechcons, music, and audio special effects
  • Fully leveraging intents, slots, and sample utterances to provide a richer gaming experience
  • I like that the game is ready to use with little to no instruction and that the game can also be fast-paced if the player says the “Alexa” keyword to interrupt Alexa speaking. For example, “Alexa, I want three cups.”
  • I made no assumptions about who is playing the game and was careful to keep the game gender neutral. For example, there is no spoken text like "way to go man", or "you're the king of lemonade".
  • This appears to be the only Alexa game that deals directly with the "handling" of money

What I learned

  • MySQL JSON query features and syntax that I wasn't familiar with
  • Additional LINQ syntax
  • Previously, I created two other skills (both were one of the first thousand Alexa skills). Lemonade Stand was way more challenging and I learned how to improve an Alexa game from my previous games (Relationary and Times Table)

What's next for Lemonade Stand

  • More of everything! More dynamic and random text to provide even more natural speech patterns to Alexa in the context of the game. More sound FX, more music and more badges!
  • Enhanced intents to capture more utterances
  • Enhanced player rankings (e.g. rankings for net worth and number of simulated playing days)
  • Dynamic cost of lemonade and signs (based on inflation? :D)
  • Enhanced Lemonade stand simulation engine
  • Exploring how to best implement multi-player mode and "play with and against your friends"
  • Other special features to make the game even more engaging
  • Determine how to implement other culture and language specific versions (based on demand)

Built With

Share this project:
×

Updates