IOCCC 2014 Winning entries 02/09/2018
Long time ago (2014), in a galaxy far far away, i have won two nominations at the Internatonal Obfuscated Code Contest. I remember when I discovered the IOCCC, back in 2003, thanks to EFFEOTTO ... I would have never thought to participate and win something .. but in a single year i have won two times! Incredible :-)
Homage to a classic game
This is the source code of the first winning entry:
The program is not only a Super Mario Bros partial implementation but also a generic Engine for Platform Games. It can be used to create games like Super Mario Bros. The contest entry was released with two example games level: one level of Super Mario Bros and one level of Giana the Sister (an SMB-like game for Amiga).
These are two screenshots of the two playable levels:
The Engine implements all the needed stuff:
- Rendering with vertical and horizontal scrolling
- Player animations and control via keyboard
- Collision detection
- Gravity
- Enemies with walking animations and death animation
- Power up (Giana become a PUNK and Mario become BIG)
- Background music
These are the IOCCC Selected Judges Remarks about this program:
"A classic for a particular generation. Like all good programs, being data driven means you can do fun things in small spaces."
Here you can download the obfuscated sourcecode. If you open the file with and see some ugly alignment, set the TAB WIDTH of your text editor equal to 4. :-)
Here you can download the not obfuscated sourcecode. The code is already unreadable due to the shrink in sizes and due to the multiple rewrite steps (needed to simplify all the internal logic of the Engine).
Here you can read the official IOCCC winning entry description.
Most tweetable entry
The second winning entry is very little. This is the program full sourcecode:
d=80,e,j;g(){j+=getchar();}main(a,b)char**b;{for(;;){j=0;g();if(j<0)break;g(g());putchar(b[1][j/3*strlen(b[1])>>8]);if(!(++e%d))puts("");}}
There is also a shortest version of the same program, with a simplified logic:
d=80,e,j;g(){j+=getchar();}main(){for(;;){j=0;g();if(j<0)break;g(g());putchar(" .:#@"[j/3*5>>8]);if(!(++e%d))puts("");}}
What the hell do the program do?
The program convert the image given in input to an ASCII ART!
These are the IOCCC Selected Judges Remarks about this program:
"On the face of it :-) given what this program one might wonder what makes this winner special. But when you realize the source is small enough to tweet on twitter you understand.
Who will be the first to tweet this source? How many re-tweets will such tweet get? And how many people will really understand the tweet?"
Here you can read the official IOCCC winning entry description.
...
Now... Really... How much is insanely NERD all of this?