valueerror Posted September 22, 2014 Share Posted September 22, 2014 using ogg to and i have no error of that kind.. but long loops "jump on the first note".. it's played twice... i don't know how to describe it in english... in fact i don't have most of the errors and workarounds needed here... i do the "this.webgl=false" hack on the phaser source and most of the problems (except the bitmapfont problem - where i use a custom xml parser to solve it) are gone.. Link to comment Share on other sites More sharing options...
rich Posted September 22, 2014 Share Posted September 22, 2014 Unrelated to the ogg issue, but I have to admit I found Ashley's latest post on the Scirra site fascinating. He's basically saying there is no need for Cocoon on iOS8 any more, and that actually PhoneGap will outperform it as soon as they move to WKWebView. As a result they deprecated the Cocoon exporter. Given the weird amount of hacks you're all having to use for Cocoon and the lack of assistance from Ludei I'm thinking that might not be a bad practise to follow. Sam 1 Link to comment Share on other sites More sharing options...
Binary Moon Posted September 22, 2014 Share Posted September 22, 2014 @Rich - I really like the look of PhoneGap but for less technical people like myself I just don't know how to use it. CocoonJS has a lot of flaws but the basic usage is super simple - and I can make use of advertising and other features relatively easily. PhoneGap on the other hand is just not very friendly for me. I'd happily switch to something simpler if I could but PhoneGap (and similar) are anything but simple Sam 1 Link to comment Share on other sites More sharing options...
Videlais Posted September 22, 2014 Author Share Posted September 22, 2014 Unrelated to the ogg issue, but I have to admit I found Ashley's latest post on the Scirra site fascinating. He's basically saying there is no need for Cocoon on iOS8 any more, and that actually PhoneGap will outperform it as soon as they move to WKWebView. As a result they deprecated the Cocoon exporter. Given the weird amount of hacks you're all having to use for Cocoon and the lack of assistance from Ludei I'm thinking that might not be a bad practise to follow. To apply my own prognosticating to this: I think there is a move, even among the wrapper engines like CocoonJS and Ejecta, toward more WebView-based tools. As one example, Ludei's own CocoonJS Command-line Interface is just the Cordova tools with the injection of WebView+ (Chromium libs) on top. And PhoneGap, as is pretty commonly known, is just Apache Cordova with a different name and a remote compiling option. Based off this article, and some moves I've seen and have started to make myself, then, I definitely see WebView (be that UI or WK) as a large part of the future of mobile HTML5. Those apps compiled to use the native API, and not have to go through a translation layer, are always going to be faster. As long as the WebView code improves, and I see no reasons why it wouldn't, I see the same long term answer Scirra did: more WebView, less wrappers. However, as someone who has tried (albeit very slowly) to introduce patches for Cordova/PhoneGap to Phaser, I don't think anyone should suddenly jump ship from CocoonJS to Cordova. There are some major issues, like the use of the Media plugin, for example, that complicate even the seemingly simple task of playing audio. And Phaser definitely needs to catch more Cordova events (like "pause", "resume", and "backbutton" to start) before even simple apps will work as expected in production settings. That written, though, if CocoonJS was dropped from Phaser in the coming months, maybe even by the beginning of next year, I wouldn't mourn it too much. I was a big proponent of it early this year, I know. But, given the frustration of all the weird hacks we've had to use and constant shifting of what works with each version, I've stopped being an apologist for it. Maybe the next version will be better, maybe, but there is only so much "Oh, the next version, for sure!" I can take. Link to comment Share on other sites More sharing options...
valueerror Posted September 22, 2014 Share Posted September 22, 2014 maybe we could continue the discussion here: http://www.html5gamedevs.com/topic/9388-webview-vs-wrapper-cocoonjs-cordova-phonegap-crosswalk/ Link to comment Share on other sites More sharing options...
rich Posted September 22, 2014 Share Posted September 22, 2014 Just so I'm clear: I don't plan on removing any Cocoon support from Phaser 2, although I certainly won't spend much time on trying to solve issues with it, when even Ludei can't seem to find the time to help either. However, Phaser 3 development starts in the next couple of months, and I'm seriously questioning if it should even factor in that codebase at all. Link to comment Share on other sites More sharing options...
Orbital Game Studios Posted September 22, 2014 Share Posted September 22, 2014 (edited) I'm pretty new to using Cocoon.js and Phaser but I've noticed my one project that worked awesome in 2.0.7, does not work in 2.1.1 when just swapping the phaser.js files. (only using Arcade physics) When trying to debug in webview+ mode, I get nothing but a blank screen and no errors. When using Canvas, I do get an error in the boot state that says the .add method is unknown which is a little baffling. 2.1.1 works amazing in all browsers I've tried with the same code. Not sure if anyone else has experienced the same thing and found a work around. Edit: Realized I typed in v2.1.0 instead of v2.1.1 which I'm actually using. Edited September 25, 2014 by Orbital Game Studios Link to comment Share on other sites More sharing options...
Boxtufty Posted October 4, 2014 Share Posted October 4, 2014 Buttons flickering and disappearing also. Using latest cocoonjs and latest phaser on Android. Link to comment Share on other sites More sharing options...
valueerror Posted October 7, 2014 Share Posted October 7, 2014 cocoonjs. works quite well right now .. as long as i don't use anchor.seTo, and a custom bitmap json parser found in this forum, and the "blank image hack" at the end of create to make my buttons appear and of course CANVAS mode.. (the "this.webgl=false" phaser hack is not needed anymore..) the question is.. is anyone using cocoonjs in WEBGL mode successfully ? (my game doesn't even start with webgl and cocoon.. no errors) edit: with force webgl screencanvas i managed to make it work but the performance is HALF the performance of canvas mode one thing i did notice though is that my game is crashing for no reason on some very very rare occasions.. which is NOT happening with android crosswalk (crosswalk is workling like charm with webgl btw.. if cocoonjs weren't giving me 10 more fps (in canvas mode) i would never look at cocoonjs ever again.. buggy as it is) Link to comment Share on other sites More sharing options...
Binary Moon Posted October 8, 2014 Share Posted October 8, 2014 @valueerror - when you say cocoonjs is crashing for no reason what do you see? I've noticed the game freezing and becoming unreponsive - seemingly randomly. I submitted a bug report about it here:http://support.ludei.com/hc/communities/public/questions/200366689-Leaderboard-freezes-game-on-ios For me the bug seems to be related to the leaderboards, or other times the game interacts with gamecenter. Link to comment Share on other sites More sharing options...
San4er Posted October 30, 2014 Share Posted October 30, 2014 The last update of CocoonJS just crashes with black screen and "uncompressing error" if the zip-file has spaces in its name. Link to comment Share on other sites More sharing options...
Sam Posted November 20, 2014 Share Posted November 20, 2014 Ludei has done some fixes in an update from the 2.1 launcher (you can update this since las week).-> Canvas+ mode runs very well without the "black-screen" problem that was discussed. Link to comment Share on other sites More sharing options...
Ludei Posted November 20, 2014 Share Posted November 20, 2014 Hello, New versions of some components of CocoonJS are published and, regarding Phaser, there are some important features and bug fixes we would like to share with you all: iOS ARM64 supportEnabled WV+ on 64 bit devicesFix rare bug where Canvas+ could crash when executing code in onTouchEnd listenersFixed threading bug which was consuming battery when app was in background in Canvas+ (Android)Fixed blank screen issue. Fixed missing last sprite using CANVAS renderer. The complete list is much wider. In case you want to have a look at it, here there is a link to the blog post: http://blog.ludei.com/latest-cocoonjs-releases-20141120/ Regards. Link to comment Share on other sites More sharing options...
rich Posted November 20, 2014 Share Posted November 20, 2014 Ludei - Great stuff! Does this mean I can remove my nasty little hack from the Game.js? Link to comment Share on other sites More sharing options...
horror812 Posted November 20, 2014 Share Posted November 20, 2014 Hi alli'm try to run app on android with cocoonjs (use phaser 2.07 and cocoonjs or cocoonlancher)all fine - all visible - not has errors, but not work input for me (button.onDown..etc or state.input.onDown..etc - not actions)hope Link to comment Share on other sites More sharing options...
j0hnskot Posted November 20, 2014 Share Posted November 20, 2014 @Horror812 Make sure that you give no parent element name when you generate the Phaser.Game instance. for example :var game = new Phaser.Game(800,600, Phaser.CANVAS, '')I remember having the same problem because i used a specific parent element. Link to comment Share on other sites More sharing options...
horror812 Posted November 20, 2014 Share Posted November 20, 2014 j0hnskot Many thanks for the quick reply, it's work - i'm glad ^___^ Link to comment Share on other sites More sharing options...
Ludei Posted November 21, 2014 Share Posted November 21, 2014 Hello, Ludei - Great stuff! Does this mean I can remove my nasty little hack from the Game.js? Yes, you can delete that hack. In addition, we are analyzing the different hacks regarding navigator.isCocoonJS for being able to delete them too, so the game will work as in a normal browser without any trouble. Thanks a lot for your time and sorry for all the inconveniences caused. Regards. valueerror 1 Link to comment Share on other sites More sharing options...
rich Posted November 21, 2014 Share Posted November 21, 2014 Awesome! How about this one: if (this.device.cocoonJS) { if (this.renderType === Phaser.CANVAS) { this.canvas.screencanvas = true; } else { // Some issue related to scaling arise with Cocoon using screencanvas and webgl renderer. this.canvas.screencanvas = false; } } Link to comment Share on other sites More sharing options...
Ludei Posted November 21, 2014 Share Posted November 21, 2014 Hello, This one is more complicated. The problem is that if you disable the screencanvas when using phaser.CANVAS and WebGL, the performance will be affected and it will decrease. We like to treat screencanvas more as performance extension than a hack, as it happens with some specific WebGL GPU extensions.However, we will keep on investigating this issue and other ones and we will make a pull request to delete as many cocoonjs checks as possible. Regards. Link to comment Share on other sites More sharing options...
valueerror Posted November 21, 2014 Share Posted November 21, 2014 edit: don't think that had something to do with cocoonjs .. sorry Link to comment Share on other sites More sharing options...
Ludei Posted November 21, 2014 Share Posted November 21, 2014 huh.. this is a new on.. "uploaded file is not a valid zip file" well... it is a zip file.. definitely.. also i didn't change anything and it worked before Could you please tell us if you are compressing the file using the default compression in macosx? If so, please, try using another one. We are aware that sometimes the compression using this system can cause troubles. If the problem persists, please, let us know and we will have a look at it. Regards. Link to comment Share on other sites More sharing options...
valueerror Posted November 21, 2014 Share Posted November 21, 2014 thx ludei.. i used the default compression from KDE/plasma (linux) i then zipped the file using a console/terminal tool and it worked - thx very much.. my game works very well in the cocoonjs launcher - unfortunately i still see a black screen when compiling the game.. but everything is there.. sound, buttons, player, - just not visible.. disabling webgl (in my game and in the compiler) didn't help (which did the trick in the launcher) also my music files (ogg) jump on the first note.. it's played twice - not a showstopper but quite strange Link to comment Share on other sites More sharing options...
Ludei Posted November 21, 2014 Share Posted November 21, 2014 thx ludei.. i used the default compression from KDE/plasma (linux) i then zipped the file using a console/terminal tool and it worked - thx very much.. my game works very well in the cocoonjs launcher - unfortunately i still see a black screen when compiling the game.. but everything is there.. sound, buttons, player, - just not visible.. disabling webgl (in my game and in the compiler) didn't help (which did the trick in the launcher) also my music files (ogg) jump on the first note.. it's played twice - not a showstopper but quite strange Is it possible to have a test case that reproduces the issue? The ones we had from other Phaser users worked fine, so we need to have a deeper look at your project. If possible, please, open a topic in our community, because we are not constantly checking this forum and in the community we will receive the notifications when the topic is updated. Sorry for the inconvenience. Regards. Link to comment Share on other sites More sharing options...
valueerror Posted November 21, 2014 Share Posted November 21, 2014 sorry for this "false" alarm concerning the black screen.. the "webgl" option was still turned on in the cloud compiler settings.. i can NOT use webgl otherwise the screen will be black but with webgl turned off canvas+ works quite well.. same thing in the launcher.. no errors in console.. phaser says it uses webgl.. but everything is black.. providing a testcase is very dififcult at the moment.. but when i find some time i'll provide one (besides the music jumping on on the first note on every loop ;-) ) there is another thing: i tested ads (admob) and they work very well in the cocoonjs launcher (from the store) with canvas+ - the exact same app doesn't show any ads when being compiled.. but think i added my adunit id's correctly in the ad settings (why else should they show up in the launcher ? Link to comment Share on other sites More sharing options...
Recommended Posts