Live data from Hacker News

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

labs.codecomputerlove.com

31–40 of 129 posts

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

#31

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.

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

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

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

#33

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

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

#34
post #11

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

Why is this?

I assume because these plugins use unshifted letter keys to control browsing, but pong wants to see these keys.

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

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

Why so somber? You also won the match! ;)

No. I won the match. He lost.

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

#37

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.

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

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

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

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

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

#40

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.

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

Post reply on HN