Really well done. It's a bummer that source code are rarely released for demos.
For me one of the best of all times is Second Life , by Future Crew. Developed in 1993 nonetheless, it was a big breakthrough at the time, with almost 10 minutes of animation, and in early x86 hardware. Source code available .
A note on the architecture from the demo:
The vast majority of ancient buildings follows quite simple procedural methods that only very recently got reverse engineered:
(I suspect this method also permits approximating the plastic number [ https://en.wikipedia.org/wiki/Plastic_number ], but so far it seems nobody has figured out a way to do so yet. I mention this due to the architectural relevance of the plastic number.)
I speculate that leveraging this fact could likely permit even more complex architecture in demos. (And, to mention an off topic point, it likely has some relevance for automating UI layouting.)
I used to do a lot of demoscene stuff as well . I've been trying to get back into it but I've found that all of the software engineering I've done in the meantime has kind of driven the "just get it working" mindset away somewhat.
I used to just write code that "happened" to work, more or less. Nowadays I would want to get unit tests in place, make it cross-platform if at all possible and get a nice GUI going for easy tweaking. It's made it impossible for me to get anything done in the limited free time I have :) ideally I'd write it in Rust, but there, too, I am waiting for tooling to catch up. I get the feeling that I'm not so much waiting for the tooling, but I'm using the waiting as a sneaky way of procrastinating and fooling myself...
A previous discussion of the source code of a 4K demo, 'Elevated', by Rgba, with a link to a really good dive into it by Iñigo Quilez, who worked on it:
Deep respect for this. Also humbled looking at my 1 page Vue + Webpack SPA clocking in at about 1mb
This is the kind of stuff I grew up on, so when I’m critical of the software and the implementations here, the bloat, the unnecessary dependencies, the slowness... this is the standard I judge them against. The mentality and the techniques in the article are applicable to any kind of software. When applied correctly, they make any software small and fast.
Another great writeup of making of a 64k: http://www.lofibucket.com/articles/64k_intro.html
Well the first optimization would be to roll my own libc (not that hard at all :) ) where i would load api calls by ordinal and only those that i really need (ok, for the sake of compatibility, i would dig them from IAT table based on 16bit hash (folding fnv32) of API name + dll name). Same for all other libraries, everything compiled with agressive optimization (at least /O2). Next step would be to take compiler that is minimizing the bloat, tinyc (https://bellard.org/tcc/), compiling 32 bit binaries just to save some space. Maybe even go for .com to avoid PE header bloat. At the end compress everything with something like upx, but probably i would roll my own PE compressor. Instead of using functions, the macros would be used, absolutely no classes, #pragma pack(1) all structures (i never tryed what tinyc does :D). Also merging PE sections will save some bytes.
Size optimizing is fun and you can learn a lot but it is dying art, probably 99.9999% of todays developers dont understand what I have written in first part (today, you are learning the programming, but very indequately what the OS does, actually typical today programer understands the programing but is clueless what his code does on low level) ... but +1 for anyone that goes into that direction, my boss at my first job was saying that good software fits to one 1.44 floppy but this is today violated by HHLL. Well business wise no need for that unless you are making malware, but still cool.
I’ve always been impressed by the demo scene but never tried my hand at one because of the insane programming chops needed.
What are your top 3 favorite intros that you would recommend watching?
If someone is interested in small demoes, I recommend "A Mind is Born", a 256 Byte Demo. It runs for about 3 minutes (IIRC).
I still play https://www.youtube.com/watch?v=sWblpsLZ-O8 over and over, just for the song, not only because it is 256 bytes, but because it is a compelling song too.
Awesome. Thanks for sharing