Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Graphics Software Programming IT Technology

Hacking Hi-Def Graphics and Camerawork Into 4Kb 255

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."
This discussion has been archived. No new comments can be posted.

Hacking Hi-Def Graphics and Camerawork Into 4Kb

Comments Filter:
  • Cheating (Score:0, Interesting)

    by Anonymous Coward on Monday July 20, 2009 @12:04PM (#28757121)

    I assume that 4K doesn't include the 3D libraries they used. It's still impressive but 4k of code can create a lot of procedural graphics if you have a few megs of graphics libraries to display it.

  • Re:I wish (Score:5, Interesting)

    by slim ( 1652 ) <john@hartnupBLUE.net minus berry> on Monday July 20, 2009 @12:20PM (#28757333) Homepage

    Try Left 4K Dead [mojang.com]

    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
  • Re:Meh (Score:5, Interesting)

    by ivoras ( 455934 ) <ivoras@NospaM.fer.hr> on Monday July 20, 2009 @01:20PM (#28758347) Homepage

    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 :)

  • Re:Wow (Score:1, Interesting)

    by Anonymous Coward on Monday July 20, 2009 @04:03PM (#28760989)

    Your desktop background is a few KB, but take a video of it in high def, and it will still be a massive file...

    The data contained in the 4K is a music engine, instructions to directX/OpenGL, and custom code. The visual data is a mathematical representation only, and not actual landscape, processed through the renderer and displayed to the screen.

    Your speakers are capable of representing sound in amazing detail from a small amount of data. Your screen and video card extrapolate and do a massive amount of processing (requiring a large memory buffer as well due to the single pass methodology of the rendered used in order to limit the number of instructions required), and the end result is an audio/visual experience in HD that made quite a massive avi file, yes...

  • Re:Meh (Score:2, Interesting)

    by slackito ( 985667 ) on Monday July 20, 2009 @05:47PM (#28762555) Homepage

    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.

  • by fractoid ( 1076465 ) on Monday July 20, 2009 @11:28PM (#28765561) Homepage
    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. ;)

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...