January 25 2018

Spotify Quiz

What did we do?

There is an endless stream of multiplayer games being released every year, but fewer and fewer of those games have local multiplayer support. We missed the feeling of playing together in the same physical location.

The longing for local multiplayer mixed with our love for music quizzes was the right mix to come up with the idea of a “Spotify quiz” game. The idea was that a game master logs in to Spotify and runs the game using her phone. Participants in the quiz connect to the game through bluetooth and/or local WiFi and receives questions based on the songs in the playlist that the game master has picked.

How did we do it?

We decided to decrease the scope of the project by using Apples MultipeerConnectivity framework which handles the tricky parts of connecting local peers and managing sessions.

To manage the playlists and playback from Spotify, we used the Beta-version of Spotify’s SDK. This gave us great leverage in actually implementing the authentication through Spotify and the music player.

To start the game the game master selects a playlist from their Spotify account, och the questions for the quiz are generated from the songs in the playlist. We have different types of questions, one example is the “Who is the artist?” question, which is generated based on the “related artists” metadata from Spotify. We also have a question that based on the year the song was released asks the user to guess from reasonably generated alternatives.

On top of MultipeerConnectivity we built a solution for message passing between the game master and the players. The game master can send questions to the players and receive answers to calculate the score for each player. The players can receive questions and send back their answer, and get the calculated score when the game has ended.

The project was perfectly sized for a week of prototyping. The result was a game that is fun to play.