Live data from Hacker News

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

labs.codecomputerlove.com

121–129 of 129 posts

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

#121
post #12

Interesting problem of tuning both sides speed. Here (small Atom netbook hooked to big screen) the ball moves noticeably faster on the Flash side. To the point of making me lose a Pong match with myself.

The html5 side has a nice smooth movement for me. The flash is more jerky, and changes speed. This is on Chromium 9.

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

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

It just makes it a bit of a random comparison, if changing one unneeded setting changes who "wins".

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

#123

In contrast to other commenters, the html5 side runs super-smooth and the flash is noticeably jerky. I'm running a 2008 iMac.

In contrast? Everyone has said the flash is not smooth and html5 is.

Everyone on a Mac has said that.

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

#124
post #72
post #42

Earlier quoted context omitted.

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.

Flash defaults to "non-web-friendly" (windowed) flags by default, HTML5 defaults to "web-friendly" flags. As a commenter said, you can also make the canvas tag opaque by using a special browser-specific style.

If you remove the windowless flag from Flash, you would have to add the opaque flag to HTML5 to make it a fair comparison.

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

#125
post #42

Earlier quoted context omitted.

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

Could you clarify this comment? I'm unsure what HTML5 does out of the box, and what flags you're referring to. Thanks!

HTML5 allows you to position elements on top of the drawing canvas and use a transparent canvas so the background of the page would show through the drawing. Flash does not, unless you add wmode=transparent to the parameters.

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

#126

Earlier quoted context omitted.

I develop with flash regularly on my Linux machine (Ubuntu 10.something), and it's definitely a bear compared to windows. I'll be happy for the day I can walk away from flash, but it makes computationally intensive consumer applications much easier/feasible. When we started out project almost three years ago, it was such a clear winner over JS, but now it's becoming a wash.

64-bit Linux is even worse, as it has to go through a 32-bit adapter to work in 64-bit Firefox. Video is unwatchable for me on a Core i7 with a fast video card.

Yeah, I use a 32 bit compiled version of firefox called swiftfox for all my flash debugging/testing. Definitely slow as heck, but, faster than using the wrapper/adapter method.

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

#127

Earlier quoted context omitted.

64-bit Linux is even worse, as it has to go through a 32-bit adapter to work in 64-bit Firefox. Video is unwatchable for me on a Core i7 with a fast video card.

Yeah, I use a 32 bit compiled version of firefox called swiftfox for all my flash debugging/testing. Definitely slow as heck, but, faster than using the wrapper/adapter method.

[deleted]

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

#128
post #44

Earlier quoted context omitted.

Yeah in the old days it performed quite bad. Nowadays with the newer distro's like suse 11, (k)ubuntu and a couple of others I really havent found any more glitches than on any regular windows machine running flash..

I develop with flash regularly on my Linux machine (Ubuntu 10.something), and it's definitely a bear compared to windows. I'll be happy for the day I can walk away from flash, but it makes computationally intensive consumer applications much easier/feasible. When we started out project almost three years ago, it was such a clear winner over JS, but now it's becoming a wash.

I code Flash too, on 2.26 Ghz laptop running 4gb and multiple distro's, no real problems here..

A lot of us Flash coders actually want to drop Flash from our websites, widgets and resumes. It performs bad and puts a lot of stress on the CPU, blocking my vital programs from running.

I also dont like Flash because Flex Builder is not a free tool and because of all the security issues in Flash that Adobe just never seems to get fixed. http://www.adobe.com/support/security/bulletins/apsb07-20.ht....

Potentially leaving my computer including webcam feed and microphone wide open to anyone having an exploit before I update. http://blog.guya.net/2008/10/07/malicious-camera-spying-usin....

However, I think Flash (or read Actionscript 3.0) is a necessary evil to be able to do what you want to do.. fast and to a mass audience, see this table for statistics http://www.adobe.com/products/player_census/flashplayer/vers....

I've been coding Actionscript for some time now, but only started really liking it when 3.0 came out. I remember when the Papervision project became popular I loved coding Actionscript.... I still do and I dont think JS has the right properties to become anything close to Flash.

Adobe really is on the right way by including hardware accelerated graphics. http://www.tgdaily.com/software-features/38273-adobe-flash-p....

I hope they improve upon this a bit though..

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

#129
post #101
post #95

Earlier quoted context omitted.

There are no keys that will work for everyone. I use Colemak -- the A and Z keys are in the same spot as Qwerty, but K is where N is on Qwerty, so that's a difference. Throw in Dvorak, and you only have A and M in the same place on those three. A "right" answer is to make the keys remappable.

Arrow keys work for (almost) everyone.

I find arrow keys quite inconvenient on my happy hacking pro keyboard, which I would imagine to be a popular choice around here.
Post reply on HN