How to get Doom running in Windows' notepad.exe - Ars Technica

2 years ago 57
<em>Doom</em> arsenic  it was meant to beryllium  played.

Enlarge / Doom arsenic it was meant to beryllium played.

Hackers of a definite property are intimately acquainted with the "Will it tally Doom" meme and the wide array of ports it has engendered (including a crippled of Doom that runs wrong an lawsuit of Doom itself). Still, this week's viral video and eventual itch.io release of a Doom larboard moving successful Windows' modular notepad.exe substance editor left america with a fig of questions.

Chief among them: "How?" and "Why?"

“My favourite benignant of magic trick”

When it comes to the "How?" DoomPad coder Sam Chiet told Ars that the hack is "my favourite benignant of magic trick," the benignant that "seems wild, but it's ace simple."

Building disconnected a C# larboard of the open-sourced Doom root code (and aboriginal shifted to Chocolate Doom for nationalist release), Chiet's programme archetypal converts each successive framework from the crippled into ASCII text. That's done utilizing a elemental algorithm that figures retired the "brightness" of each pixel (by averaging retired the RGB colour transmission data), past converting that to a likewise acheronian ASCII quality utilizing a pre-set lookup array (ranging from "$" and "@" for the darkest pixels to "\" and "." for the lightest).

i got DOOM moving wrong Notepad astatine 60fps pic.twitter.com/EQFuRu4N0r

— Samperson (Crime Arc) (@SamNChiet) October 9, 2022

"[The] conversion is ace elemental and astir apt 'incorrect,' but it works, and that's what matters," Chiet said. "Magic tricks [like this] are ever adjacent parts disappointing and cool!"

Because "the Notepad font is doubly arsenic gangly arsenic it is wide," DoomPad initially throws retired each different enactment of generated substance to support the resulting ASCII successful the close proportions. From there, Windows makes it comparatively casual to insert that 360×240 array of substance into Notepad astatine immoderate font size your model and show tin handle, Chiet said.

"I'm stealing a notation to the interior textbox and conscionable sticking my representation into it via an operating strategy 'message' and forcing it to re-draw," helium said. As for speechmaking subordinate input, that's "just thing you tin bargain from anyplace successful Windows; you don't request your circumstantial programme 'open.'"

//dario-zubovic.itch.io/1337-doom"><em>1337d00m</em></a>, which has a cardinal  vantage  of utilizing colour  characters.

Enlarge / Chiet said helium was somewhat inspired by erstwhile projects similar the ASCII-based 1337d00m, which has a cardinal vantage of utilizing colour characters.

Read Entire Article