Slashdot Mirror


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."

4 of 255 comments (clear)

  1. Re:I wish by slim · · Score: 4, Interesting

    Try Left 4K Dead

    The fact is that cramming a lot of game into a small space is still worth doing.

    • Flash games sites have bandwidth costs
    • Console gamers develop high expectations as the hardware reaches the end of its lifecycle, and developers compete to squeeze more out of it
  2. Re:Meh by ivoras · · Score: 4, Interesting

    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:

    for those wondering, this a (too) low density flat mesh displaced with a procedural vertex shader. there arent any texturemaps for texturing, instead texturing (and shading) is defferred and computed procedurally in a full screen quad. this means there is zero overdraw for the quite expensive material at the cost of a single geometry pass. then another second full screen quad computes the motion blur. camera movements are computed by a shader too and not in the cpu, as only the gpu knows the procedural definition of the landscape.

    If you can do better, show your work :)

    --
    -- Sig down
  3. Re:Meh by slackito · · Score: 2, Interesting

    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(){
            asm("int $0x80;"::"a"(4),"b"(1),"c"(msg),"d"(12)); // write (1, msg, 12);
            asm("int $0x80;"::"a"(1),"b"(0)); // exit(0);
    }
    ---------
    $ gcc -m32 -Os -nostdlib -nostartfiles -s -o test test.c
    $ wc -c test 436 test
    $ ./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.

  4. Re:I assume the SOURCE fits into 4 kb by fractoid · · Score: 2, Interesting

    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.