PaleHour Features



PHN Sites








Friends





PaleHour Twitters


PaleHour Flickrs


Flash vs. HTML5's Canvas
Apple's hard nosed stance against allowing Flash on the iPhone/iPodTouch/iPad has brought the Flash vs. HTML5 debate into the forefront. Many people have marked this the end of Flash as we know it. Adobe (for obvious reasons) thinks this is very shortsighted and I tend to agree.

Most people focus on the new <video> HTML5 tag as the nail in Flash's coffin. I think it's pretty obvious that those people do not recognize how much more Flash does than play YouTube videos. I use it for application development almost daily at work and I consider myself fairly fluent in its strengths and weaknesses.

The key part of HTML5 that competes with the application side of what Flash does is the <canvas> tag. It allows for javascript to manipulate a bitmap image of sorts. Interestingly enough, when something is running in a canvas you can right click and 'View Image' at any time and it will give you a screengrab of whatever was going on.

So, armed with my initial research into basic javascript/canvas programming, I set out to compare performance between it and Flash. I created two simple apps, one focused on bitmap manipulation and one focused on sprite manipulation. I then recreated these javascript/canvas scripts in Flash, making them as close to identical as possible. This was actually fairly easy given that Flash ActionScript 3 is based on javascript. Each script runs for 300 frames and then calculates the average framerate.

Armed with these tools, I then set out to examine the performance across different browsers. All of these tests were done on my MacBook Pro (2.33 GHz Core 2 Duo). The results are below.

Firefox 3.5.7
Bitmap Test (Flash) - 28 fps
Bitmap Test (HTML5) - 16 fps
Sprite Test (Flash) - 51 fps
Sprite Test (HTML5) - 18 fps

Chrome 4.0.249.49 (35163) beta
Bitmap Test (Flash) - 27 fps
Bitmap Test (HTML5) - 32 fps
Sprite Test (Flash) - 48 fps
Sprite Test (HTML5) - 38 fps

Safari 4.0.4 (6531.21.10)
Bitmap Test (Flash) - 24 fps
Bitmap Test (HTML5) - 23 fps
Sprite Test (Flash) - 44 fps
Sprite Test (HTML5) - 46 fps

If you would like to run the tests on your own setup, here are some links to them.

Bitmap Test (Flash)
Bitmap Test (HTML5)
Sprite Test (Flash)
Sprite Test (HTML5)

I found the results of these tests extremely interesting. Probably the most important conclusion to draw here is the drastic difference in javascript/HTML5 performance between Firefox and Chrome or Safari. As a developer, this is red flag number one. One thing that makes Flash development wonderful is that it is a stable platform across all browsers. Anyone who has coded a website before knows the pains involved with trying to make everything look the same across all browsers. The thought of having to worry about making a rich multimedia application perform the same in all browsers makes my stomach churn.

You'll notice that Flash is relatively constant across all platforms, except for a slight drop-off on Safari. The reason for that is an argument for another post. Apple claims it's because Adobe can't make a stable plug-in. Adobe claims it's because Apple won't give them the necessary API access to optimize it. I'll let you be the judge on who is more correct.

The results get more interesting as you look deeper though. Firstly, Flash eats HTML5's lunch on Firefox. There's no argument there. On Chrome, HTML5 is actually slightly more efficient when it comes to bitmap manipulation and slightly less efficient when it comes to sprite usage. On Safari, it's a dead heat in both categories.

To further the investigation I thought it was worth seeing just how fast javascript is at doing some basic math. I ran another test that does 250 thousand divisions per frame, just to see what would happen.

Firefox 3.5.7
Division Test (Flash) - 25 fps
Division Test (Javascript) - 14 fps

Chrome 4.0.249.49 (35163) beta
Division Test (Flash) - 23 fps
Division Test (Javascript) - 53 fps

Safari 4.0.4 (6531.21.10)
Division Test (Flash) - 25 fps
Division Test (Javascript) - 16 fps

Here are the links to those tests.

Division Test (Flash)
Division Test (Javascript)

These results intrigued me even more. As you can see, on a pure javascript level, Chrome blows the doors off of both Firefox and Safari. This lends even more proof to the red flag discussed earlier, that developers will not be able to count on their HTML5 based apps running at the same rate in different browsers. Even more disheartening is the fact that this is just javascript, which has been around for years. If some of the major browsers haven't spent the time improving their efficiency on this front yet, why should we expect them to any time soon?

