Hacking Hi-Def Graphics and Camerawork Into 4Kb
TRNick writes "The old home-computing art of hacking elaborate graphics and camerawork into tiny amounts of memory has been lost, right? Not so. The demoscene is keeping ingenious coding skills alive, and TechRadar finds out the latest developments. Winner of the 4kb competition at 2009's Breakpoint party was RGBA's demo 'Elevated,' a gorgeous scrolling demo featuring photo realistic landscapes and music, which fits into the memory used by one of your PC's desktop icons. This is really impressive stuff."
Try Left 4K Dead
The fact is that cramming a lot of game into a small space is still worth doing.
No, it just raises the bar. Back when all you had to work with was CGA in 320x200 it was impressive to show a rotating cube in 4k. Today, this demo nicely shows where the virtual bar is when even considering making a 4k demo. As you couldn't do "Elevated" on your 100 MHz 486 in *no* condition or with any libraries, so would you be laughed at if you presented a rotating cube or a wormhole today.
Here's an excerpt from TFA:
If you can do better, show your work :)
-- Sig down
Ouch, i thought the formatting would be preserved with tags. Posting as plain old text now :P
----- test.c
const char msg[]="Hello World\n";
void _start(){ // write (1, msg, 12); // exit(0); ./test
asm("int $0x80;"::"a"(4),"b"(1),"c"(msg),"d"(12));
asm("int $0x80;"::"a"(1),"b"(0));
}
---------
$ gcc -m32 -Os -nostdlib -nostartfiles -s -o test test.c
$ wc -c test 436 test
$
Hello World
And this is just scratching the surface. Of course, in a real 4K you would want to use some compression, too, as pointed by another replies.
I'd presume that there's a fair bit of self-modifying code in there, even if you don't count the almost-mandatory executable packer. Self-modifying code often gives virus scanners a woody. Or the willies, whichever. ;)
Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.