Jump to content

CocoonJS file structure ZIP Question


Gamma
 Share

Recommended Posts

Hello everyone. Recently I uploaded my game on the web using cocoonJS. I got the email momentarily and (I do not know if I was suppose to do this or not) I tried to click the link using my phone's email client. The link lead to a blank page. I was using an iphone at the time for testing purposes. I don't know if my file structure inside the ZIP was organized in a way to work or not, because the game runs fine on a desktop. Can anyone tell me how they prepared their ZIP file for cocoonJS and how your file structure looks like? Also was it wrong to open the link within the phone?

 

 

Thank you all in advance. 

Link to comment
Share on other sites

EDIT:

 

I got the game on the launcher and it starts to run, but there are a few problems. No text is showing up. Just images. And I have some warnings down below:

 

No implemented canvas addEventListener: touchleave

No implemented canvas addEventListener: touchenter

No implemented canvas addEventListener: keyup

No implemented canvas addEventListener: keydown

No implemented canvas addEventListener:pageshow

No implemented canvas addEventListener:pagehide

 

There are more "No implemented canvas addEventListener:" warnings.

 

Also I am using the full screen mobile template provided on github for this.

Link to comment
Share on other sites

Hi Gamma,

 

CocoonJS has kind of it's own browser implementation focusing on a hardware accelerated canvas. Hence, not all standard event listeners are implemented (yet). The warnings just tell you that phaser is trying to listen to events that are not available within the CocoonJS environment, which doesn't necessarily has to result in actual problems within your game.

 

Concerning the fonts: Searching these forums for 'CocoonJS' or 'Cocoon' should bring up some threads that pin down these issues and as far as I remember you might even find some workarounds there.

Link to comment
Share on other sites

Thank you guys. I tried the game on System Webview and it seem to show everything except for the audio and the fact that its not scaled right. The warnings only showed up on the 'Accelerated Canvas/WebGL' option. My only problems now is that text shows up as black rectangles, there is no audio, and my game is not scaled to fit the whole screen. I took a look around the forums, I believe someone figured out the scaling issue. I'd have to take a closer look. 

Link to comment
Share on other sites

@Gamma:

 

This post has a collection of the issues I've seen with CocoonJS. It should address the scaling, text, and audio problems.

 

The differences between System WebView and 'Accelerated Canvas/WebGL' modes are often kinda deceiving. The System WebView creates an API layer and then calls the default browser on the platform. It's more or less just handing off the task of running the code to an instance of that browser on whatever platform it is running on at the time.

 

The 'Accelerated Canvas/WebGL' is the mode where things like CocoonJS extensions and other additional functional are enabled for use. This is the generally recommended mode for Phaser to run in, but also introduces a number of problems, as you've found out the hard way. However, the good news is that Phaser 1.2 has fixes for many of the known problems. (And I've personally written two libraries to fix other ones.)

 

Unless you really need a version before 1.2 (2.0), I recommend just waiting for the new Phaser version.

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...