blackgames Posted April 10, 2014 Share Posted April 10, 2014 Hello! After I tried to compile my own game on cocoon and it did not work I wanted to test this with the simple tutorial (with dude). Unfortunately, this does not work - although I get the splash screen of Ludei but then a black screen. Do I have something in mind? The source code I gained from the current Phaser-repro.The project I have uploaded here. I have also tried both Cocoon versions (2.0 and 1.4). The tutorial and my own game use Phaser 2.0.2. Thank you for the help!TUT.zip Link to comment Share on other sites More sharing options...
Ezelia Posted April 10, 2014 Share Posted April 10, 2014 runadb logcat while starting the game, you'll get debug information that can help your resolve the problem. usualy cocoonjs compilation problems are very specific to each case. Link to comment Share on other sites More sharing options...
blackgames Posted April 10, 2014 Author Share Posted April 10, 2014 Hallo, thank you. I've done.Unfortunately has not helped me. This is the only that I can see for the game:I/WindowManager( 2348): Screenshot Window{43917390 u0 de.blackgames.piggysave/de.blackgames.piggysave.PiggySaveSagaActivity} was all black! mSurfaceLayer=21020 minLayer=21015 maxLayer=21020 was all black... yes and this: E/IDTKLog (11321): IDTK_LOG_ERROR: [iDTK] Invoked in com::ideateca::core::SPData com::ideateca::core::io::AbstractFileSystem::loadFile line 45: IllegalArgumentException: Cannot open the given '/data/data/de.blackgames.piggysave/files/IDTKPreferences.cf' file path.I/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in void com::ideateca::core::util::PreferencesToCipheredFile::init line 51: Could not load the preferences file. IllegalArgumentException: Cannot open the given '/data/data/de.blackgames.piggysave/files/IDTKPreferences.cf' file path. at static com::ideateca::core::SPData com::ideateca::core::io::AbstractFileSystem::loadFile(const string&):45I/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::SPData com::ideateca::core::util::ResourceManagerMP::loadResource line 574: Resource 'applicationFrameworkConfiguration' file name 'IDTKApplicationFrameworkConfiguration.cf'I/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 221: Initializing service : GameServiceI/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 224: Finished initializing service : GameServiceW/IDTKLog (11321): IDTK_LOG_WARNING: [iDTK] Invoked in com::ideateca::core::framework::ServiceRegistry::registerService line 97: Registering service: GameService, version: jenkins-2.0.0_cocoon_services_AppLauncher-43-0-g1610182I/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 221: Initializing service : JavaScriptServiceJSCoreI/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 224: Finished initializing service : JavaScriptServiceJSCoreW/IDTKLog (11321): IDTK_LOG_WARNING: [iDTK] Invoked in com::ideateca::core::framework::ServiceRegistry::registerService line 97: Registering service: JavaScriptServiceJSCore, version: jenkins-2.0.0_cocoon_services_JavaScript-46-0-gb20d087I/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 221: Initializing service : JavaScriptServiceWebViewI/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 224: Finished initializing service : JavaScriptServiceWebViewW/IDTKLog (11321): IDTK_LOG_WARNING: [iDTK] Invoked in com::ideateca::core::framework::ServiceRegistry::registerService line 97: Registering service: JavaScriptServiceWebView, version: jenkins-2.0.0_cocoon_services_JavaScript-46-0-gb20d087I/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 221: Initializing service : SessionAnalyticsServiceI/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 224: Finished initializing service : SessionAnalyticsServiceW/IDTKLog (11321): IDTK_LOG_WARNING: [iDTK] Invoked in com::ideateca::core::framework::ServiceRegistry::registerService line 97: Registering service: SessionAnalyticsService, version: jenkins-2.0.0_cocoon_services_Analytics-33-0-g330504fI/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 221: Initializing service : SplashServiceI/IDTKLog (11321): IDTK_LOG_INFO: [iDTK] Invoked in com::ideateca::core::framework::ModuleManager::initModuleServices line 224: Finished initializing service : SplashServiceW/IDTKLog (11321): IDTK_LOG_WARNING: [iDTK] Invoked in com::ideateca::core::framework::ServiceRegistry::registerService line 97: Registering service: SplashService, version: jenkins-2.0.0_cocoon_services_Splashes-30-0-g752c683 I have also uploaded the complete txt. There's got to actually go with the very simple tutorial, right? Has anyone been able to create a successful apk? And one could publish the code? of course no game logic Thanks for the help!logcat.txt Link to comment Share on other sites More sharing options...
Videlais Posted April 10, 2014 Share Posted April 10, 2014 Ezelia is absolutely right that, in most cases, the issues are with some variation of the code and the system, not Phaser itself. However, many of those errors read as if CocoonJS itself is not loading correctly. I also highly recommend you use their Compile Launcher for testing first, before using their cloud compiler. It's available on the iTunes store and GooglePlay store. This will allow you to test things yourself instead of waiting on the 20+ minute e-mail with your changes each time. (You can also, under the 'Android' section for a project, pick different SDK versions to target too. If you want a Compiler Launcher for an earlier Android version, that is the best way.) I've also been tracking issues between CocoonJS and Phaser for months now. Be sure to look at this list. It gets updated as I receive or read about issues or solutions. (You can also report things in that thread too.) Link to comment Share on other sites More sharing options...
blackgames Posted April 10, 2014 Author Share Posted April 10, 2014 Thank you for the detailed answer! I have now tried it in all variations - nothing works ... I dont know if I think wrong but there must be a right way that works by default? Link to comment Share on other sites More sharing options...
blackgames Posted April 11, 2014 Author Share Posted April 11, 2014 Hi again, I've just tested my game (Phaser (happy birthday!) 2.0.3) in the Launcher App (on Android) - I have no errors, but the game still does not work. It is further shown a black screen. this is indicated in the warnings: http://s7.directupload.net/images/140412/jt2mym67.png But this can't be the problem, right? and this in the console: http://s14.directupload.net/images/140412/bdqxq7pd.png the FPS is constant at 62. This is a part of the code, that I use (and nothing shows)<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <title></title> <style type="text/css"> body{ margin: 0px; } </style></head><body><!--##########################################################//Javascript - Frameworks, Dateien, Gamelogik//##########################################################--><script type="text/javascript" src="js/phaser_v2.0.3.min.js"></script><script type="text/javascript"> //Skalierung var width = window.innerWidth * window.devicePixelRatio; var height = window.innerHeight * window.devicePixelRatio; //Gameinstanz var game = new Phaser.Game(width, height, Phaser.AUTO, ''); //--------------------------------------------------------- //########################################################## //Boot //########################################################## var Boot = { preload: function() { //Logo laden game.load.image('logo', './assets/scenes/blackGamesLogo.png'); //Init game.maxPointers = 1; }, create: function() { game.state.start('load'); }, } //########################################################## //Boot Ende //########################################################## //########################################################## //Loading //########################################################## var Loading = { preload: function() { //Hintergrund - Logo - Ladephase game.stage.backgroundColor = '#000000'; //schwarz logo = game.add.sprite(0, 0, 'logo'); logo.width = game.world.width - (game.world.width / 4); //Groesse skalieren logo.height = game.world.height / 4; //Groesse skalieren logo.x = game.world.centerX - logo.width / 2; logo.y = game.world.centerY - logo.height / 2; }, } //########################################################## //Loading Ende //########################################################## //########################################################## //States, Scenes //########################################################## game.state.add('boot', Boot); game.state.add('load', Loading); game.state.start('boot');</script></body></html>Can anyone help me, please Thank you very very much! Link to comment Share on other sites More sharing options...
Videlais Posted April 12, 2014 Share Posted April 12, 2014 blackgames: You may be falling victim to the image rendering problem. (It's the very first one listed here.) Try adding the following linegame.add.sprite(0,0,'')For example, probably here:var Boot = {... create: function() { game.add.sprite(0,0,''); game.state.start('load');...}That may or may not work. If it does, everything else *should* work as well. If it doesn't, you will probably have to wait till we fix the image rendering problem. (Sorry.) In the meantime, try using the System WebView option. When the Canvas+/Accelerated mode doesn't, it should. Link to comment Share on other sites More sharing options...
blackgames Posted April 13, 2014 Author Share Posted April 13, 2014 Thank you Videlais for your time!! But this doesn't work too... I uploaded the project here. Maybe it helps. Run the project under System Webview option, don't work. There is no entry in the debugview and the FPS stay at 0. Unfortunately I do not know what to do. Greetingsproject.zip Link to comment Share on other sites More sharing options...
Videlais Posted April 15, 2014 Share Posted April 15, 2014 But this doesn't work too... I uploaded the project here. Maybe it helps. I tested your files today. For me, it worked when forcing WebGL (on iOS using the CocoonJS 2.0 launcher app), but didn't work under Canvas mode. (Using Phaser.WEBGL and Phaser.CANVAS afterwards.) I confirmed that this code won't work correctly in either mode using System WebView. This is probably the rendering issue, then. There is nothing more I can do other than to recommend waiting until it is fixed or a new solution is found. (Sorry.) Edit: I meant to attach this earlier, but I noticed this error on two different devices too. It looks like your logo is too big for Android devices -- exceeds the 2048 limit for WebGL textures. Link to comment Share on other sites More sharing options...
blackgames Posted April 15, 2014 Author Share Posted April 15, 2014 Hi Videlais, thank you very much for your effort!Please, can you upload the project, which has worked for you? I have now tried to force WebGL and the image on 1x1 scaled, for me it did not work. I think I'm too dumb for this. Or can it be because of the Samsung phone? I have no other device to test. Greetings Link to comment Share on other sites More sharing options...
Videlais Posted April 16, 2014 Share Posted April 16, 2014 Please, can you upload the project, which has worked for you? The only change I made for testing was to the following line://Gameinstanzvar game = new Phaser.Game(width, height, Phaser.AUTO, '');Instead of Phaser.AUTO (which defaults to Phaser.WEBGL), I changed it to Phaser.CANVAS. I have now tried to force WebGL and the image on 1x1 scaled, for me it did not work. I think I'm too dumb for this. It's not you. And it's not the Samsung phone either. The problem is between Phaser and CocoonJS. You can try a smaller image. That might help. However, after testing your files, I think this is the rendering issue that is affecting everyone right now. There is no solution and we are all waiting for it to be fixed. Link to comment Share on other sites More sharing options...
Hsaka Posted April 16, 2014 Share Posted April 16, 2014 Hi there, I'm seeing the same problem with my project. Both Canvas and WebGL modes worked properly when using Phaser 2.0.1. On upgrading it to 2.0.4, however, WebGL works but Canvas mode gives a blank screen. I don't know what might have changed between those versions that caused this issue but hopefully it gets fixed soon. Link to comment Share on other sites More sharing options...
Ezelia Posted April 16, 2014 Share Posted April 16, 2014 I have now tried to force WebGL and the image on 1x1 scaled, for me it did not work. I think I'm too dumb for this. not sure I understand, do you mean that the image you are trying to load is 1x1 pixel ? or the image size is 2230x600 and you scaled it to 1x1 ?if the image size is 2230x600, try to use a smaller image first (something smalled than 2048x2048) , the original image should be smaller than that not the scaled copy.not sure, but I think that this limitation was made to ensure mobile compatibility since some devices have problems with images with bigger dimensions than 2048 Link to comment Share on other sites More sharing options...
blackgames Posted April 16, 2014 Author Share Posted April 16, 2014 not sure I understand, do you mean that the image you are trying to load is 1x1 pixel ? or the image size is 2230x600 and you scaled it to 1x1 ?if the image size is 2230x600, try to use a smaller image first (something smalled than 2048x2048) , the original image should be smaller than that not the scaled copy.not sure, but I think that this limitation was made to ensure mobile compatibility since some devices have problems with images with bigger dimensions than 2048 Hi Ezelia, i scaled the image size to 1x1 and with the game (scale) logic is it not cute but for the test.nevertheless thanks for the answer! Link to comment Share on other sites More sharing options...
blackgames Posted April 16, 2014 Author Share Posted April 16, 2014 Hey there,great news that I will share with you. I tried today the Intel XDK (old appMobi) and it works great for me. I have a at 80% finished game and port this to an apk for android with the Intel service. I haven't much time today to test more then an hour but what I have tested works great. I test more at the weekend - and post more details or a tutorial in the next week. Greetings Link to comment Share on other sites More sharing options...
Recommended Posts