
Winning 1kb intro released at Assembly 2015 - joeyspn
http://www.p01.org/releases/BLCK4777/BLCK4777_safe.htm
======
bane
Anybody interested in a well written history of the scene that really helps
explain it as a cultural phenomenon should probably read the demoscene chapter
in "The Future Was Here", a book about the Amiga. It's probably one of the
best written synopsis of the scene I've ever read and really places it well as
both a technical and artistic movement and helps provide context for this kind
of work.

~~~
chengsun
Also, a fantastic visual guide is the documentary film "Moleman 2" (2011).
It's freely available to watch on YouTube; highly recommended:
[https://www.youtube.com/watch?v=iRkZcTg1JWU](https://www.youtube.com/watch?v=iRkZcTg1JWU)

------
adam12
Here is the UNPACKED source.

function u() { requestAnimationFrame(u);

    
    
        for (g = p ? B.currentTime * 60 : (B = 'RIFFdataWAVEfmt ' + atob('EAAAAAEAAQAAeAAAAHgAAAEACAA') + 'data', b.style.background = 'radial-gradient(circle,#345,#000)', b.style.position = 'fixed', b.style.height = b.style.width = '100%', b.height = 720, h = b.style.left = b.style.top = A = f = C = 0, 6177); g > f; h *= f % 1 ? 1 : .995)
            for (s = Math.pow(Math.min(f / 5457, 1), 87) + Math.pow(1 - Math.min(f / 5457, 1), 8), f == [b.width = 1280, 1599, 2175, 2469, 2777, 3183, 3369, 3995, 4199, 4470, 4777, 5120][C] && (C++, h = 640), f += p ? (c.translate(640, 360 + h / 45 * Math.random()), c.rotate(A / 5457 - h / 5457), c.scale(1 + s * 8, 1 + s * 8), 1) : (B += T((1 + s * 8) * Math.random() + (1 - s) * (h / 45 * (f * (2 + C / 3 % 1) & 1) + (C > 3) * 8 * (f * (2 + (f / 8 & 3)) % 1)) | 1), 1 / 512), i = p.length; i;) y = p[i -= 7], x = p[i ^= 1], r = p[i + 4], l = p[i + 6], s = 2 * Math.random() + 1, t = s * 4, a = 122, 640 > r ? (640 > Math.abs(p[i ^= 1] += p[i + 2]) || (p[i + 2] *= -1), 640 > Math.abs(p[i ^= 1] += p[i + 2]) || (p[i + 2] *= -1), t = Math.random() > p[i + 7] || p[i + 7] == '22312131212313' [C] & h == 640, w = x - A, p[i + 2] || r * r / 3 > w * w && (t = s * (r - Math.abs(w)) / 45 + 2, a = 2 * Math.random() + 5, p.push(A, 0, s * Math.sin(a += 599), s * Math.sin(a - 11), s * t, C + s, 640, .995), s = 2 * Math.random() + 1, a = 2 * Math.random() + 5, p.push(A, 0, s * Math.sin(a += 599), s * Math.sin(a - 11), s * t, C + s, 640, .995), s = 2 * Math.random() + 1, a = 2 * Math.random() + 2, p.push(A, 0, s * Math.sin(a += 599), s * Math.sin(a - 11), s * t, C + s, 640, .995)), a = p[i + 2] * y / 45, l = p[i + 6] = t ? 640 : .9 * l, t = r) : A = p[i] ++, g > f || (s = r, c.beginPath(), c.lineTo(x + s * Math.sin(a += 599), y - s * Math.sin(a - 11)), s = t, c.lineTo(x + s * Math.sin(a += 599), y - s * Math.sin(a - 11)), c.lineTo(x + s * Math.sin(a += 599), y - s * Math.sin(a - 11)), c.shadowBlur = r, s = l, x = s * 2, a = p[i + 5], c.shadowColor = c.fillStyle = 'rgb(' + [x + s * Math.sin(a += 599) | 1, x + s * Math.sin(a += 599) | 1, x + s * Math.sin(a += 599) | 1] + ')', c.fill());
        p ? c.fillText('BLCK4777', 90, 99) : (B = new Audio('data:Audio/WAV;base64,' + btoa(B))).play(p = [f = C = 0, 0, 0, 0, 180, 2, 0, 1, -360, 0, 0, 0, 99, 1, 0, 2, 360, 0, 0, 0, 99, 1, 0, 3, -2880, 0, 0, 0, 1280, 0, 1280, 0])
    

};

~~~
paulirish
A bit prettier:
[https://gist.github.com/paulirish/21326986569181e47f21](https://gist.github.com/paulirish/21326986569181e47f21)

------
segmondy
And today, I was reading that facebook's mobile messenger has 18000 classes,
and is about a 100mb, this doesn't take into account other dependencies it has
on the OS. These demos are 100% standalone, no external libraries. Progress is
a funny thing.

~~~
mrich
This is a Javascript demo. So let's not discount the browser, Javascript
engine, JIT, 3d acceleration libs, sound libs, and everything used from the OS
that is involved here. Still it is a great effort.

Your argument fits better to a machine like the C64, where demos are really
going directly to the hardware and the OS is basically inactive.

~~~
Dylan16807
Well most of the things you named are inactive. It's using a very tiny bit of
external 3d code, and external decompression, but almost everything else out
of browser, javascript, libs, and OS is passthrough. The javascript engine
exists but does not serve to make it smaller; the code is simple loops and
subroutines that would probably be better as native code.

------
myth_drannon
the 4kb winner is also amazing

[http://archive.assembly.org/2015/4k-intro/hydrokinetics-
by-p...](http://archive.assembly.org/2015/4k-intro/hydrokinetics-by-
prismbeings)

------
justin_
Here's a 256b web compo from 2002 (!)
[http://wildmag.de/compo/](http://wildmag.de/compo/)

A lot of the stuff looks almost trivial compared to what we do today. (And
unfortunately a lot of these won't work anymore)

------
mrspeaker
p01 does so much good stuff
([http://www.p01.org/releases/](http://www.p01.org/releases/)) - the fact that
he won Assembly 2015 with a JavaScript demo is testament to his skills!

------
gfody
other results:
[http://archive.assembly.org/2015](http://archive.assembly.org/2015)

------
kornakiewicz
For Polish-speaking guys: Ha!art published a magazine about scene with some of
good articles:

[http://www.ha.art.pl/czasopismo/numery-czasopisma/4054-ha-
ar...](http://www.ha.art.pl/czasopismo/numery-czasopisma/4054-ha-
art-47-3-2014)

------
X-Istence
This is one of my favourite demoscene's:
[https://www.youtube.com/watch?v=auagm5UBTwY](https://www.youtube.com/watch?v=auagm5UBTwY)

~~~
skrebbel
Nitpick: the demoscene is a community. You linked to one of your favourite
demos.

(and insiders wouldn't call it a demo but an intro because it's small, and
_obviously_ the word "intro" signals something about file size)

------
btzll
I wonder if the bad performance is due to the <1kb requirement.

~~~
Ellipsis753
Almost certainly. It would be tempting just to pre-render this to an HD video
otherwise.

~~~
sp332
In case you missed the link on the page, there's a 1080p version on YouTube
[https://www.youtube.com/watch?v=NnZUUSdpt-k](https://www.youtube.com/watch?v=NnZUUSdpt-k)

~~~
hebdo
The point was that it is probably much less CPU intensive to decode such a
stream in 1080p than to render it from a compressed 1k of Javascript.

~~~
taeric
Not sure the point of the comparison. Yes, some of our encoding technology
beats some algorithmic generation of content in performance. If the goal is
size of encoding, though, it doesn't come close.

Tricks like this can help show how less than a gig of data is enough to encode
an operating system. Or a person.

~~~
piAcceptor
I really hope you are right about encoding a person in less than a gig, but
what about the associated genome (3000 megabases), episodic memories and/or
neuron connectivity?! Surely this is data that would be essential, yet very
hard to algorithmically encode?

~~~
taeric
I don't know enough to weigh in on if a person is just a gig. I'm just going
off of this[1] presentation.

[1] [http://www.infoq.com/presentations/We-Really-Dont-Know-
How-T...](http://www.infoq.com/presentations/We-Really-Dont-Know-How-To-
Compute)

------
tantalor
Why "intro"? As if "demo" wasn't confusing enough.

~~~
Mithaldu
The demoscene started out of the software piracy scene. An intro was a short
thing like this one, that people put into the boot sequence of games they
cracked or otherwise made available to the scene. Over time these got more
elaborate and people started making them separate from the games to show off
their prowess in coding, called demos. Nowadays the names serve to
differentiate the runtime length and size of the program. Intro = short thing,
demo = long full effort thing.

~~~
skrebbel
> Intro = short thing, demo = long full effort thing.

The problem is that that's not true anymore either. Many intros are equally
"long full effort" as your average demo. Intro simply means "demo with a size
limit", these days (and by "these days" i mean "the last 15 years")

------
alt_
Cute, but doesn't really compare to non-js stuff:
[https://www.youtube.com/watch?v=qQNIKOD6WnY](https://www.youtube.com/watch?v=qQNIKOD6WnY)

~~~
mrspeaker
Ha, I love that you are so condescending about what he made, and one of the
first comments on the video you linked to was "Yawn. We did better in 256 byte
microcode strings in 1986."

~~~
JeremyBanks
I didn't read it as condescension, but observation: old demos were able to
take advantage of a lot that's not available to JavaScript.

~~~
Someone
But isn't the whole challenge of a demo to make the most of limited resources?

------
clippit
How to unpack the compressed html file? I see a lot of binaries in there
starts with "PNG".

------
aikah
crashed my browser(chrome latest,win 8.1) but there is a video capture linked
.

~~~
LeoPanthera
Works fine in Safari 8.0.8, OS X 10.10.5

------
cloudsloth
Stunning.

------
rtpg
how does one even begin to figure out the techniques used to write intros or
demos like this?

~~~
z303
Read up on Computer graphics. this EdX course looks a decent starting point

[https://www.edx.org/course/computer-graphics-uc-san-
diegox-c...](https://www.edx.org/course/computer-graphics-uc-san-diegox-
cse167x)

------
rational_indian
So Javascript is now Assembly?

~~~
skrebbel
No, Assembly is an annual demoparty in Finland.

------
replete
iTerm is also pretty great, because you can split terminal tabs into panes and
there are some new neat features allowing you to click on filename strings etc
in Finder!

~~~
snikch
I think you meant to comment on
[https://news.ycombinator.com/item?id=10069521](https://news.ycombinator.com/item?id=10069521)

