Players can spend gems to buy song cards from the shop. The artwork for the cards was drawn by my sister, and each album has a different image that represents the album and era.
Early prototype
Final version
The card they buy is removed from the list of remaining cards so it isn’t given again, and the unlocked song card is displayed to them by setting the image of a large blank card to the unlocked song.
The card is then 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 numbers are enabled on each page to reflect the albums.
I added the option to buy a specific song in the shop so players have more agency in how they spend gems. These songs reset each week. When the shop is opened, the time is checked to determine if it needs to refresh the items. If it does, each of the buttons choose a song from the list of remaining songs. They are then compared, and if the same song was chosen by multiple buttons, one of them repicks.
If the player buys one of these songs, the same functions as when buying a random card are run. The button is then disabled until the shop resets so it can’t be bought again.
All the songs available to the player were songs from albums, but Taylor Swift has other standalone songs that I wanted to include in the game. I decided to add these as bonus songs that the player unlocks by completing an album. This gives an extra reward to incentivise players and doesn’t over complicate the level system by adding more to it.
I implemented these songs by using a list of song IDs for each album and checking whether the unlocked card list contains these IDs. If the list contains every ID for an album, every song in that album has been unlocked, so the bonus song is awarded.
When the bonus song is given, it is enabled in the collection, added to the list of unlocked songs and displayed to the player. To stop the song being given multiple times, I added boolean variables to track whether each song had been given, and the unlock check only runs for bonus songs that haven’t been given.
After unlocking the bonus songs, the song navigation didn’t work with them. When I checked the swipe navigation function, I realised I needed to add the new sort IDs to the list of the swipe manager script. Unlike other popups, I didn’t need to queue the bonus song checks as a player can only earn one song at a time so there would never be a situation where multiple bonus songs are triggered together.