He ultimately decided to play segments of the music separately, and connect them on a track. He initially tried using a music tracker to compose the soundtrack, but found it difficult to use. For each section of the game, Fox composed the music prior to programming, as it helped 'decide how the scene should go'.
'Megalovania', the song used during the boss battle with Sans, had previously been used within Homestuck and in one of Fox's EarthBound ROM hacks. According to Fox, over 90% of the songs were composed specifically for the game. Fox also stated that he tries to be inspired by all music he listens to, particularly those in video games. The soundtrack was inspired by music from Super NES role-playing games, such as EarthBound, as well as the webcomic Homestuck, for which Fox provided some of the music. A self-taught musician, he composed most of the tracks with little iteration the game's main theme, 'Undertale', was the only song to undergo multiple iterations in development. The game's soundtrack was entirely composed by Fox. Asgore now seeks to break the barrier, which requires him to collect seven human souls, of which he has six. When Asriel returned their body to the humans, they attacked and killed him, resulting in Asgore declaring war. One day, the child was fatally poisoned by some flowers.
Asriel, the son of Asgore and Toriel, befriended a human child who fell into the Underground and was adopted by Asgore and Toriel. During their travels, the human learns the cause of the war between humans and monsters.
Some of them are fought, with the human having to choose whether to kill them or to show mercy should the human spare them, they may choose to become friends. Along the way, the human encounters several monsters, including: the skeletons Sans and Papyrus, two brothers who act as sentries for the Underground Undyne, the head of the royal guard Alphys, the kingdom's royal scientist and Mettaton, a robotic television host Alphys created. The human eventually leaves Toriel to search for Asgore's castle, which contains the barrier leading to the surface world. The game features multiple story branches and endings depending on whether players choose to kill or spare their enemies and as such, it is possible to clear the game without killing a single enemy. In order for some boss encounters to be completed peacefully, the player is required to survive until the character they are facing has finished their dialogue. If the player uses the right actions to respond to the enemy, or attacks them until they have low HP (but still alive) they can choose to spare them and end the fight without killing them. They can use the ACT option to perform various actions, which vary depending on the enemy. Killing enemies will cause the player to earn EXP (in turn increasing their LOVE) and gold. Players may choose to attack the enemy, which involves timed button presses. As the game progresses, new elements are introduced, such as colored obstacles, and boss battles which change the way players control the heart. During battles, players control a small heart which represents their soul, and must avoid attacks unleashed by the opposing monster in a similar fashion to a bullet hell shooter. When players encounter enemies in either scripted events or random encounters, they enter a battle mode.