Nanoscopic

by sentogiga

Last edited on 31 Mar 2023 by psenough. See all edits

6 comments

stgiga - 20:19 3 February 2022 #

This is a sub-4KiB JavaScript demo I wrote back in 2015 (I was in 8th grade then), and back then it was 30000 bytes. In December 2018 I got it down to its present size of 3099 bytes, which is 1 byte under 3.1 Kilobytes. In early 2019, Google Chrome stopped loading SVGZs from disk, and thus one has to host it from a server whose .htaccess or httpd.conf files are set to serve .SVGZ files properly. It's a 1-line change. The nice thing about this demo is that it is not just a demo. It is interactive AND procedurally generated. It also does not care what your resolution, aspect ratio, or refresh rate is. So you can run it on wide or tall monitors that are above 60hz refresh rate and have 4K or higher resolution. You interact with the game with either touch input or mouse movement to move the cursor shape, and you can change the shapes without moving your mouse by using the arrow keys. You can also move the mouse rapidly to "draw" as long as you are moving it. This uses 3 canvas elements, and the background is based on iOS 6's Linen but procedurally generated, the waves are based on the Wii Homebrew Channel banner, and the shapes hark back to the Mac screensaver known as AlphaBaby on my old eMac, and the sizing of the shapes is in a sine "breathing" pattern like the power light fading pattern on it. It's a calming cursorgame/toy, and it can be used to replicate a fidget spinner but with the addition of calming waves and linen (as someone with autism this creation is handy), and it is handy for occupying my kid cousins. At 3099 bytes it downloads very quickly, even on dial-up. With Wallpaper Engine it can be used as an interactive wallpaper (cursor), and since it generates at the resolution of what it is inside of, you don't really need to use the anti-aliasing stuff and such. You can use it with a Chromium web screensaver on Windows on an ASUS ZenBook Pro Duo to have the bottom screen be waves and the top screen be the shapes, without duplicating the screensaver. Instead, it's a stretch into a tall aspect ratio that the demo generates at with no complaints. A macOS WebKit screensaver can be used with this, and you can use the interactivity mode of it to make a screensaver that you can interact with, and do so even on the highest resolution Retina Macs. I hope you enjoy this fun demo I did that is also a cursorgame!

stgiga - 20:20 3 February 2022 #

One thing I should mention is that the image you see at the top of this Pouet.net page is a screenshot of one of the shapes generated by this demo (the linen background of the demo is also pictured as well), and is not an unrelated/irrelevant image. I also made a 16x16 version of it into my Pouet.net avatar, which is honestly cool. Making your demo into your avatar is cool. Anyways, I hope this demo finds favor with you. Enjoy!

Here's the Pouet.net link
https://www.pouet.net/prod.php?which=90893

stgiga - 20:54 3 February 2022 #

Also it bears mentioning that 3099 bytes is 1 byte under 3.1 Kilobytes, which is why I put the "3-kb" tag on this work.

stgiga - 20:56 13 April 2022 #

I got it down to 3098 bytes today using ECT, which can improve GZip. So we have yet another trick. Now it's two bytes under 3.1KB.

stgiga - 23:48 1 June 2022 #

I have updated the link to be a SourceForge web hosting link rather than an InfinityFree one because of InfinityFree not truly being a direct link even though it somehow appears and behaves as one.

stgiga - 06:32 30 January 2023 #

I just got the demo down to 3081 bytes via use of Leanify and then ECT again, which actually worked. I didn't think this was possible, but I have alas surprised myself.