Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Angry Birds for the Web was developed for HTML5 and it works reasonably well on desktops and cross-browser (runs on Chrome, Firefox, and IE9+) It runs offline via HTML5 AppCache, via Chrome app, or online.

Maybe your article should be titled "Writing games in HTML5 for Mobile Devices is not ready". because I don't think the same reasoning applies to the desktop.

You won't achieve 100% reach, as you will fail on some combination of hardware, but perfect is the enemy of the good here.

Also, I think there is a little bit of arrogance in the two articles Wooga posted. They claim they are one of the most technologically sophisticated HTML5 games, but that seems dubious. Angry Birds, Field Runners, Bejeweled, Sonar, and Cut The Rope, are just a few of many of the games out there are push the limits of HTML5 performance, and are much smoother than Wooga's offering and do more onscreen. I don't want to bash them, I just want to make the point that if they are having performance issues, it's not because they are pushing the limits of what the browser is capable of.

The real lesson is that mobile browser performance sucks, especially Canvas operations. If and when Mobile Safari and Chrome for Android get WebGL, mobile HTML5 games might be more plausible. Javascript performance on mobile has been doubling roughly every generation. The newest WebKit implementations like iOS6 support the Web Audio spec which addresses low latency sound, and File System APIs for local storage. In another generation, it may be more viable.

Have a look at Quake ported to HTML5 done in 2010 by me and a few others: http://www.youtube.com/watch?v=fyfu4OwjUEI&feature=playe...

Back then, it ran at 45-60fps. Today, it runs at 200+fps on Chrome on the same machine.

There are options for multiplatform development. Angry Birds was done with PlayN, in which you write you game in Java, and we compile it to JS (with GWT targeting CSS3+DOM, Canvas, or WebGL), Android (run direct on dalvik with OpenGLES), Flash (via GWT->ActionScript compiler), and IOS (via translation to CLR + Monotouch ahead of time compiler)

hAXe is another similar platform. Write code in ActionScript3-like typed-Javascript, compile to JS/SWF/C++/Objective-C/etc.



> Javascript performance on mobile has been doubling roughly every generation

This is a very strong statement. And even if it was true, there still are fundamental limitations to Javascript performance, i.e. you wouldn't expect it to reach the native performance.


It is true in so far as if you run benchmarks on the Nexus 1, the Nexus S, and the Galaxy Nexus, the Sun Spider and V8 benchmarks roughly double between each device. Some of that is improvement in V8, and some of that is faster ARM CPU.

I don't think anyone is claiming JS will reach native performance, or that you're going to write triple-A title games like Battlefield 3 in it. The question becomes, when is it good enough?

At a certain threshold, JS performance will be good enough for a good swath of apps and games on mobile that the deployment benefits and cross-platform nature will outweigh the downsides for many developers.

Just look at JS on the desktop. Performance has gotten good enough that for the vast majority of cases, people do a good chunk of their work within the Web. There's no need to download native apps for reading news paper sites, or social networks, or even light productivity work on your desktop.

In my opinion, too many apps are being written in native code for mobile that don't really deserve to be, it's a temporary transient situation for a few years.

IOS basically is a return the Microsoft era with native apps for everything, and I think, like with Microsoft, the Web will start to turn around in the future and start to steal back marketshare from native apps.


> Maybe your article should be titled "Writing games in HTML5 for Mobile Devices is not ready".

I strongly agree with that! I feel like it's not been made clear enough.

I work on Pocket Island, at wooga.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: