Developer Artem Lytkin built a system that runs DOOM entirely through regular expressions. The implementation encodes a custom CPU's registers, RAM, a framebuffer, the DOOM engine compiled to that CPU's instruction set, and the game's WAD file into a 96.6 MB text string. A C-based driver applies over ten thousand ordered find-and-replace regex rules to this string to produce each game frame. At roughly 80,000 substitutions per second, the result is a marginally playable framerate — a creative proof that regexes are Turing complete.

•1m read time•From hackaday.com
Post cover image
291.4K Impressions13 Comments