Live data from Hacker News

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

labs.codecomputerlove.com

71–80 of 129 posts

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

#72
post #42
post #38

The Flash side was unexpectedly slow, and comments on this same article on Reddit indicate that it is because they are doing a lot of JavaScript-to-Flash communication, which is unusual for a game, as well as enabling "wmode=transparent", which allows DOM elements to be positioned on top of Flash content, slows down Flash content, and is apparently unnecessary for this page.

HTML5 does all of that out of the box without any flags, so it's a fair comparison.

Not when they are not needed, which is about 99% of the time. When I think "Flash", I think games, video and cool experiments with shining particles.

None of that requires those flags, so I think forcing those is not fair.

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

#73
post #38

The Flash side was unexpectedly slow, and comments on this same article on Reddit indicate that it is because they are doing a lot of JavaScript-to-Flash communication, which is unusual for a game, as well as enabling "wmode=transparent", which allows DOM elements to be positioned on top of Flash content, slows down Flash content, and is apparently unnecessary for this page.

I was wondering why the ball appeared clipped on the flash side, even though I can't remember having seen this problem in a flash game before. It was also unusually slow. That old 3D first-per-view demo with textures had a clearer image and was faster.

I call it unfair.

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

#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.

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

#75
post #50
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.)

are you sure its the flash that is smooth? I got have the same firefox on osx, and flash is laggy compared to the smooth js version. Flash is left, remember?

Quite sure.

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

#76
post #50
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.)

are you sure its the flash that is smooth? I got have the same firefox on osx, and flash is laggy compared to the smooth js version. Flash is left, remember?

"on osx"

lol i have the same situation

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

#78
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.

You could ask if the user wants to use the standard, or custom and then capture the keycodes for up/down etc.

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

#79
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…

Or just buy a US layout keyboard and use that! It's much better for coding anyway (especially for ObjC and its square brackts - these things aren't even labled on most international keyboards). Also it allows for much faster zergling production!
Post reply on HN