5 ms·
Show HN: An homage to Tom Dowdy's 1991 screensaver, "Kaos"
So, I was about 11 years old and just got my first Mac, a IIsi, and of course everyone had AfterDark, but there was this other screensaver program called "Dark Side of the Mac". And within it was, I think now, the most beautiful screensaver ever written. It was called Kaos.
Kaos would take anywhere from 10 to 30 seconds to slowly iterate on a single image, starting with a few colored dots and growing into webs within webs of algorithmic beauty.
I'm not sure how Tom Dowdy actually wrote the program. What I've done here is to try to reverse engineer how it might have worked, but to animate it at the same time.
Freezing a frame (by clicking) seems to often yield something close to the original. My method is to cycle between 1 and 30 lines, with spaced out pixels, and then iterate the whole buffer to draw fainter and fainter points within a radius from any point that's already lit, while also amplifying the ones that were lit before and shifting their colors slightly at the same time.
Anyway, I did this tonight but I've been thinking about it for weeks, so, I hope someone enjoys it. Cheers!
- boriskourt 2y agoIt reminds me of a Cloud chamber used to study ionizing radiation. Here is a timestamped video of one I saw recently: https://youtu.be/PVpP9gcnIcE?t=325 https://youtu.be/PVpP9gcnIcE?t=325
- dhosek 2y agoCloud chambers are surprisingly simple things. In grade school, following instructions from an old issue of Scientific American, I made one from a couple Mason jars (with assistance from my dad for the glass cutting) for the school science fair.
- duxup 2y agoGreat job! I don't think it's just nostalgia... but whatever it is I love a lot of the retro / past days of computing UI, UX and graphics. IT feels better than the current state of flat and flashy... everything. I don't know that the design and look / feel was entirely intentional, or how much was just the limiting factor of experience and computing / libraries available but things feel so much more straightforward and usable at times. You don't even have to go that far back to get that feel / simplicity: https://cs16.samke.me/ https://cs16.samke.me/ This screensaver looks great and feels like almost everything I would want from a cool screensaver or even just a moment to zen out.
- noduerme 2y agoThank you! This has no libraries, it's just pure javascript rewriting a big array of r,g,b,a pixels and posting it up to a canvas as quickly as possible. Very much the way I learned to light up pixels on a TRS-80 ;) Which was actually the easiest way to do something like this.
- lovegrenoble 2y ago>> simplicity: https://cs16.samke.me https://cs16.samke.me Nice UI, can you add more elements?
- noduerme 2y agoHah. Thanks, that's not a UI ;) But I did kind of yak-shave as I did it to make the saver its own loadable class with adjustable inputs. so I'll probably add a few sliders eventually, once I launch my world-dominating screensaver company. Seriously though, I wanted to fine-tune the parameters to look as much like the original as possible, and there are about 6 different factors which go into that, any of which can be off by a few percent and completely change the effect. If there's any demand, I'd be happy to make it adjustable!
- jonhohle 2y agoI think what’s crazy that for 30 years we had relatively optimal UIs with some huge improvements every now and then (obviously actionable controls, scalable graphics, exposé, etc.). Increasingly everything has been hidden and requires scrubbing or tapping everywhere, or in the case of iOS, possibly opening another app (Settings) to find some control.
- swayvil 2y agoThat's a good one. I don't think I saw it in Linux's collection tho. It should be.
- hoherd 2y agoFYI I was able to get the original to run in an in-browser Virtual Machine by navigating to https://infinitemac.org/1998/Mac%20OS%208.1 https://infinitemac.org/1998/Mac%20OS%208.1, clicking on "Macintosh Garden" at the bottom of the browser window, finding the app, downloading it, decompressing it, installing it, and configuring it. Also the documentation for the original app was helpful. http://poubelle.com/DarkSideDocs.html http://poubelle.com/DarkSideDocs.html
- noduerme 2y agoYes! The original does run in emulation. And to be honest, this attempt at cookery doesn't do justice to the beauty of the original. I'm still not sure what the secret sauce was. Maybe something to do with having the initial lines replicate each other rather than begin randomly placed...
- Eduard 2y agoI can't find "Macintosh Garden".
- noduerme 2y agoIt's possible to run the original Dark Side of the Mac. Download it here: https://www.themacattic.com/title/5993ca999f7040cc-darkside-of-the-mac https://www.themacattic.com/title/5993ca999f7040cc-darkside-... Then install it on a System 7.0 box at: https://infinitemac.org/ https://infinitemac.org/ It's a bit twitchy, but it works.
- ocal5 2y agoUnder the screen : )
- deleted 2y ago[deleted]
- entropie 2y agoThis is really nice but for some reason i have horizontal and vertical scrollbars, which clouds the experience especially in fullscreen. (Tested on brave/windows) https://i.imgur.com/bsdHalB.png https://i.imgur.com/bsdHalB.png
- noduerme 2y agoUm, probably b/c the viewport doesn't have user-scalable=0 / maximum-scale=1. I don't want to add that at this point, because it's nice to zoom into sometimes. It does have a manifest.json so you can install it as an app and run it full screen though ;)
- hassleblad23 2y agoThats reasonable :)
- evan_ 2y agoJust add css style `overflow: hidden;` to your `body`.
- egypturnash 2y agoYour description plus the name makes me suspect the original program was rendering a variety of "hopalong fractals": https://jolinton.co.uk/Mathematics/Hopalong_Fractals/Text.pdf https://jolinton.co.uk/Mathematics/Hopalong_Fractals/Text.pd... I miss having a wide selection of screensavers on my Mac. Nobody's writing new ones that properly plug into the system screensaver framework, everything on the App Store is just a little program that wants to run in the background, almost all my old .savers quit working and the ones that do still work have terrible framerates, and the ability to cram a Quicktime composition into the savers directory is long gone. Having some bit of procedural art on my screen was just nice.
- fogleman 2y agoI just downloaded the screensaver pack mentioned by the OP and there's even another one in the pack called "Hopalong"!
- noduerme 2y agoOMG. I remember that. I did not put that together!
- noduerme 2y agoHey, first of all, it's awesome to hear that. I miss screen savers and procedural animation so much... I mean, I used to zone out on them for hours, and try to write my own as a kid. It was a lot of fun. I realize the world has no need for them anymore, but I still like them. I'm not sure how we got to a point where there's only one basic screen saver for the Mac and it's almost impossible to find anything else. I hadn't heard of hopalong fractals, but this code implements something very similar. Conceptually, if you scan the whole image space at each iteration and, for each lit pixel you light up another random pixel at half the brightness within a certain radius, things will begin to trend in one direction. Because if the first one you light happens to be off to the left, then there's double the probability that the next will be at least that far to the left, and then the leftward spread becomes exponentially more likely in the following iterations. I haven't actually encountered spiral arms in this, but maybe following hopalongs will be my next saver ;) There's a lot you can do with a little code here. You can warp the space you want to light up, or over/under light certain things, re-amplify, or run a fader on the entire screen in a few bytes. The possibilities are endless. But it's kind of like...how do I make a thing that looks like that? The fun part, for me, of making a screen saver or any procedural art is cooking with very few ingredients and lots of limitations.
- ocal5 2y agoThanks, that's beautiful to discover. From : https://www.themacattic.com/apps/8730/downloads2/About_DarkSide_2.5.pdf https://www.themacattic.com/apps/8730/downloads2/About_DarkS... Kaos Kaos draws “cloudlike” pictures in color using an interative fractal algorithm. This fader comes to you thanks to Reinoud Lamberts, and I recommend you check out his excellent “Kaos” program which is available on Usenet and other places. Reinoud was nice enough to send me the algorithm he used, and I took some time speeding it up and making it use a bit less memory – actually the final code isn't related very much to his, but the algorithm is. However, this fader still will only work on machines with 32 bit Color QuickDraw – sorry all of you Plus and Classic owners! Kaos renders its data into an offscreen area, finally moving it onto the screen once the image has darkened enough. Kaos continues darkening the image and displaying it to you until either a timer expires (3 minutes) or an element of the image becomes fully intense. Unless you select otherwise in the settings dialog, you will see a small dot moving from the bottom of the screen to the top – this is a “progress” indicator to let you know how far away the first image will be. It takes about 15 seconds to generate the first picture on a Mac II class machine. This fader needs a good deal of RAM and a large amount of CPU – so this fader isn't a good one to leave running if you are doing background printing, downloads, or compiles at the same time. The current SIZE resource within in the fader provides enough RAM for a standard Apple RGB monitor to be rendered at half resolution. You may lower this value (which will result in a chunkier image) or increase it (which will result in a slightly smoother image) via ResEdit. Those of you with 32 bit displays will find you can actually decrease it a great deal (probably to around 40 or 50 K) because 32 bit displays do not require the large offscreen rendering area that 8 bit displays do.
- deleted 2y ago[deleted]
- noduerme 2y agoThis is fantastic, I had not seen this! Thank you.
- kalleboo 2y agoI looked up Reinoud Lamberts's old homepage on the internet archive, and was amused by his licensing scheme: > Pay the license fee, which is US $29 per Linux > workstation, US $499 per user on any MicroSoft operating > system, and US $49 per user on any other system. Send > money orders for the required amount to Reinoud Lamberts, > [address redacted]
- CharlesW 2y agoTom Dowdy was such a kind soul. https://www.engineersneedart.com/blog/dowdy/dowdy.html https://www.engineersneedart.com/blog/dowdy/dowdy.html http://www.poubelle.com/butterpig/ http://www.poubelle.com/butterpig/
- ChrisArchitect 2y agoReminds of similar lines/polygon screensaver on Windows - "Mystify" aka "Mystify Your Mind", which still exists!
- mfro 2y agoAfter a quick google I found someone had uploaded a remake of this with JS: https://codepen.io/garthparkhill/pen/PyMPVR https://codepen.io/garthparkhill/pen/PyMPVR
- noduerme 2y agoIt makes sense. The great insight into all these kinds of screensavers is that you create a function that draws a line between two points, maybe with some amount of density and anti-aliasing. Then you create two random points, or four, and treat them like pong balls: They get a random velocity x,y and all they have to do is swap their x-1 or y-1 when they hit a side of the screen. Draw a line between them. And instead of refreshing the screen, just redraw over the last screen and fade any existing lit pixels. Boom, you have a fuzzy mustache screensaver.
- mfro 2y agoCurrently trying to implement the 'fuzzy' bit in this one: https://gist.github.com/omnizach/886d9843b0fb176da2a7 https://gist.github.com/omnizach/886d9843b0fb176da2a7
- kstrauser 2y agoHow did that "fade any existing lit pixels" bit work? Do you just redraw the list N lines, fading in from black (to completely erase the oldest) to the full color of the newest?
- recursive 2y agoIn the windows one, there was no fade. It drew black lines on top of the old lines, and remembered a queue of about n=10 or so generations.
- Workaccount2 2y agoI can't tell if I am missing something or if the beauty of this screen saver is largely of function of nostalgia rather than it's attributes. It just looks like hardly visible lines of single pixels randomly bouncing around.
- noduerme 2y agoYou would not be wrong. It was really just a short project to reproduce something I was very nostalgic for. Which I definitely did not expect to rank highly on HN! But I guess it touched on a nostalgia vibe for some other people too. This was something I thought about for a long time, ended up being a few hours twiddling at a bar. But... there was something I remembered that I wanted to get back and see again.
- metadat 2y agoIs the code for this available? The minified Javascript is a touch difficult to make heads or tails of: https://thestrikeagency.com/kaos/assets/index-7Wh69ljd.js https://thestrikeagency.com/kaos/assets/index-7Wh69ljd.js Edit: Thanks @noduerme! I had a feeling it looked like compiled TS output. p.s. it looks like you aren't currently hellbanned :)
- noduerme 2y agoI haven't, like, made a repository for it or anything, but here you go: https://thestrikeagency.com/kaos/src/ https://thestrikeagency.com/kaos/src/ There's a bunch of extra experiments and junk in there that didn't make the rollup. It's pretty concise and basic, not a whole lot more verbose than what you see in the mini, ultimately (if you just format it out). Everything mostly does what it says on the box, but let me know if I screwed something up ;)
- Peacefulz 2y agoI didn't expect to see my last name on here. Time to find out if we're related! Haha. Super cool project by the way.
- rezmason 2y agoI know it's a few years old, but you've also got a great portfolio of previous work OP: https://thestrikeagency.com https://thestrikeagency.com I know the kind of work and love that goes into this kind of project. From one software nostalgiac to another, I salute you noduerme
- noduerme 2y agoThanks for checking it out! You know what it's like, you get curious and start making stuff. I've been lucky to get to work on lots o' weird and fun projects over the years. That's actually my fourth portfolio site since the 90s, and it's already aged. The first was HTML, the second Flash AS2, then AS3... time goes on. I'm still sad that 15 years worth of my experiments and art were vaporized from the internet when Flash was killed, and most of it won't run in Ruffle yet, but we're almost to the point where those will be retro enough to revive, too. Cheers!
- deleted 2y ago[deleted]
- at_a_remove 2y agoThis is strongly reminiscent of the main animation in the arcade video game Qix.
- msephton 2y agoExactly! Qix 1981
- DonHopkins 2y agoHere's a simple screen waster I wrote with WebGPU and cannabis -- I mean canvas: https://stashbox.live/ https://stashbox.live/
- dylanz 2y ago/me reinstalls electric sheep
- aussieguy1234 2y agopress F11 on your browser to make it full screen to get the full experience.
- forgotacc240419 2y agoLooks great! Could you fill the screen with black? It'd be a great OLED screensaver (I don't get why this isn't something people want more tbh, they look amazing with things like this on them) if the white overflow wasn't there
- Aldipower 2y agoGreat job! Also has 10% CPU usage, like the original back in the days. ;-) My favorite screensaver was "Diatoms" from 1994 (?) on a SGI Irix machine. Still fire it up sometimes, just because of the screensaver. https://www.youtube.com/watch?v=xWmj_ixreUg https://www.youtube.com/watch?v=xWmj_ixreUg