Crosswalk and CocoonJS APK problems...help![SOLVED]

Just started using Construct 2? Post your questions here

Post » Sun Aug 10, 2014 12:25 am

Hi All,

I've been working on a game meant for mobiles and it has been going well up until recently when I tried to test out the APK. Much to my dismay I found that while the game worked fine on my browser, It wouldn't get passed the main menu as an APK on my Android device.

I initially attempted this using CocoonJS, and while the game worked amazingly on the launcher from a zip file, the game would not switch layouts when being launched as a signed app. At first I thought perhaps it was just a bug with the layout so I recompiled the app making the default screen the actual game rather than the main menu layout. The game launched and played fine, but when attempting to navigate from the game to the main menu (through the pause screen/quit button) or even restart the game, it didn't work :(

Strangely enough I found that the layout it was stuck on was perfectly functional allowing me to resume and keep playing the game, it just refused to do anything revolving around switching layouts. I thought maybe there was a bug with CocoonJS so I made a simple dummy project with two layouts and button that toggled between the two, and that worked just fine so that got me thinking that perhaps there was something fundamentally wrong I was doing in practice that perhaps caused the game to overload or something such as a rookie mistake with the way I handled my events? This is my first mobile game project so I guess having it go smoothly would be too much to ask!

After asking around on the forums I was suggested to ditch CocoonJS and use Crosswalk instead, the only issue with that is that that wrapper seems to have it's own problems; I can't seem to lock the orientation to landscape, the anchoring seems a bit screwy and the game runs extremely slow :(

Can anyone offer any assistance? I really want to keep this project going but right now it has hit a complete standstil!

Any help would be appreciated.

https://drive.google.com/folderview?id= ... sp=sharing
Here is a link to the Capx if anyone would care to take a look, as well as the cocoonjs zip and signed APK if anyone wants to try and reproduce the issue.
Last edited by dmakinde on Mon Aug 11, 2014 9:47 pm, edited 1 time in total.
B
5
Posts: 29
Reputation: 733

Post » Mon Aug 11, 2014 6:35 pm

What are the sizes of your art assets? I am pretty new here myself and I realized that your artwork should be small in file size . Like the game screen can be 500,350 and your characters can be 40x40 or 50x50 pixel size at most.
Just set the scale to outer scale and it will be full screen size on android device. I was going nuts before I figured this out with help from a friend.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615

Post » Mon Aug 11, 2014 9:45 pm

Hey Pixel, it turns out that the root of the problem was indeed linked to the art assets. I predicted that the problem was most likely rooted in a rookie mistake on my part and that was certainly the case! I had a placeholder tiled background that was way too big. After deleting it from the project and recompiling the project ran without a hitch haha, it's always the complicated problems that seem to have simple solutions! Thanks :)

I haven't tried recompiling it on crosswalk yet but it seems to be running just fine on cocoonjs so I won t worry about that for now
B
5
Posts: 29
Reputation: 733


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest