When first looking at the Twilio API and its previous applications, we saw a disproportionate amount of corporate and commercial implementations. With such a robust platform for centralized communication and easy to interface SMS messaging, we saw the opportunity to utilize the API in the form of an interactive, accessible game.
Enter Gale the Whale!
Though our current game is intended to serve as a proof-of-concept, we saw the opportunity to incorporate our love of the environment and raise a little bit of awareness for the dire state of our oceans through exposure in our very easy to access, entertaining package.
HOW IT WORKS
GAMEPLAY: Upon initiating the game, you’re immediately thrust into Gale the Whale’s precarious situation: her home has become ground zero for a horrifying oil spill. You’re prompted with five options to begin saving your home: [U]p, [D]own, [L]eft, [R]ight, and [S]ponge. Directional control moves you around the map but be careful; the shifting currents of the ocean cause the spillage to spread in unpredictable movements with each move that you make. As you navigate the maze of pollution, you can choose to drop a sponge, which acts as an anchored element that, if in contact with an area of the spill, will eliminate that part of the spill. Your goal is to completely save your home by removing the spills while making sure that you don’t get caught in it yourself. Upon successful cleanup of each oil patch, you’ve won!
BACK-END: After the user sends a text to the Twilio number +1 (702) 551-0883, the message is sent through the Twilio API, and then parsed into an HTML request and sent to the web app. From there, the data is compiled into a TwiML, which is then sent back through Twilio to the user’s phone in the form of the front-end game board.
Most of our major hurdles came towards the beginning of our process. Getting our development environments set up to work with the Twilio API, along with learning the basics of the API itself cost us a lot of time, though we were able to work our way through that by working through the thorough documentation. Putting together the back-end code of the game and connecting it with the API and database also caused us a significant headache; for a while setting communication between the web app and the database seemed impossible, until we settled with the solution of storing the game data in a hashmap. Lastly, coming up with a suitable number of whale puns was also a huge hurdle. We went through many iterations of very under*whale*ming puns (haha).
One of our greatest challenges was familiarizing ourselves with Twilio’s API, and learning how to utilize and properly integrate that with our game seemed like a herculean task. However, as soon as we managed to successfully make the API calls and saw that first “Hello!” response coming through to our phones, we knew that we were about to dive into a product that we could be proud of.
In the future, we hope to expand on our idea by using a database to store user game data to increase our ability to store multiple amounts of game states from a large amount of users. In addition, we’d like to integrate a cloud based server, so that we can keep the uptime for our game constant and keep it accessible. There are also many avenues to add in terms of the game itself; though our proof-of-concept is text-based, there are many possibilities to convert the data into an image file for a more polished experience, for an example. Lastly, we feel like our concept served as proof that this is a viable platform for not only our demo with Gale, but other games types as well; we’d love to implement other types of simple games with additional features such as customizable themes and different ways to play.