The quest system unlocks access to songs from later albums. I started the process of adding quests by looking at what data could be used from the API requests, and decided to use three core types: distance, time and elevation.
I chose these types as the data is easy to use and easy for players to understand. Each of these types has 3 different quest challenges: a goal for a single activity, a goal for a set number of activities and a total goal across all activities. I created a list of sample values for all these quests.
Sample API response provided by Strava
To start creating the quest system inside Unity, I used global variables to save the relevant data from new activities in the API request.
I made the decision to change the quests the player was given to always be one of each type to make the code more efficient and simplify saving the data. This made it so that quest1 always stores distance data, quest2 always stores time data, and quest3 always stores elevation data. To track quest completion, I used the lists of sample values and compared the saved data with the relevant value from the list. If the data is higher than the value, the player receives a point and the variable storing the data resets to 0.
When a quest has been completed, the refresh quest function is called, which chooses a random challenge for that quest. To display the quests to the player, the initial quest string has ‘?’ symbols and is split at those symbols, where the current number from the list of values is added in.
I added some references and easter eggs to some of Taylor’s eras. One of these was an extra quest to unlock her 10th album, Midnights. A phrase repeatedly used in the album’s promotion was ‘Meet me at Midnight’, so I added a quest with the same name that required players to complete a Strava activity during midnight. I did this by saving the start date in a DateTime variable, then adding on the activity duration and checking if the final DateTime is in the next day, meaning the activity occurred over midnight.
I limited the quest systems to only run when the album counter was lower than the final album, so the functions didn’t try to find an item beyond the length of the arrays. To introduce the player to the quest system, the first quest is simple and acts as a tutorial, requiring the player to complete 3 Strava activities. The game tracks how many activities have been recorded and only starts the main quest function once the tutorial quest has been completed.
Before the main quest function starts, the tutorial quest string is active and the main quest strings are inactive, which is then swapped when the main quests start. When the player is on the Midnights unlock, the Midnights string is enabled as an extra quest beneath the standard quests.
Qin, Patrick Rau and Salvendy (2010) found that player immersion is better when the difficulty varies up and down rather than continuously increasing, and when the difficulty changes at a medium rate. Tenenbaum, Spence and Christensen (1999) researched exercise motivation goals and concluded that a difficulty increase of 5-15% results in a substantial improvement. Each stage of the quest system has 9 different quests, and I chose the values to increase by an average of 5-15% for each level. However, every level has some quests that decrease in difficulty to vary the difficulty up and down.
Originally when making the sheet of values, the multiplier was applied to the previous value, however this made them reduce too much so that the final value was only just higher than the starting value. I changed this to multiply with the highest previous value so that the values trend upwards, but still have some decreases.
I decided to create an onboarding system for players which asks how active they are and sorts them into 3 different groups, which assigns them one of three sets of quests. These sets have different difficulties so that they are manageable for beginner and experienced runners.
I added a button to the settings that allows players to answer the onboarding questions again to change their quest difficulty level. This is useful for keeping the quests feel challenging but achievable when players need to change their level of activity, such as beginner runners as their fitness increases, or more experienced runners who are recovering from injury.
The quest tab has space for 3 quests, but there is an extra quest required to unlock the Midnights song cards. I decided to add a new button underneath the button for the main quest tab for the Midnights quest. It appears when the player progresses far enough which makes the player notice it. As the quest is required to advance to the next level, I used an exclamation mark icon to show it is important.