In the Sonic the Hedgehog franchise, Eggman populates the zones of Mobius with enemies to impede the player's progress. These enemies take the form of various kinds of robots which contain Sonic's animal friends trapped within them. Direct contact with a badnik while running upright will cause the player to take damage, however they are easily destroyed when jumped at or hit while performing a spin dash. Both of these actions turn the player into a ball form which can safely hit enemies. Upon destroying a badnik the animal contained inside is freed without suffering any harm.
Freeing his friends, trapped as badniks, is Sonic's main goal. At the end of every zone, after Eggman is defeated, the player destroys a prison egg, freeing the animals which would have subsequently been turned into new enemies.