RIP cocoon JS. Hello ______

Hi everybody. I’m Dan from team Gamefroot. I’m new to these forums but hopefully you’ll see more of me as me and my team start working with Phaser more and more :slight_smile:

My message is about Cocoon JS and mobile wrappers. I was not surprised to see Cocoon JS shut down but pretty sad that it did.

In their absence I am wondering whether the Phaser community has had any thoughts or has plans to support a specific mobile wrapper going forward. I’ve seen people talking about Capacitor and Phone Gap but are there any examples of games running performant using these wrappers.

Any thoughts / reassurances on publishing to iOS / Android (and beyond) would be awesome.

1 Like

Cocoon JS was just a (paid) automated cloud based build service for Cordova (free), which is still alive and well.

I don’t think ‘just’ is ‘justified’. They were a very useful Cloud based service.

They were way more than just a Cordova service. Their compilation process made games run way more performant. Anyway this isnt helpful :stuck_out_tongue:

Does anybody know of anything that matches the performance of Cocoon?

Does / will Capacitor do this?

I meant “just” in the sense that the same platform (Cordova) is still around, either with the CLI or other free/paid services. In my experience Cocoon’s Canvas+ performance was comparable to Cordova with WKWebview.

From my experience:

Both PhoneGap and Cocoon are based on Cordova.

At the time (2 years ago), the fastest for Phaser 2 games was Cordova/PhoneGap with the Crosswalk Project (custom WebView) or Coccon with the Canvas+ WebView.
It was necessary to use a custom WebView, since Phaser Games did not work well on all mobile phone with their default WebView. Also I used Phaser.CANVAS to render all my games, since it worked faster than WEBGL.

Nowadays, the default webview on all phones (iOS and Android) are very good. Phaser 3 games work out of the box very fast on all devices. Also the support for WEBGL is now much better.

So today I use PhoneGap (Phaser.AUTO) with no additional webview.
No need for a custom webview, since the defaults are very good.
And you can not use Cocoons Canvas+ if you render the game with WEBGL.

Capacitor is something different, although you can use Cordova plugins with it. Theoretically the performance should be equivalent with PhoneGap.

Hope this helps. It works very well for me.


Hi Yannick, I have an android studio application which I want to add some Phaser 3 games too. The application is made in android studio. Would phonegap be a good solution to convert my HTML5 games to android??

Where I am confused is whether phonegap can be used within another android studio project, or does phonegap create the infrastructure for a solely independent application?

From your response I am guessing it will work fine, as you mention using a webView. I assume this means connecting a webview to the index.html file stored in your android assets?!

Any help to this new android game developer would be of great help!

Sorry for the late answer. Was offline for a while.

I guess, yes. But only if you do not have much custom java code. PhoneGap kina does all for you and it is not that easy to add custom java code.

I have never used a PhoneGap project with android studio. I think it is not (easily) possible. PhoneGap simply takes your html code and wrappes it.

Maybe you want to use capacitor instead?

In summary. If you only have some html and js, I would use PhoneGap/Cordova. If you have to add some custom java code, try capacitor.

Hope this helps.

I’m using cordova and planning to make some plugins in future.
Even if one day cordova will decide to die. I’m planning to make something like it for just android and ios. So I think we won’t have any problems with porting games to native webviews.

It’s hard to imagine Cordova dying. Have you launched any games with it?

Always keen to learn how things are working out for others :slight_smile:

One little card game was launched without any problems. But another one has some problems with ios webview. The main issue is that after playing game over 2 minutes phone starts burning. As we found out, it’s result of socket cluster that is being used in project. On Android devices everything is just fine.