Link coming soon
Swift Runner is a fitness motivation game using Strava to earn points and unlock Taylor Swift songs.
I made this game as a project in between semesters. I was responsible for coding the mechanics and gameplay, and used artwork provided by my sister.
Earn gems from Strava activities
Spend gems to unlock songs
View and listen to songs in the collection
Earn achievements as you progress
When I first had the idea to make this game, I had never imported data using API requests and thought I would not be able to use Strava in the way I wanted. I learnt how to use the Strava API and persevered until I was able to make it function. This is the most fun and interesting project I've worked on as it required creative solutions, a lot of problem solving and learning how to do new things.
The game pulls walking, running and cycling data from the player's Strava profile. The total distances and most recent activity ID are saved and compared against the player's profile when they next open the game to calculate how many points the player has earned.
When the player spends their points, a random card from the available cards is chosen.
This is then set as a card that can be viewed and removed from the list of remaining cards. A large blank card is set to the image of the card they won to show the player their newly unlocked song.
When the player wins a card, it is activated which allows the player to view it in the collection. Each card has a unique ID number, and when a player selects a card to view, that ID number is used to set the blank card to the correct song to view, and plays the audio of that song.
Each collection page has its cards as children objects, and they are activated in turn as the player swipes through them. As the pages relate to the different albums, there are a varying number of cards on each page. I used blank cards in the background, and the correct number are enabled on each page to reflect the albums.
The player can earn a small number of daily bonus points by logging in each day to incentivise them to use the game regularly. I did this by saving the unix time when they claim the bonus points, and then checking if the current unix time is more than 86400 seconds higher than the saved value.
After Strava accepted my application to increase the number of users, I changed the game so it was set up for multiple users.
The API request had been using a url with my user ID, but I changed this to get the user ID when they authenticate, which is then used to pull the strava data for the correct user.
I gave the game to my family to playtest to help find bugs and issues.
This allowed me to change how the access and refresh tokens were retrieved and saved so they worked properly with multiple users, and find bugs such as not awarding the inital 50 points and saving the wrong activity ID.