Last time I blogged about it, we have seen the advantages of CocoonJS and Ejecta, but that post was back in 2014,
and 16 months in the mobile landscape is an eternity.
In this blog post we will see some new possibilities for making performant HTML5 games for mobile.
While Ejecta has largely remained the same, CocoonJS has evolved into cocoon.io, which has both
its good and bad parts.
The good part is that now cocoon.io projects are based on Cordova, so now they can use all the
available Cordova plugins, including my own cordova-plugin-networking-bluetooth.
The bad part is that if you want to use cocoon.io for more than 2 projects, it can become expensive.
Last time I also mentioned Ejecta-X, which is pretty much dead by now (The last commit is from May 2014).
I believe that Ejecta and CocoonJS have been very useful in the last 2 years (in fact, Frank the Dillo was released using CocoonJS),
but now they are not as needed as they were back in 2014, and here's why:
Let's recall that these projects address the slowness of HTML5 games by implementing a hardware-accelerated
Canvas, a very basic HTML5 Audio functionality, touch events, and nothing more.
While it is possilbe to make great games despite these limitations, much better results can be obtained
by implementing the game menus using HTML and CSS, and by using the Web Audio API for game audio.
Recently Cordova has got pluggable webviews, which means that the WKWebView can be used for iOS, and
Crosswalk can be used for Android.
WKWebView means that the game runs with the same performance as it would run using Safari, which means that
all the APIs, all the HTML and CSS supported by Safari are available to the game.
Similarly, Crosswalk enables the game to run with the same performance of running it using a recent version of Chrome,
with the added bonus that all the APIs, all the HTML and CSS supported by Chrome are available to the game.
In addition to this, let's not forget that newer mobile devices are much more performant than those available 16 months ago,
so I believe that in the near future, mobile HTML5 performance will not be a problem anymore.
There are comments.