disobey 2020 jpg

#demoscene 2020-01-19

This is a 64K polyglot; it's both a JPG and a WebGL demo. In addition to WebGL, it utilizes Web Audio API and Speech Synthesis API - should be available in most of the modern browsers. Sound on!

You can download either of the files and change its file extension to view the other. The contents are the same!

disobey 2020 jpg

sha256sum 00e1009aa7ba468107291cb635fd8637a82308cb24e50750bc0b4ac3f313bc7c

Original tweet:

Missing a ticket to #Disobey2020? Submit your art piece with the theme of “a tribute to hacker culture” to get a free ticket to Disobey! Submissions in TIF, JPG or EPS formats to submissions@disobey.fi at latest on 19.1.2020.

A while ago I had seen this website: incept10n. It is a four-fold polyglot, JPG, CSS, JS and HTML!

I wanted to do something similar. I grabbed one of my old WebGL browser demoscene boilerplates from earlier, and modelled the Disobey logo as a signed distance field1. It took some hours to get it pretty, but it was mostly progressing along nicely.

After making the logo coin, I turned my focus into making this project into a JPG. This took an immense amount of frustration! Tons of scripting in bash and others, command-line parameter tweaking for echo,cut, dd, cat, xxd and others, staring at hexdumps with hexyl. Intense documentation diving, rescuing escaped newlines \n that kept getting eaten and converted into actual newlines. Reading and writing raw bytes for JPG EXIF headers, trying to convince macOS preview that the file is indeed a valid JPG that can be shown in preview (fun fact, browsers are much more lenient!). Ugh.

hexyl hexdump viewing

After hours of debugging with friends on IRC, one person suggested to use ImageMagick's convert and its -comment subcommand. Ridiculously enough, it worked! I got to throw all my complicated scripts away.

Sometimes, you don't have to make things hard for yourself. Sometimes there really is an easier way out.

Kind of like instead of spending 10h+ on creating this entry for the competition, I could've bought a normal ticket for the event, before they ran out. 🙃


Thank you to mercury, for your hg_sdf library - it makes modelling objects in SDF quite a bit nicer!