Jump to content

Pixi.js -> native mobile


foozaka
 Share

Recommended Posts

  • 3 weeks later...
  • 2 weeks later...

I tried packaging my game in an Android app using a webView (I used Eclipse) but it ran so slow it was unplayable, but on a browser on the same phone run off the web it was fine. Apparenlty using a webView on android is too slow, haven't tried iOS app with a webView yet.

 

Also tried CocoonJS using the iOS launcher app to test my version of the game online but all I got was a blank screen, though it seemed to be reporting fps the wholetime.

Link to comment
Share on other sites

Also tried to run some of showcase games through the CocoonJS launcher and they had a blank screen too.

 

Just realised if you click the FPs counter text, you get a list of all the errors and other usefull info. It appears there were errors relating to the text I was adding though pixi.js, after removing these the intro screen of my game started to work, but I could not tap the 'play' sprite to start. Checked the errors again, and this time they relate to the touchstart, touchend, (tap) event handler but obviously if I remove those, won't be much point.

 

Any ideas? Anyone else got a game using pixi.js to work with CocoonJS?

Link to comment
Share on other sites

Also tried to run some of showcase games through the CocoonJS launcher and they had a blank screen too.

 

Just realised if you click the FPs counter text, you get a list of all the errors and other usefull info. It appears there were errors relating to the text I was adding though pixi.js, after removing these the intro screen of my game started to work, but I could not tap the 'play' sprite to start. Checked the errors again, and this time they relate to the touchstart, touchend, (tap) event handler but obviously if I remove those, won't be much point.

 

Any ideas? Anyone else got a game using pixi.js to work with CocoonJS?

 

Blinking is appear if you try to use "screencanvas".

I dont know why)

Try to use usual "canvas"

 

this you use
var canvas = document.createElement(navigator.isCocoonJS ? 'screencanvas' : 'canvas');

 

this you should use to avoid blinking
var canvas = document.createElement( 'canvas' ); 

 

Link to comment
Share on other sites

Pixi.js does that bit, I'm pretty sure and It seems to use the syntax you've suggested anyway!

 

I'm more interested in how I can modify it to work with CocoonJS, otherwise I'll need to re-write it using something else I guess.

Link to comment
Share on other sites

Just realised if you click the FPs counter text, you get a list of all the errors and other usefull info. It appears there were errors relating to the text I was adding though pixi.js, after removing these the intro screen of my game started to work, but I could not tap the 'play' sprite to start. Checked the errors again, and this time they relate to the touchstart, touchend, (tap) event handler but obviously if I remove those, won't be much point.

 

Any ideas? Anyone else got a game using pixi.js to work with CocoonJS?

 

I had a little word from @k4rliky on Twitter today about the same.  Apparently the touch issue should be fixed in the next Cocoonjs build:

 

kUXQo3A.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...