Sonic Mania is a side-scrolling platform game developed by Headcannon and PagodaWest Games and published by Sega for Nintendo Switch, PlayStation 4, Xbox One, and Microsoft Windows in August 2017. It was announced in commemoration of the 25th anniversary of the Sonic the Hedgehog series. The game is inspired by the original Sonic the Hedgehog games released for the Sega Genesis, and features 2D graphics and remastered versions of stages from previous games alongside new stages. The player controls Sonic the Hedgehog and his companions Tails and Knuckles as they venture to defeat their nemesis Doctor Eggman and his henchmen, the Hard-Boiled Heavies.

Development was led by programmer Christian "Taxman" Whitehead, who had previously worked on enhanced ports of early Sonic games. Art, level design, audio, and additional programming were provided by the independent studios Headcannon and PagodaWest Games, chosen for their work in the Sonic fangame community. Sonic Mania received generally positive reviews, with critics praising its faithfulness to the early Sonic games. Many viewed it as a return to form for the series following a number of poorly-received Sonic games released after the 1990s.

Following the events of Sonic & Knuckles, Sonic and Tails receive a powerful energy reading from Angel Island and board Tails's plane, the Tornado, to investigate. However, Doctor Eggman has sent a group of robots to reach the signal first. Sonic and Tails arrive just as the robots excavate the source of the signal, a mysterious gemstone, and use its powers to become the Hard-Boiled Heavies. The robots send Sonic and Tails back in time, along with Knuckles, who was relaxing nearby. Sonic, Tails, and Knuckles travel through places from their past to prevent Eggman from using the gemstone's power for evil, clashing with him and the Heavies along the way.