CocoonJS plugin updates

Discussion and feedback on Construct 2

Post » Fri Nov 21, 2014 12:52 pm

Hi @Ludei,

Thanks for the information, that makes sense - it also explains the issue.

I compared which of my old app versions were compiling correctly, and which weren't. As soon as my project moved from Box2D to CocoonJS Native Physics, it stopped working. It was causing the Ludei logo to flicker indefinitely, but only in the compiled project, not in the launcher from the Play Store.

You know why? Because I didn't tick Box2D (or may have at one point unticked it) in the Configuration of the compiler. I am officially an idiot.

It's all working now - thanks to yourself and @ArcadEd for your assistance.
B
4
S
1
G
3
Posts: 21
Reputation: 1,017

Post » Tue Nov 25, 2014 6:30 pm

@Ludei, I tried to disable lazy loading but could not find the words referring to it, the nomenclature changed or am I looking in the wrong file? Where do I disable lazy loading?
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

Post » Tue Nov 25, 2014 10:55 pm

Hi @vitorfgd
search on the c2runtime.js file

"img_["cocoonLazyLoad"] = true;"

and set the value to false
this will disable lazy loading
B
6
S
1
Posts: 62
Reputation: 578

Post » Wed Nov 26, 2014 5:54 am

For some silly reason I can't seem to get WebStorage to retain saved data such as Local Values with CJS 2.1.1 but it works just fine in version 2.1 .. something happened in the latest CJS update to break WebStorage compatibility (or I'm just doing it wrong, but it worked fine all this time heh).
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Wed Nov 26, 2014 8:49 am

I think one of the biggest issues now with the 2.1/2.1.1 compiler is that in iOS 8's WKWebView, you can't use any ajax requests!
Due to Apple's bug, the file:// protocol isn't working properly. Ludei's solution was to open an internal web server and load the files through 127.0.0.1, causing all server requests to be denied due to cross domain restrictions.

This has forced me to keep working with the 2.0.2 compiler, unfortunately...

I've filed a bug at Ludei's support site, this is a very big blocker on all server data based games.
B
17
S
7
G
1
Posts: 157
Reputation: 1,878

Post » Wed Nov 26, 2014 9:44 am

Hello,

vitorfgd wrote:@Ludei, I tried to disable lazy loading but could not find the words referring to it, the nomenclature changed or am I looking in the wrong file? Where do I disable lazy loading?


Sorry for the inconvenience. It seems there is a change in the name of the feature, but it was not from our side.

mollaq wrote:search on the c2runtime.js file

"img_["cocoonLazyLoad"] = true;"

and set the value to false
this will disable lazy loading


Yes, this is how it currently works. Thanks a lot for the contribution.
Please, remember not to use the minified version.

Silverforce wrote:For some silly reason I can't seem to get WebStorage to retain saved data such as Local Values with CJS 2.1.1 but it works just fine in version 2.1 .. something happened in the latest CJS update to break WebStorage compatibility (or I'm just doing it wrong, but it worked fine all this time heh).


Could you please send us a test case so we can have a look at the issue? We didn't change anything from the 2.1 to the 2.1.1 regarding webstorage. If possible, please, use our community.

trueicecold wrote:I think one of the biggest issues now with the 2.1/2.1.1 compiler is that in iOS 8's WKWebView, you can't use any ajax requests!
Due to Apple's bug, the file:// protocol isn't working properly. Ludei's solution was to open an internal web server and load the files through 127.0.0.1, causing all server requests to be denied due to cross domain restrictions.

This has forced me to keep working with the 2.0.2 compiler, unfortunately...


Excuse me but why the 2.0.2? There is not a iOS Webview+ in the 2.0.2 and you can use Canvas+ and the System Webview in the 2.1.1 too, so why do you use the 2.0.2? We are aware about that bug, but it is a difficult issue to solve. We are still working on it. However, it is a better solution to use the 2.1.1 and another enviroment if you think the Webview+ for iOS is a trouble.

