Pong game recompiles its own source code every frame — winning entry at IOCCC29 was generated by a custom compiler

3 hours ago 16
Pong game that recompiles itself every frame wins the IOCCC29 obfuscated C contest (Image credit: @timClicks via X.com)

Jonah Uellenberg won the Ping Pong Prize at the 29th International Obfuscated C Code Contest earlier this month, with a version of Pong that recompiles its own source code on every frame. Each run of the program prints the C source for the next frame, with the current display and game state embedded inside it, so compiling and running that output advances the game by a single step. Somewhat ironically, Uellenberg didn’t write the obfuscated code himself; instead writing clean, commented source in a programming language he built called Insert, whose compiler generated the scrambled C that took the award.

Today in cursed code: a computer program that plays pong by modifying its own source code. (Each frame is a new compilation). https://t.co/kS2ACZ7r79 pic.twitter.com/7yIc9tXSdPJune 26, 2026

In his entry notes, Uellenberg writes that the winning code “isn't really obfuscated. It never was,” stressing that it’s compiler output rather than anything mangled by hand. The Insert compiler targets C and runs the size-optimization passes that a production compiler would, such as liveness analysis to strip dead code, constant folding, and a variable-merging pass that reuses one variable slot for many values. Repeated token sequences are then packed into C preprocessor defines to shave bytes. By his account, optimization and obfuscation tend to collapse into the same output, which is why the result reads as a wall of single-character identifiers and a data array that mixes constant and mutable values.

A quine is a program that prints its own source code when you run it. Uellenberg's version prints a modified copy of itself: the source for the next frame, with the updated game state baked in. Run that, and it prints the frame after, and so on.

The player moves the right paddle by passing “w” or “e” as a command-line argument, competes against a computer opponent, and runs a bundled script that automates the compile-and-run cycle so the match plays in real time. Beating the computer switches the program to a second game, a side-scrolling jumper modeled on the Chrome dinosaur runner, and clearing that switches it back.

IOCCC29 is the second contest since organizers ended a four-year hiatus running from 2020 to 2024. 2025’s winners were presented via a YouTube livestream on June 6th before the source went to the contest's GitHub repository.

Yusuke Endoh, whose self-modifying quines Uellenberg credits as the reason he started writing them, took three of this year’s awards. Run since 1984 by Landon Curt Noll and published under a Creative Commons license, the contest drew a judges’ note on the Pong entry asking entrants to resist building “Quine Doom” for next year.

The entry sits alongside other recent feats that wring full systems out of unlikely materials, including an x86 CPU emulator written entirely in CSS and a playable build of Doom rendered in pure SQL. The judges plan to open IOCCC30 toward the end of 2026.

Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.

Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.

Google Preferred Source

Luke James is a freelance writer and journalist.  Although his background is in legal, he has a personal interest in all things tech, especially hardware and microelectronics, and anything regulatory. 

Read Entire Article