So, I am here at assembly 2011 and there was this demo played: http://www.youtube.com/watch?v=69Xjc7eklxE&feature=player_embedded
It's one single file only, it says that in the rules. So I repeat, how have they made this to fit into so small file?
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.
Sign up to join this communitySo, I am here at assembly 2011 and there was this demo played: http://www.youtube.com/watch?v=69Xjc7eklxE&feature=player_embedded
It's one single file only, it says that in the rules. So I repeat, how have they made this to fit into so small file?
It's procedural based. The content is not included in the exe, only the rules of how to draw it. When launched, the program draws what it needs to at runtime it's not pre-rendered or pre-saved in any form.
This is the same method used by Elite to create a vast universe of star systems, etc.
It's pretty amazing what is possible today using procedural generation, i think games will feature more of this in the future.
As @Gary Willoughby says, it extensively procedural.
Also, there is significant hand asm
coding involved, along with extensive knowledge of how many of the windows/platform of choice systems work internally.
There is also a 4K demo category, if you want to see even more extreme examples of compact code.
Some of the DemoScene groups release their demos online, where you can download them and play them if you want.
Also See Wikipedia on the history of the DemoScene
Note - a lot of the demos will cause your antivirus to freak out. Basically it seems pretty much all demos use packed .exe files, and most of the demo groups roll their own packers. Unfortunately, because a lot of AV companies are lame, they generally claim that any packed binary executable is a virus of some sort.
Like everyone is saying they widely relies on procedural generated code, but there's even more about this demo in particular, if you pause and look at some details, lets see for example those walls: look that bricks and how light reflects on them. They look natural.
That's because they are using a lot of vertex shaders and fragment shaders to bring life to the generated content.
I spent some time trying to understand how they make such things, and feel amazed with every piece of code I grab from those demos.
BTW, when doing those demos they also use compression tools to squeeze even more. check this compilation process:
all:
nasm -f bin -o intro main.asm
nasm -f bin -o stub stub.asm
gzip -n --best intro
advdef -z -4 intro.gz
cat stub intro.gz > intro
chmod +x intro
rm intro.gz
rm stub
There is a PowerPoint presentation of how the rendering was done in this specific demo. This alone doesn't explain how everything fits into 64 kilobytes, but is the key for how the geometry was created in such a little space.
There is also lots of interesting read in his blog about his other demoscene productions.
As others have already stated, a lot of this relies on procedurally generated assets.
There is another element to it, which is compression. 4k and 64k demos use highly specialized executable compressors. The most famous of these are kkrunchy by farbrausch (for 64ks) and crinkler by TBC & Loonies (for 4ks). Moreover, modern demos make heavy use of shaders, which are plain text and thus get dramatically smaller after compression.
Now, as far as integration in video games is concerned, the main problem is that all this takes time. Generating procedural content takes time, and extracting the executable takes a huge amount of time. And people generally have more space on their hard drives than time to spend waiting for the game to load, so I don't think we will be seeing lots of this in widely available games anytime soon.