Regards.
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Wed Nov 26, 2014 10:11 am

ludei wrote:Could you please send us a test case so we can have a look at the issue? We didn't change anything from the 2.1 to the 2.1.1 regarding webstorage. If possible, please, use our community.


Already did.
http://support.ludei.com/hc/communities ... at-startup

I think it's related to you opening a internal web server and loading the files through local IP... but in 2.1.1 it may have a dynamic port/IP which 2.1 does not. v2.1 works just fine.

C2's implementation of WebStorage depends upon the port & IP on startup, if these change from prior launches, the WebStorage resets or makes a new/default entry.

Anyone who has tested the preview on Chrome or over Wi-Fi has encountered this problem before if they have a dynamic IP or port.

If you want a test case, just make a quick save using global variables and WebStorage to save & recall a top score. Exit the game and restart your iPad, then launch the game again to see if it recalls that save variable. You'll see it working fine in v2.1 (cloud compiled and xcode provisioned not launcher based) but not in v2.1.1!
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Wed Nov 26, 2014 1:41 pm

@Ludei

I have checked alpha version of my simple platformer on Android. It works perfectly on Canvas+ and gaves white screen on WebView+. Paradoxally this game works slower on my PC (Chrome) than on weak mobile with Canvas+. So thanks for all your job and efforts.

The only minus is that my mobile gets warm quite fast :)
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Post » Thu Nov 27, 2014 11:11 am

Hello,

Silverforce wrote:
ludei wrote:Could you please send us a test case so we can have a look at the issue? We didn't change anything from the 2.1 to the 2.1.1 regarding webstorage. If possible, please, use our community.


Already did.
http://support.ludei.com/hc/communities ... at-startup

I think it's related to you opening a internal web server and loading the files through local IP... but in 2.1.1 it may have a dynamic port/IP which 2.1 does not. v2.1 works just fine.

C2's implementation of WebStorage depends upon the port & IP on startup, if these change from prior launches, the WebStorage resets or makes a new/default entry.

Anyone who has tested the preview on Chrome or over Wi-Fi has encountered this problem before if they have a dynamic IP or port.

If you want a test case, just make a quick save using global variables and WebStorage to save & recall a top score. Exit the game and restart your iPad, then launch the game again to see if it recalls that save variable. You'll see it working fine in v2.1 (cloud compiled and xcode provisioned not launcher based) but not in v2.1.1!


Thanks for publishing it at the community, we will have a look at it. However, I would like to remind you how a bug should be reported at our community: http://support.ludei.com/hc/en-us/articles/203459717-How-to-report-a-CocoonJS-bug
As it is said in the article, every new bug report should have a test case attached that reproduces the problem and should be drafted with the "bug report template". If you don't follow these steps, the process will be much slower.

Regards.
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Thu Nov 27, 2014 11:31 am

ludei wrote:
trueicecold wrote:I think one of the biggest issues now with the 2.1/2.1.1 compiler is that in iOS 8's WKWebView, you can't use any ajax requests!
Due to Apple's bug, the file:// protocol isn't working properly. Ludei's solution was to open an internal web server and load the files through 127.0.0.1, causing all server requests to be denied due to cross domain restrictions.

This has forced me to keep working with the 2.0.2 compiler, unfortunately...


Excuse me but why the 2.0.2? There is not a iOS Webview+ in the 2.0.2 and you can use Canvas+ and the System Webview in the 2.1.1 too, so why do you use the 2.0.2? We are aware about that bug, but it is a difficult issue to solve. We are still working on it. However, it is a better solution to use the 2.1.1 and another enviroment if you think the Webview+ for iOS is a trouble.

Regards.


I've just realized the magnitude of my stupidity, I could just go with 2.1.1 and "WebView" instead of WebView+... nonetheless, I still have to compile twice, one for Android and WebView+ and one for iOS and WebView.
B
17
S
7
G
1
Posts: 157
Reputation: 1,878

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: tarek2 and 7 guests