If the number of virtual social gatherings you attend regularly has increased over the past few months, you may have found yourself awkwardly ending a call when all the attendees have run out of things to talk about, or playing the same virtual party game more times than you can count, or perhaps like me you’ve just resorted to reading memes out loud to your friends. If you’re looking to inject more creativity and conversation into your calls, follow along in this post to add a new twist on an old word game to your “Virtual Happy Hour Survival Kit”. Fictionary and this SMS version, BalderText, challenge players to write convincing definitions for uncommon English words to try and trick other players.
Using Twilio Programmable SMS and Twilio Functions, this post will guide you through deploying and getting ready to play a game of BalderText in under five minutes.
- Git or another tool to clone a repository from GitHub (If you’re using Linux or MacOS, you should have this by default)
- Node version 10 or greater, and NPM (included in the Node installation bundle).
- A free or paid Twilio account. You'll need the account SID and the auth token for your
- A Twilio phone number. Log onto the Twilio Dashboard to view your Active Numbers. If you don’t have a Twilio phone number yet, learn how to search for and buy a number here.
- An Oxford Dictionaries API Key to fetch word definitions. You can sign up for free 'Prototype' credentials here. You'll need the Application ID and Application Key for your
Deploy your own game
- Clone the repository from GitHub into a directory on your system:
git clone email@example.com:eshenfield/baldertext.git
- Once you have the
npm installinside of it to install the required deploy dependencies.
- Rename the included
.envand replace the
XXXplaceholders with the credentials you gathered above in Requirements.
npm run deployto deploy your Baldertext instance using the Twilio Serverless toolkit. It should take a minute or two, and when the deploy is complete, it will list out the Deployment Details in your terminal. Copy the url listed under "Functions" (it should end in '/game') and save it for the next step.
- From the Twilio console, configure your phone number to respond to incoming messages with a
Webhookthat makes an
HTTP POSTrequest to the URL you saved in step 4.
- Text 'Join game' to your number to make sure everything is working!
How to play BalderText
The goal of BalderText is to write a fake definition for an uncommon word that is convincing enough that the other players believe it is the real definition. Players receive points when other players choose their fake definitions and when they successfully choose the real definition. After 3 rounds, the player with the most points wins!
Each player who chooses the real definition gets 2 points.
Each player gets 1 point for every other player who chooses their fake definition.
BalderText supports 2-8 players.
- Every player texts ‘Join game’ to your game phone number, followed by a username, ie. "Join game <username>}. When all players have joined, one player kicks off the game by texting ‘Start game’ to the game number.
- All players receive the same word in a text, with a prompt to generate a fake definition for the word that other players will be likely to pick. The players are prompted to respond with their made-up definition.
- Once everyone has submitted their fake definition, all players receive every submitted definition as well as the real definition (in random order). Each player votes on which definition they think is the real one.
- After scoring, the round ends and the game sends a score summary to each player before starting the next round.
- After 3 rounds, the game ends and the player with the most points wins.
These are the commands you can text to your deployed BalderText number:
What does it do?
Join game <username>
Adds the message sender to the game with the provided username, or with their phone number if no username is provided.
Begins the first round of gameplay. No new players can join the game while it is active.
Stops and removes the active game, if there is one. Players have to rejoin using the Join game command before starting a new game.
Submits a definition for a player. Punctuation and capitalization is preserved in the player's response.
Logs the player's vote for the definition with the number submitted.
Now that you’ve deployed your own version of BalderText -- you can bring it out at your next virtual gathering and get your friends and family in on the game. If you feel inspired to extend or update BalderText, or to build your own virtual happy hour survival game with Twilio, contribute to the GitHub repo, tell us about it here in the comments, or send me an email at eshenfield [at] twilio [dot] com. And check out the links below for more information about the tools I used to build BalderText. We can’t wait to see how you play!
Emily Shenfield is a Developer Educator at Twilio. She focuses on creating engaging demos of Twilio tools to inspire other developers to use Twilio in new and innovative ways. She is a homebody and is secretly really jazzed to be able to see all of her friends without leaving the comfort of her couch. You can reach her at eshenfield [at] twilio.com.