hey guys, i've been cooking up this absolute massive theory connecting undertale and deltarune for a while now and honestly it explains literally everything about gaster, sans, alphys, and why the game mechanics work the way they do. please hear me out on this, it goes deep.
so, my theory starts with the whole concept of who actually "plays" the game. we know that if you type the name "gaster" into the system, the game immediately crashes or restarts. my theory is that gaster was trying to put himself into the system as a controller, but it caused a fatal error that shattered his existence across time and space. but before him, his old colleagues were actually the very first playable characters in the system. they failed their playthroughs and got almost completely deleted, which is why only tiny, gray remnants of them are left behind as the gaster followers.
after they failed, sans and papyrus were created in the lab as the next playable test objects controlled by gaster, like the vessels we see in deltarune. but when gaster shattered, they lost their "player" and were left behind as independent npcs. because they were literally made from gaster, they each got a half of his brain—sans got the logical left brain (quantum physics, time-lines) and papyrus got the emotional right brain. and since sans was directly connected to the player interface through gaster, his code still recognizes when a player resets, which is why he breaks the 4th wall and acts like he secretly knows you.
after the brothers were abandoned, alphys actually became the next "player" trying to control the system. but when she failed too, she turned into a regular npc who completely hides from her dark past under the guise of being obsessed with anime. she desperately wanted to recreate gaster because his experiments were so much better than hers, so she took the smartest monsters in the underground and injected them with tiny pieces of gaster's remaining essence. but it glitched out horribly and they became the amalgamates. that's why when they creep up on you in the dark, you can literally hear parts of gaster's glitchy language whispering "come closer, free us".
originally, sans and papyrus hated being test objects, so they actually used the warp doors to escape to the deltarune world. but they made the fatal mistake of coming back to undertale later just to check on the other test objects. the doors locked behind them, and they witnessed the horrific body-horror of what alphys did to the amalgamates. out of pure fear and despair that he would end up melting just like them (since he has gaster's code inside him), sans tried to build that broken machine in his secret room to fix the portal back to deltarune. but it never worked, and he completely gave up. that's the real reason he's so deeply depressed and nihilistic in undertale—he's terrified of melting.
this leads directly into the darkest part of the genocide run. during the date with papyrus, he actually confides in frisk and tells them all his deepest fears about the labs, the melting, and everything. frisk ends up killing papyrus out of a twisted sense of mercy, basically a mercy-killing to save him from ever turning into an amalgamate. sans is actually watching this whole thing from the shadows. he is so shocked and heartbroken that you weaponized his brother's final trust that he breaks his promise to toriel and fights you in the judgment hall for pure, grief-driven revenge.
but the story doesn't end there. after you finally beat sans, the amalgamates break out of the true lab and absorb his dust. since they all carry pieces of gaster's essence, this mass-fusion forcefully reconstructs w.d. gaster himself. gaster returns and sees the absolute horror of the genocide run. he's too weak to fight frisk directly, so he tears his own remaining soul apart to create two defensive clones to stop you in a specific timeline: chara and goner kid. but chara was coded wrong—she became a colorful glitch, became self-aware, and decided to join frisk to destroy everything in every single timeline instead. goner kid was the stable clone, but he was left completely gray and sad, trapped in just one timeline as a lonely monument to gaster's failure.
ultimately, chara and frisk destroy the space-time continuum so badly that the 4th wall completely breaks. reality is wiped clean, leaving nothing but a pitch-black screen. but here is the ultimate cosmic irony: since the entire universe has now been reduced to a blank void, and gaster’s pieces were originally scattered in the void, all of his fragments are automatically pulled back together. gaster is finally whole again, but at a devastating cost—because he is now literally the king of absolutely nothing.
for the final post-credits scene, the screen stays black and the song "king of nothing" by boywithuke starts playing softly on a ukulele. it fits his tragic fate so perfectly. then, his glowing white eyes flash on the black screen one last time, he types "THANK YOU FOR PLAYING" in wingdings, and the game closes itself permanently.