Live data from Hacker News

Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

labs.codecomputerlove.com

111–120 of 129 posts

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#114

Earlier quoted context omitted.

Core i7 920 on Chrome 9 (canary). Both sides are equally fast, but there's a visible stutter when the ball's moving quickly.

Oh man, Chrome shipped 8 versions already? They've achieved version-number-parity with IE! :)

Chrome has four different versions at any one time. Stable, beta, development, and canary. Canary is essentially a nightly build, and is buggier than a very buggy thing indeed, as you might reasonably expect.

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#115
post #39
post #11

Make sure you've excluded the URL from Vimium/Vimperator before playing!

I've sought high and low for a way to do this on Vimperator, but I can't for the life of me figure it out. Forgive me for asking, but how do you exclude urls in it?

Check out the Automatic Commands section under help. Here's an example from that page.

    Enable passthrough mode on all Google sites:

        :autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL)
Or you can just press Ctrl-Z once your in the page, to temporarily go to pass-through mode.

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#116
Can't tell the difference on a MacMini2,1 w/ Safari 5.latest – both sides jerk a bit sometimes, but are mostly smooth-looking. Maybe if I blew it up to full-screen it would show a noticeable difference.

Reminded me of a BeOS demo, where windows would send each other messages about own position and the ball's physics.

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#117
post #74
post #59

Gah. People please stop using Z as the default key for down (or whatever). If you can't detect my keyboard layout use keys that are the same on every keyboard, no matter the language, or provide an option to configure the keys. My Z (on a Slovenian keyboard) is where your Y is (on your English keyboard). This makes the game unplayable for me, since my "down" key is above my "up" key, which makes it almost impossible…

You have asked an important question: how do you detect the keyboard layout (in Javascript) when using KeyUp/KeyDown events? A regular press event will provide the charCode but the press/release versions do not.

Quite interesting. I suppose you could ask the user to press "z" and see which KeyUp event fires.

Would love to hear a more elegant solution.

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#118
post #45

Running Gentoo with Firefox 3.6.9 on a Core i7, HTML 5 is much more noticeably laggy while Flash (10.2.161.23) is perfectly smooth. In Chrome they're more or less equivalent. (Firefox's sluggishness could have something to do with many Firefox addons and having over 100 tabs open.)

Where exactly are you getting Flash Player 10.2.161.23? Pretty sure latest release is 10.1.x.

From Gentoo's ebuild:

MY_64B_URI="http://download.macromedia.com/pub/labs/flashplayer10/flashp...

and hence:

http://download.macromedia.com/pub/labs/flashplayer10/flashp...

Edit: I do know that "Square" isn't an official release, it's a preview, but boy is it great. 64-bit support on Linux, hooray! 32-bit with nspluginwrapper is a pile of crap and would consistently crash, also taking out Firefox before they abstracted out the plugins from the browser. Secondly given Flash Player is insecure by default, it's probably better to be using the bleeding edge release over the current stable since it's less likely to be targeted.

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#119
post #59

Gah. People please stop using Z as the default key for down (or whatever). If you can't detect my keyboard layout use keys that are the same on every keyboard, no matter the language, or provide an option to configure the keys. My Z (on a Slovenian keyboard) is where your Y is (on your English keyboard). This makes the game unplayable for me, since my "down" key is above my "up" key, which makes it almost impossible…

I always install a us keyboard configuration as well in addition to my french keyboard for those kinds of issues. There is no need for two keyboard. Then you can just switch by pressing ctrl-shift simultaneously on windows.

Re: Pong written in both flash and HTML5. Left side is flash, right side is HTML5.

#120

This is depressing. It's 2010, and our computers have issues rendering Pong .

Only because we keep trying to reinvent it using an increasingly esoteric, inefficient (from hardware's POV, if not a human's), high-level, abstract method, using newborn tools rather than proven ones.
Post reply on HN