For the past week, we’ve been playing around with Status Board, the latest iOS app from Panic which provides a simple way to create beautiful visuals for any kind of arbitrary data.
Since a bunch of us around the office have an obsession with pinball, we thought it would be neat to keep track of everyone’s scores and share them on the TVs that hang up on the walls.
As of writing this, there is no reliable and universal way to code something that pulls the actual score data off of the games we have, let alone identify who actually played the game and received that score. So, instead of having one person keep track and type in all of the scores, I set up a Twilio trial account which provided us with a local programmable phone number.
The process goes like this: Whenever someone new wants to join in on the stats game, we register them in our system by taking their name and phone number. When they finish their game, they can text their score and which game they played to our Twilio number.
When someone sends a text message to this number, our script reads their message and strips out all of the numbers into one variable and all of the A-Z characters into another. Then, it checks the phone number that just texted the score and finds the person associated with that number in the local database.
If the person is found, the script then checks which A-Z characters are stored in that variable and pings our database to see which game they actually played. For example, if the text message reads “Sm 9,598,360”, we can look up “SM” in the database we built and identify that they actually played the Spiderman machine.
Once we know who played, what game they played, and what score they ended with, we save all of that data in a new entry in the database and respond to their text message saying that we received everything okay.
The Status Board app runs on an iPad Mini which broadcasts to the televisions using Airplay. We then tell the app to look for the incoming data by pointing the individual widgets to a few different URLs that we set up on our servers. The scripts at these URLs run the necessary database queries to retrieve the data we want and then format it in a way that Status Board can easily digest.
Complete with smudgeprints and all.
As long as the player is accurate when typing in their score and makes it a habit to do so, there are all kinds of interesting data nuggets that we can assume and present. Wanna know your best score this week and how it stacks up against everyone else’s in the office? What about your average score on Twilight Zone this month?
We’ve only just started building out widgets for this data, but already have a few more in mind:
- Allowing a player to amend their score by typing “No, 4,837,203” in the text message that follows the erroneous text.
- Validating a player’s score by using OCR and having the player snap a photo of their score along with typing it.
- Hooking up an Arduino to some of the switches on the games so we can track physical goals. How many times was Tron played today?
Pinball is just a fun example for us, but this stuff can be used to track what was once lost data and turn it into some actionable goals.