News for hackers. Stuff that matters.
Re:Phaser 3.0: HTML5 game framework by mephitix on Tuesday February 13, 2018 @09:31PM (#16372945)
"Games can be compiled to iOS, Android and native apps via 3rd party tools"

Gonna need some explanation here... does it spit out native code? Where are the tools? And since it's HTML5 why can't I just run the thing in a native web view? Are there perf issues?

Re:Phaser 3.0: HTML5 game framework by BattyMilk on Wednesday February 14, 2018 @05:15AM (#16374814)
I built a (very simple) game in Phaser a couple of years ago and used cocoon (https://cocoon.io/) to package it up into an Android and iOS app. Basically it packages the HTML/JS/CSS app into a native webview.

Phaser is a great framework. I managed to conceive, write the game from scratch and have it in the app store within a day.

It's no longer on the iOS store as I didn't continue to pay my dev licence, but happy to share the play store link if anyone is interested.

Re:Phaser 3.0: HTML5 game framework by slazaro on Wednesday February 14, 2018 @06:27AM (#16375047)
Can we see the game? :)
Re:Phaser 3.0: HTML5 game framework by BattyMilk on Wednesday February 14, 2018 @06:35AM (#16375071)
Of course! Though, I just tried to launch it on my phone for the first time in a year or so and it just crashes at the title screen YMMV (OnePlus3 running 8.0.0)

https://play.google.com/store/apps/details?id=com.fraserhart...

Re:Phaser 3.0: HTML5 game framework by slazaro on Wednesday February 14, 2018 @09:56AM (#16376124)
It crashed for me too. It's a shame, I was curious to see what was achievable in a day of work!
Re:Phaser 3.0: HTML5 game framework by LoSboccacc on Wednesday February 14, 2018 @03:09AM (#16374309)
I had many issues with iOS since their web view component didn’t enjoy full webgl accelleration. This made opening my game slow in chrome and slow when wrapped in a cordova app without using crosswalk, eventually just reduced graphic demands precalculating composed sprites, placing caps on concurrent bullets, reducing the game area etc.

In the end was running well enough from the browser too making wrapping moot.

It’s published at http://increstellar.com and the code is not obfuscated but beware: it’s very amateurish

Re:Phaser 3.0: HTML5 game framework by wishinghand on Tuesday February 13, 2018 @10:14PM (#16373127)
I'm not part of the Phaser development team, but I imagine the 3rd party tool they're referencing is Cordova. If you're using the CLI generator for Cordova, you'd put your finished project in the `www` folder and plug in your test device to see how it runs. This creates a webview app that runs on Android and iOS devices.

I'm not an Android or Swift dev, but I imagine you can just stick it in a native webview, which is what I believe Cordova does.

As for performance I can't imagine it's super-performant, but I do know the lead dev does his best to aim for 60fps rendering even under heavy duress.

Re:Phaser 3.0: HTML5 game framework by josephg on Tuesday February 13, 2018 @10:44PM (#16373278)
It could also be using something like Ejecta[1], which wraps a javascript engine with a simple native reimplementation of the canvas API. Ejecta is great because its lightweight - you don't pull in all of Webkit like cordova. (And thus you don't have to deal with any of its opaque, ever-changing quirks.)

[1] http://impactjs.com/ejecta

Re:Phaser 3.0: HTML5 game framework by Kiro on Wednesday February 14, 2018 @02:33AM (#16374162)
I would love to know this as well. Ideally it should just map the WebGL calls to native OpenGL. If this is not the case, why not?