Overall, I think these test prove two things:

1. The HTML5 method toward developing multimedia web applications has a lot of potential and Chrome can run them like a champ.

2. Flash isn't going anywhere.

Performance stability across platforms is one of the most sought after results for any web application. It is priority number one for developers and quality assurance testers alike. It's incredibly frustrating to have to run your application across over a dozen browser/operating system combinations while testing. While not perfect, Flash eliminates a significant portion of that frustration. Developers will not be flocking to HTML5 when they can use a cross-browser plugin with over 90% penetration.

While Flash may never run on the iPhone platform, it will stay in you desktop/laptop browsers for a long time. Don't forget, Internet video didn't make Flash popular. Flash made Internet video popular.
Topic(s): programming flash html5 canvas apple adobe
By Pale on February 11, 2010 at 2:11pm EST Add Comment


Some Things Need to be Saved
Every once in a while you see an image on the Internet that needs to be shared. I already did as much on Twitter, but then realized that this one also needs to be saved.

So there it is at the right. Considered a sympathy card for the Spurs, this image captures my feelings exactly.

It was originally posted and created at Planet Orange.




PS. Spurs suck!

PSS. Ginobili sucks even more!
Topic(s): basketball phoenix suns san antonio spurs sports nba
By Pale on December 16, 2009 at 1:13pm EST Add Comment


Why Nintendo Doesn't Get It (Regarding new DS Rumor)
A relatively bizarre rumor about Nintendo releasing a new DS has been swirling around the web over the past 24 hours. It's bizarre because the DSi is still a baby. In fact, the new features that the DSi brought to the table have barely been utilized to this point. What could they possibly add now?

Bigger screens of course! Do they realize this will actually make all of the games look worse? Without increasing both the resolution and horse power, this new DS will likely feel like a downgrade. Yes, that statement includes a pretty big assumption. It's a safe one though. Assuming this new DS rumor is true at all, it's safe to say that if it did feature a significant performance hike, Nintendo wouldn't be quietly sneaking it out without a proper E3 unveil.

The rumors have been referencing two reasons for this new system; to compete with the better screens on the iPhone and PSP and to make the system friendlier for older players. The first one is laughable. It's not going to compete with those screens. In fact, it's going to do just the opposite. It will emphasize the shortcomings of the DS screen even more. The reason people like those screens so much is because of their crispness and clarity. This has everything to do with the relative pixel size. The DS's pixels are already significantly larger than those of the iPhone. This rumored new unit will make that difference even greater! Check out the comparison image (bottom left). These images should be close to life size if your monitor is close to 72 DPI. Notice how the larger dimensions make the game feel more archaic?

This is the primary reason the Game Boy Micro is such a great device. It did the exact opposite. Shrinking the screen size makes the relative pixel size smaller, which improves the visual fidelity of the experience.

This all says nothing of the increased bulk this rumored device would require, which would take the DS farther away from another competitive advantage of the iPhone and PSP Go, that being the ease of carrying the device around in a pocket. Just look at what would have to happen if the same clam-shell design and button sizes were maintained. (Bottom center. "New" DS mock-up on left. DSi on right.)

Maybe this mystery machine is the true "DS2" and Nintendo is bucking tradition and going for a surprise launch. If that's the case and the four inch screen spec is true, they need to leave the vertical resolution and height alone and instead move to a wider format. This would allow for original DS games to run at the same DPI that the DSi does. Newer games could then take advantage of a larger screen without the ugliness inherent with larger pixels. Assuming a clam-shell design and equivalent button sizes, it could look something like the image below (bottom right). As you can see in that mock-up, the top screen acts as if it were playing an original DS game and the bottom screen acts as if it were playing a "DS2" game. Pixels are all relatively sized to give you a somewhat precise feeling for what it would look like.

Sadly, that mock-up is nothing more than a pipe dream at this point. As the astute reader may be thinking, it does not do anything to help older people see the screens better for original DS games.

I've purchased every DS iteration at this point because I've felt that each one brings worthwhile new features to the table. I will not be buying a system that makes all my games look uglier. The DS is eating the lunch of the PSP and iPhone as a gaming platform because of it's own competitive advantages. There is no reason to attack their screens unless it is done correctly.

Note: This entry was cross-posted over at NWR.

When viewing the enlarged images below, right click and pick "View Image" to see them at their native resolution.
Topic(s): games ds nintendo resolution
By Pale on October 27, 2009 at 11:18am EDT Add Comment


Playing Outdoors Causes Dangerous Behavior In Children
An interesting article caught my eye over on Jalopnik this morning. (Jalopnik is a blog for car fans.) It was an upsetting read as a 9-year-old child stole his parents' car and led police on an 80 mile per hour car chase. "Oh man, I bet they found some way to relate this to video games," I thought.

"...he got mad at his parents and stole their car after they made him quit playing..." is one of the first things the Jalopnik article says. They must be referring to video games! What's this? He was upset they told him to come in from playing outside?! How could this be? Video games cause evilness! The outdoors is where kids are supposed to go to grow up healthy and well adjusted!

While the story itself is somewhat tragic (luckily the child seems to be mostly unharmed), I think it's an important one for parents to read. Had they yelled at him to stop playing Grand Theft Auto the world would be up in arms against the evils of video games. I bet very few would blame the parents for letting their 9-year-old play such a game. However, this story will most likely be forgotten in a matter of days because there is nothing easy to blame..

The Article at Jalopnik

This entry was cross posted over at NWR.
Topic(s): parenting car chase video game violence games
By Pale on September 2, 2009 at 10:20am EDT Add Comment


Cash for Clunkers is a Crock
The cheesy, local car dealer commercials are abuzz with this new, federal Cash for Clunkers plan. It was supposedly designed to do two things; increase the average fuel economy of cars on the road and encourage people to go out and buy new (hopefully American) cars.

It sounds so good too. My sister-in-law is driving a pretty beat up '98 Ford Taurus. It's got 125,000 miles on it's V6 engine. It overheats if it idles too long. Air conditioning is busted. It makes funny noises. Cash for Clunkers right? God, that sounds like a clunker to me. She definitely needs a new vehicle.

So a crew of us set out for some car dealers this past Saturday morning. We ended up having a very long chat with a salesman at a local Chevy dealer. She can't afford much. I had done some of the math ahead of time and thought it was remotely possible that we could get her a car payment at or under $200. She only wants an entry level vehicle. GM is offering 0% financing for five years and she was going to get $3500 or $4500 for her piece of junk car. This had us looking at both a Cobalt and an Aveo.

We walked the lot and had a lot of discussions. We ended up having a list of about six possible cars and went inside to start the process of talking about numbers. It was after about 15 minutes of this that we got the terrible news. Her piece of crap, gas guzzling, V6 Taurus was not a clunker according to the government. It's combined fuel economy was 19. She wanted to trade it for any one of cars that ranged from 25-30 combined. While this is a pretty substantial difference, enough of a difference that even the salespeople didn't even give it a second thought, the car doesn't meet the first rule of the program. Your trade vehicle must have a combined fuel economy (based on the government standards from when it was new) of 18 miles per gallon or less. Seriously? So quite literally, she could have attempted to trade her 11 year old V6 in for a brand new Prius, and the government wouldn't give her the $4500 bucks.

We were pretty darn disappointed. All I can say is, if an 11 year old car with 125,000 miles and a V6 doesn't qualify, what the heck does? A very small percentage of cars, that's what. The program is garbage. It isn't stimulus. It's not going to affect the environment in any major way. It's a small government program that helps a small number of new car buyers. President Obama wants to increase the average fuel economy requirement for cars to 39 miles per gallon by 2016, thus killing sports cars. If that's his plan for an average car, maybe he should rethink what counts as a clunker.
Topic(s): cash for clunkers government cars
By Pale on July 26, 2009 at 9:25pm EDT Add Comment
  next
Please Log In
Username:
Password:
register

Popular Topics
games (37)
oil painting (22)
play it? (20)
nintendo world report (15)
writing (14)
shows (10)
2004 (10)
show (10)
blogs (10)
inspiration (9)

Recent Comments
Kinetic Sculpture
Thanks so much for your comment... I ...
Kinetic Sculpture
I used this project with my high school ...
Scholastic Art Awards 2010
I really like the tilt shift series, esp...
Technology Challenge
cool, i'm glad you won!
Technology Challenge
The things included in the picture with ...

Archive
+ 2007
+ 2008
+ 2009
+ 2010