{"by":"gneissguise","descendants":69,"id":44295667,"kids":[44296453,44295905,44296265,44296292,44296217,44299236,44297101,44296172,44297073,44296812,44296561,44297080,44298661,44296931,44297660,44300970,44296872,44297550,44296544,44295960,44296403,44296332,44310635,44296236,44298584,44295955],"score":189,"text":"After 25 years of writing software, I was feeling nostalgic for the kinds of things that got me into programming in the first place: the old DOS demoscene. I spent a weekend seeing if I could recapture some of that INT 13H VGA magic using today&#x27;s web tech, but with the old-school constraints of doing it from scratch.<p>The result is this portfolio of ten classic effects running in a single HTML file. It&#x27;s all vanilla JavaScript writing to a &lt;canvas&gt; element, with no external libraries. It was a fun challenge to implement things like:<p>* The color palette cycling and smooth fading in the Plasma demo.\n* The buffer-averaging algorithm for the Fire effect to make the flames feel more natural.\n* The distance-based texture crossfading in the Tunnel to create the illusion of flying through different sections.\n* A 2D scalar field for the Metaballs to calculate the surface normals for that classic blended, metallic look (I did the best I could with the given constraints).<p>It was a great exercise in getting back to first principles and a reminder of how much those early demo programmers could accomplish with so little. I hope it brings back some good memories for others who grew up with this stuff.<p>I&#x27;d love to hear about your favorite classic demos or if there are any other iconic effects you think would be a fun challenge to add.<p>Cheers!","time":1750133251,"title":"Show HN: I recreated 90s Mode X demoscene effects in JavaScript and Canvas","type":"story","url":"https://jdfio.com/pages-output/demos/x-mode/"}