I'm gonna be honest: I've got no idea how BaronW built Space Invaders inside Dwarf Fortress, but the important thing is that they did. As the video above demonstrates, the user has managed to get a fairly rudimentary version of the classic shooter working inside the notoriously complicated ASCII roguelike. From what I can gather, this wasn't achieved with mods: it wields the systems inside the game. Which is pretty mindblowing.
The map, which can be viewed in its entirety here and downloaded here, took "85,000 mechanisms" and requires "over 100,000 power at full drain," according to BaronW. "The main screen is 32x32, that makes it a 1 kilopixel display," he adds.
If you've got a vague understanding of how Dwarf Fortress works, it might be worth perusing this flowchart, which presumably shows how BaronW got the whole thing to work. The same user has also built a "mighty dwarven" calculator in the game as well.