Experience always wins the day
Recent discoveries in the codegolf group allowed me to revisit the good old Mandelbrot tracer and squeeze it in 101 bytes
Check this 101 mandelbrot tracer for yourself. Like the smallest versions before, this one works best in a Webkit or Blink based browser. Making it work in Firefox and Edge takes 3 more bytes.
<svg onload='for(n=99;n-=1/64;write(n%3?k:" "))for(r=i=0,k=20;--k/r;i=t)t=2*r*i+1-n/49,r=r*r-i*i+1-n%3'>
Then came Xen who saved another 2 bytes by offseting the initial values of the complex number:
<svg onload='for(n=99;n-=r=i=1/64;write(n%3?k:" "))for(k=20;--k/r;i=t)t=2*r*i+1-n/49,r=r*r-i*i+1-n%3'>
Back in 2008, I got this hitch that a Mandelbrot tracer was possible in 128b. There had been countless Mandelbrot and Julia fractals in 256b but the 128b mark seemed within reach. My first attempts clocked at 137b and 133b. Jacob 'cupboy' Seidelin then kicked the ball down to 122bytes, at which point this whole thing turned into a friendly competition that lead us to more dirty tricks and down to 112bytes.
You can see most of the iterations:
- 122b by 'cupboy'
- 114b by 'cupboy'
- 113b by 'cupboy', with a trimmed BODY element
- 111b with a trimmed BODY element
Trimming the BODY element is really rough on the various browser engines. To this day, only Firefox accepts this. The 112b version on the other hand works in Opera and Firefox. The 115b version also works in Webkit browsers.
Other recent projects
There are many experiments and projects like MANDELBROT TRACER to discover other here.
- MUSIC FOR TINY AIRPORTS 2/1 🛫 Celebrating the 40 years anniversay of Brian Eno's "Ambient 1: Music for Airports" with an homage written in 256 bytes with the Web Audio API.
- THEY COME AT DUSK 👺 A survival horror game for JS1k 2018, where you run away from dead miners as you hear your heart beat. Turn around using the arrow keys until all you hear is beeeeeeeep.
- FRONTFEST MOSCOW It was an honour to be invited to Fronfest Moscow 2017 with the little family to give my first workshop; implementing a Twin-stick shooter using ES6 and Canvas, and to continue my CODE🎙ART series of talks + live coding aiming to inspire new web developer artists.
- MINAMI DISTRICT DEMOJS 2013's winner 1k intro. With MINAMI DISTRICT I wanted to do something fresh. Something never seen in normal demos before: A city with a twister skyscraper.
- PNEBULA Almost the first 256b intro using Canvas ever :p
- DEFENDER OF THE FAVICON The brilliant arcade game Defender now playable inside the favicon of your browser! The idea was to push the concept of generated favicons far and beyond and pack a thrilling retro shooter in 16×16 pixels.
Don't be shy; get in touch by mail, twitter, github, linkedin or pouet if you have any questions, feedback, speaking, workshop or performance opportunity.