Live data from Hacker News

HTML Kong

xn--8ws00zhy3a.com

31–34 of 34 posts

Re: HTML Kong

#32

Earlier quoted context omitted.

See https://en.wikipedia.org/wiki/Punycode and https://en.wikipedia.org/wiki/Internationalized_domain_name#...

That explains that it's not 'garbage' but it doesn't explain why hn isn't doing something a bit nicer than hosing the Unicode version. As another commenter pointed out, even just displaying both would probably be an improvement.

I get the feeling HN needs something of a rewrite for better Unicode support in general, based solely on the ways I've seen it strip Unicode from comments.

Re: HTML Kong

#33
post #5

The game logic is held within the CSS, which has a rather beautiful obfuscation/formatting applied: http://kong.xn--8ws00zhy3a.com/kong.css

Any idea how to do it?

Author here. It was done with a Python script that parses the CSS into a stream of characters annotated with metadata saying whether the character is allowed to be escaped and whether whitespace can be inserted before or after it. It's then just a matter of breaking up the stream where whitespace is permitted and using the escaping to pad segments to the exact size required.

Definitely not recommended in production. Other than the obvious inefficiency, it was only supported in Chrome fairly recently (even though the CSS escaping rules have remained largely unchanged for 20 years or so). In this case, though, the game itself depended on recent bug fixes in Chrome, so there wasn't much point in worrying about compatibility with older versions.

Re: HTML Kong

#34

I think I played this IRL. It would be nice to be able to use the keyboard to play, clicking the screen with the mouse is too difficult (I don't have a touchscreen.)

Bear in mind that the whole point of this exercise was to produce a game without using any JavaScript whatsoever. It was intended to be more of a technology demonstration than a playable game. As the article pointed out, you can find a much more accurate and playable implementation of the game on the Pica Pic website. http://pica-pic.com/
Post reply on HN