128 comments

[ 3.5 ms ] story [ 151 ms ] thread
awesome! flash ball speed is slower by the way... and keeps losing :)
On my system here at work(Dell Core2Duo Xeon, 8GB win7x64), the "HTML5" side was slightly less glitchy, and the flash sides graphics were more antialiased...
(comment deleted)
Really cool. On my system the flash is way faster than the HTML5
Besides a few glitches in the html5 side it looks pretty much the same. I would love to see the FPS count though
I am pretty sure that the Flash side could be better. I've seen lots of flash games that run smoothly.
Very cool, but HTML5 side barely working at all for me in Chrome on OS X.
Three generations old MBP with Chrome 7, everything is okay, both sides seem to be equally smooth.
HTML5 way smoother for me with Chrome unstable on Ubuntu.
IBM thinkpad T61, 2GB ram, running firefox 3.6.8 for Ubuntu 9.10 (yeah yeah, I know), and Flash 10,1,82,76 .

Ball is nice and smooth on HTML5 side, and kind of jerky on flash side. That could just be Linux+flash issues, but the animation for HTML5 is super-smooth, so I'm guessing it's just bad flash plugin.

Flash on linux sucks quite a bit unfortunately :(
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.
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.
(comment deleted)
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..

Same here, Chrome 7 on OS X.
windows 7 and chrome with the same results. there is noticeable jerkiness as well as the ball flickering
It looks like a non-standard key mapping, like dvorak, causes schizophrenic confusion.
Make sure you've excluded the URL from Vimium/Vimperator before playing!
Heh, just noticed that myself.
Why is this?
I assume because these plugins use unshifted letter keys to control browsing, but pong wants to see these keys.
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.
Actually you don't need to do so - at least in Vimperator you can enter 'pass through mode' by pressing ctrl-z. This disables vimperator keys and allows you to interact with sites in 'normal way'.
On Vimium I just hit 'i' to go into insert mode.
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.
Why so somber? You also won the match! ;)
No. I won the match. He lost.
Firefox on windows 7 - both are smooth but html5 slightly more so.
1.6GHz MacBook Air (late 2010): After an initial stutter on the HTML5 side (where the ball was served), both sides perform equally to my eyes.
Perhaps you're better at controlling the {A,Z} keys with your left hand than you are at controlling {K,M} with your left?
Pre-Atom Eee 900, Linux, Chrome 6, the Flash side is almost unplayably sluggish, while the HTML5 side zips along.
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! :)
No, stable is still version 7.
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.
1005PE here (ie. also an Aton netbook). Flash side stutters for me, while HTML5 is smooth.
The html5 side has a nice smooth movement for me. The flash is more jerky, and changes speed. This is on Chromium 9.
Site down?
my bad.. couple of reloads and it connected.
Windows 7 x64, Chrome, Flash is jerky, glitchy and ugly, HTML5 is smooth and nice.
People keep saying things like this. Seriously: If a flash pong game is messed up, it's the programmer's fault.
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.
At the time of writing the comments seemed to be leaning towards flash performing better.
Not everyone.

Plus who knows how each side was coded. I make games for a living and more times than not, jerkiness/glitches are an indication of bad programming than the platform it was written in. Pong is an ultra-simple game but you'd be surprised even on a game as basic as that the issues that can crop up that require elegant coding. Collision in particular -- the simplest, most obvious way in pong to check when the ball collides is to check the intersection of a point and a line, or a point and polygon/rectangle, the point being the edge of the ball (top/bottom of it for the walls, left/right of it for the paddles) versus the edge of the paddle or the whole paddle. More precise, but more math used and thus a less common way of writing the game, is to check the intersection of a circle and a line segment/polygon.

For example in flash, there are some built-in methods that everyone tends to use but don't get "pixel perfect collision" -- if you google that phrase you can see where people have tried to come up with perfect collision and how complicated all the math is for it.

I know for a fact just from playing this flash/html5 pong that it wasn't coded perfectly because it glitches when the ball gets to too high of a speed, either getting stuck in the wall and bouncing along it but not away from it, or going right through the paddle.

So this is really apples and oranges, unless both halves were coded with the exact same algorithms for everything (and just different syntax for the languages) -- very unlikely -- and, as evidenced by the other commenters also completely dependent on the environment/browser implementations of html5 and the flash plugins.

However, way cool on the link-bait worthiness :) I shoulda thought of this =P

Everyone on a Mac has said that.
While I'm seeing better perf on the flash side (XP, FF 3.6.12), Pong isn't exactly an ideal test bed.

Interesting that on the page they say "We believe the two technologies are not in competition" but that is exactly what this type of demo is going to stir up. While the improvements in browsers and javascript engines as of late has been nice, I think we're still a few years off from real parity, especially on lower-spec'd machines. Make no mistake, Flash on the web will be obsoleted by HTML5. But not yet, especially for all those people who don't update their browser every month.

For the time being, if Flash evangelists really wanted to make a point, they should do this same type of set up, but with a complicated (hardware-accelerated?) visualization.

HTML5 will eventually achieve comparable functionality and more importantly, business models may emerge (flash gaming is an industry after all) given time that make it a viable alternative to the people making games. At some point it'll almost certainly coexist alongside Flash games on sites like Armor, Kongregate etc. But it's not going to kill Flash.

HTML5's real fight is against native mobile platforms where it's competing against much richer platforms than Flash and more importantly business models that revolve around a mountain of cold hard cash people throw like confetti at the games they like.

If all it does is coexist or even entertaining the fantasy where it 'kills' Flash its lost, Flash is just the tip of casual gaming. Solipskier made $70,000 in the first 2 months of their iOS version ... against $16,000 on the Flash version (and that's more than most Flash games make).

Safari 5 on OS X: HTML5 smooth, Flash sluggish. (Does the "known performance issue" on Safari 5 affect the Flash side?)

Anyway, as the author suggests, this kind of test has merely entertainment value. While 95% of Flash could be replaced by HTML5, Flash still has its place on Games.

Running on Firefox 3.6 on a Mac, both sides were very similar speeds. Didn't really see a change at all. Good concept and great execution.
MacBook Pro 15" with Firefox 3.6, but I noticed jerkiness on Flash, HTML was definitely smoother
Win7 x64, Opera 10.6: Flash is very jerky and HTML5 is soft and silky smooth. Interesting to see that others are seeing the opposite.
It's actually quite consistent when I use Firefox. There's a little bit of jerkiness on both sides.
My experience (Chrome on Linux) was smooth in both technologies (apart from a collision detection bug on the canvas side). Really neat demo though - when they're synced, it's weird to be aware that there's a sort of slight of hand happening with the ball as it crosses the center line.
CPU was pegged. I'll blame the flash side.
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.
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.
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.

You can set the moz-opaque boolean attribute on canvii in Firefox to disable it.
It just makes it a bit of a random comparison, if changing one unneeded setting changes who "wins".
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.

I'd love to see the Flash source. It flags for me, but I don't think it should have to.
At one point the ball was going so fast I couldn't see it.
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.
"on osx"

lol i have the same situation

Chromium on ubuntu 10.04 -- flash stutters on the left-hand side, canvas smooth.

Of course, flash on chromium on ubuntu isn't what Adobe is optimizing for ... but that's just another reason to hope that canvas continues to do well.

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.

MacOSX on a 2.16GHz Dual2Core Macbook with Chrome: HTML5 is really fluent here while Flash seems somehow laggy (I would guess 20 FPS or less).

I think I also found a bug in the Flash version. The ball got stuck somehow at the top bar.

Same experience here. Cool concept, wonder how it matches up to silverlight?