BobDylan Posted August 31, 2014 Share Posted August 31, 2014 On older Android devices canvas is really slow. A solution for this is the FastCanvas-plugin for Phonegap, but the canvas needs to be created withFastCanvas.create(); Since Phaser creates its own canvas element, I can not get these two to work together. https://github.com/phonegap-build/FastCanvas/ Has anybody achieved this before? Link to comment Share on other sites More sharing options...
Videlais Posted August 31, 2014 Share Posted August 31, 2014 Probably not. Detection of Cordova/PhoneGap is relatively new to Phaser, and I haven't really gotten around to detecting and using various plugins yet. Looking at the API for FastCanvas, though, changes to use it would have to happen at the Pixi level. (Phaser uses Pixi.js for all its rendering.) And given that, it seems unlikely that it would be integrated any time soon because of the API differences between FastCanvas and Canvas itself. However, if you, @BobDylan, or anyone else wanted to start work on this, looking Phaser.Canvas is the best place to start. Changing how Phaser creates a canvas and then checking what errors happen afterwards would give you a great starting place to seeing which functions need to be changed and where. Link to comment Share on other sites More sharing options...
BobDylan Posted September 1, 2014 Author Share Posted September 1, 2014 Ok thanks. I did this but immediately found out that some important functions, like fillRect() are not implemented in FastCanvas.I'm afraid I don't have sufficient knowledge of all canvas functions, so I have no idea how much work this would involve to get it working. Other options are Ejecta-x, CocoonJS and Crosswalk.I couldn't get Ejecta-x to work (and it doesn't seem very well maintained) and I just hate the uncertain price model and splash screen of CocoonJS.Crosswalk (using Intel XDK) seems like a good option, but it doesn't support Android 2.3 and the apk-size is quite big.I found out about gles.js, which looks promising, but it isn't released yet, I believe. Maybe I should just concentrate on getting my game finished and hope that in a few months time there will be a good solution to wrap a HTML5 game for Android. Link to comment Share on other sites More sharing options...
Recommended Posts