In UnderTale, Doomy was once a simple temmie named dOOmie bOi until he snuck into Alphys' lab and entered a strange machine. This machine somehow mutated Doomy into a more advanced, anthropomorphic temmie. (This machine was designed to create monsters capable of breaking the barrier.) All this happened while Alphys was on her date with Undyne.
It was then that Frisk shattered the barrier and all the monster's went free. Doomy took advantage of this by looting the rest of the technology that was in Alphys' lab and hightailing it out of there.
Fast foward a few years and Impact ( I DON'T SHIP PAPYTON, BUT I LOVE THE OFFSPRING THE SHIP GENERATES) finds the self proclaimed supervillian DoomyBoy robbing mettaton's resort. Since he was a self proclaimed superhero, he tried to stop Doomy and would end up causing them to be trapped in UnderSwap.
Doomy would try to escape and brought Impact everywhere from UnderFell to AlterTale, before eventually ending up on the moon in OuterTale. Impact began attacking Doomy, believing it was his fault they were so...screwed, really, and accidently broke Doomy's teleporter. Alphys and Sans apeared in the machine from Sans' back room. By this time Doomy and impact had seperated and they only stayed long enough to save impact. Doomyboy is now stuck on the moon and uses information he gathers from this wiki to try and find a way to escape and conquer the doodleverse, but he's actually kind of harmless.