6 ms·
HTML Kong
- gus_massa 10y agoI 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.)
- adamredwoods 10y agoLove it! But yes, needs keyboard support.
- jasonkostempski 10y agoI was just reminded these ever existed 9 hours ago by Crash Course Games: https://youtu.be/ZEwbHWspFWY?t=2m35s https://youtu.be/ZEwbHWspFWY?t=2m35s
- oneeyedpigeon 10y agoYeah, the flash version they link too has keyboard support and is much more playable for it!
- j4_james 10y agoBear 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/ http://pica-pic.com/
- paulirish 10y agoThe game logic is held within the CSS, which has a rather beautiful obfuscation/formatting applied: http://kong.xn--8ws00zhy3a.com/kong.css http://kong.xn--8ws00zhy3a.com/kong.css
- octref 10y agoAny idea how to do it?
- nitwit005 10y agoRemove all the whitespace, and then add spaces and newlines in legal positions to make the wave pattern. Edit: It also seems to add escapes to the text to make it a bit neater than what I suggested.
- deleted 10y ago[deleted]
- asadlionpk 10y agoI want to know this too. Must be some grunt/gulp script.
- j4_james 10y agoAuthor 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.
- huphtur 10y agoCheck out what happens if you disable the CSS. In Firefox: Tools / Web Developer / Style Editor / Toggle style sheet visibility (the little eye icon).
- amelius 10y agoIt makes transferring the CSS less efficient, so probably not to be recommended.
- bobajeff 10y agoIt works on my phone (in Chrome for Android) too!
- SalimoS 10y agoThat's weird, not working on my iPad (using safari and chrome)
- dzhiurgis 10y agoDoesn't work on latest Safari. I'm sad how hopeless it become...
- LeoPanthera 10y agoHuh? Safari is the only browser I ever use. Apart from these super-experimental sites that occasionally show up on HN, the entire web works just fine.
- dzhiurgis 10y agoSuper experimental means features that Chrome, Firefox AND Edge supported for years?
- LeoPanthera 10y agoI'm not a web developer, I don't know the details, I only know that when I'm browsing normal regular web pages, Safari is awesome and seems to use far less power than any other browser.
- twsted 10y agoNot supporting Safari is just laziness most of the time.
- vaags 10y agoSafari is the new IE.
- gbog 10y agoSide note for hn devs, this url is in Chinese characters but appears as garbage in hn site.
- steveklabnik 10y agoSee https://en.wikipedia.org/wiki/Punycode https://en.wikipedia.org/wiki/Punycode and https://en.wikipedia.org/wiki/Internationalized_domain_name#ASCII_spoofing_concerns https://en.wikipedia.org/wiki/Internationalized_domain_name#...
- oneeyedpigeon 10y agoThat 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.
- steveklabnik 10y agoI can only speak to the parts I know about.
- WorldMaker 10y agoI 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.
- goodplay 10y agoI also believe that a something better than the status quo is possible. Perhaps render the URL correctly then display the obfuscated URL beside it in between parentheses. International domain names will never be used if browser and website support remains as horrible as it currently is.
- meowface 10y agoSadly, that's just the RFC at work.
- deleted 10y ago[deleted]
- eriknstr 10y agoAt first I thought it didn't work for me neither in Firefox 49.0 nor Chromium 51.0 on Fedora 23. One has to first press one of the "GAME A" or "GAME B" buttons, and then press the "JUMP" button.
- vanderZwan 10y agoRelated: Horrible PDF experiments (play breakout in a PDF document) https://github.com/osnr/horrifying-pdf-experiments https://github.com/osnr/horrifying-pdf-experiments