
Bouncing Beholder: JS1k winner explained - sant0sk1
http://marijn.haverbeke.nl/js1k.html
======
glhaynes
_At the start of the program there is a for/in loop that goes over the
properties of the canvas context, and adds a new property, with a shorter
name, for each of them. It took some experimenting to find an abbreviation
algorithm that doesn't have clashes on any of the methods we use---I ended up
using the first letter of the name plus the the 7th letter, if any. So lineTo
becomes l, and quadraticCurveTo becomes qt. I can then use these short names
to actually access the methods---without ever having written out the full
name._

Clever.

------
Groxx
Not a bad choice, methinks. That's an _amazingly_ polished experience for
sub-1k. I do wonder if some of the arguably-better submissions were excluded
for bugs, though I think I'd do the same in a competition. Readily-apparent
bug = disqualified.

~~~
dschobel
The chess entry doesn't support a fundamental game move (castling). I'd
consider that a bug but last time someone pointed that out they got blasted on
HN.

Anyway, it's a remarkable chess-like game.

------
user24
The top three: <http://twitter.com/z0va/status/25525821627>

------
djhworld
I'm struggling to understand how the hell this is done. Is the whole thing
generated in code (as in the imagery/graphics) or are they external elements
that are loaded into the application and manipulated in the code?

~~~
cubicle67
everything is generated in code. this is what makes it so hard

------
binomial
I can't help but say that I think that there were more deserving demos, in
terms of how impressive/fun they were compared to the winner, though I'm glad
to see the chess one up there. Not to knock the winner though, it's also a
good demo and probably won because of better cross-browser compatibility or
something.

~~~
jpwagner
Did you read the explanation? I thought the context method abbreviations was
brilliant.

The chess one got second place. I like it too, but it was not really a
"playable" game, more a demo of some cool hacks.

I DID however find it interesting that none of the top three were the
visualization demos which seemed to make up a majority of the entries.

