First stab at webGL, in 1k between two nappy changes. It's glitchy and tiny but I quite like this puppy. It ranked #3 at DemoJS.
This entry is a bit of a proof of concept: I was sure it was possible to make something decent in 1k with webGL but wondered how much effort this could take and how small the setup code would be.
It turns out it's not that complex and the setup code ( including vertex shader and a minimal fragment shader ) is under 500 bytes uncompressed which leaves a lot of space for a shiny fragment shader.
Initially this little intro was made for DemoJS and took 1024 bytes of JS. If you add the HTML/CSS/JS shim, it weighed around 2.5Kb. Soon after I wrote a standalone version in 961 bytes. Today, the standalone version clocks at 842 bytes with the following breakdown:
- 87 bytes of HTML + CSS
- 441 bytes of GLSL ( 44 and 397 for the vertex and fragment shader respectively )
Comments and other karma retribution
Make sure to leave comments, piggies and thumbs up or down for GL1K Cotton Candy on Pouet.net.
To be continued...
Expect more gl1k productions in the future. Making this intro was fun and there is no doubt this intro can be optimized further and the setup code improved.
Other recent experiments
There are many experiments and projects like COTTON CANDY to discover other here.
- MUSIC FOR TINY AIRPORTS AT WEB AUDIO CONFERENCE The Web Audio Conference 2018, held in September 19-21 in Berlin was a great mix of researchers, web developers, artists and performers presenting their projects. I had the chance to provide a deep dive into music for tiny airports, explaining how to generate hours and hours of music in a handful of bytes.
- MUSIC FOR TINY AIRPORTS 2/1 🛫 Celebrating the 40 years anniversary 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.
- SUDOKU SOLVER Solves a Sudoku grid using magic, recursion, and 140bytes of brute force.
- WOLF1K The idea of this entry for the JS1K contest was to do the impossible: a 1K remake of the famous WOLF5K that rocked the final edition of the5K. It does not feature guns, evil grins and violence for in WOLF1K there is no room for guns or any form of violence.
- OOMA The winning bootsector of Outline 2005, featuring two images zooming with experimental music in a valid 480bytes Atari bootsector.
- EQUALIZER A little intro for the famous Equalizer BBS made in 4kb for MSDOS
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.