CocoonJS plugin updates

Discussion and feedback on Construct 2

Post » Sun Jul 12, 2015 11:00 pm

@ludei

One other question: how do we show 'test' ads with the ATP Ads plug? Really not a good idea to be displaying real ads on a dev version. :|
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 13, 2015 9:25 am

Mamajuano wrote:
ludei wrote:
Remove the whitelist plugin. You are using Canvas+ :). It is not necessary there but if you create a project, it is added by default.


Sorry @Ludei, removed whitelist plugin and get new error:

With "www" folder:

Image Image

Without www folder:

Image Image

Trying Webview+ and the zip without www folder, loads ok.


Did you use the box2d web physics?

TiAm wrote:@ludei

Suggestion: Make a thread about the C2 Atomic plugs and post it in this forum:

work-in-progress-addons_f183

Would make it a lot easier to find them, because google is of limited use (all it wants to show is the old cocoonJS omni-plugin).


Thank you for the suggestion. In any case, the link to the plugins is on my signature ;). Just under the picture.

TiAm wrote:@ludei

One other question: how do we show 'test' ads with the ATP Ads plug? Really not a good idea to be displaying real ads on a dev version. :|


Which ad network?
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Mon Jul 13, 2015 12:47 pm

@Ludei. Yes, im using box2d.web
B
22
S
5
G
1
Posts: 28
Reputation: 1,706

Post » Mon Jul 13, 2015 1:10 pm

Then, please, post the issue in our forums and provide the test case, because we didn't encounter that problem when testing.

https://forums.cocoon.io/c/problems-troubleshooting

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

Post » Mon Jul 13, 2015 5:11 pm

@ludei

Using AdMob.

Also, the ATP Ads plug makes C2 projects crash on preview, or any platform that is not Cocoon. This is because plug references the Cocoon.Ad object without testing if it exists. I patched the plug by adding this code to the 'instanceProto.OnCreate' function:

Code: Select all
         
//Don't run if not on correct platform, or if cocoon undefined
if (!(this.runtime.isAndroid || this.runtime.isiOS))
return;
if (typeof Cocoon == 'undefined')
return;
Last edited by TiAm on Mon Jul 13, 2015 7:27 pm, edited 2 times in total.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 13, 2015 5:15 pm

ludei wrote:Thank you for the suggestion. In any case, the link to the plugins is on my signature ;). Just under the picture.


Just FYI, in FF/Chrome your sig image is so big that the div has to be scrolled to see the ATP link...might want to shrink the sig image a bit. ;)
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 13, 2015 5:48 pm

@ludei, the project test that im trying to compile is one with 2 simple sprites with physics. I dont know what is happening.
I also have tried to compile the pinball capx of @basictribe but again the same problem, black screen in normal compile, and in developer the same error of last screens ive posted.
I dont know what im doing wrong. I have exported @basictribe capx with cordova without touching nothing, exactly as it downloads, edited c2runtime.js to add the fix for 1/4 screen, then in cocoon i have created new project from zero. Selected fullscreen, landscape, and canvas+ for android. Deleted whitelist plugin, save changes on all sections and compile.

Here are the apk. developer app, and zip. I think is my mistake but i cant find it. :|

Developer app: https://www.dropbox.com/s/8yytdnoyjyrnzhi/android-armv7-debugDEVAPP.apk?dl=0
Zip: https://www.dropbox.com/s/2rg1v5co3duncrw/basictribezip.zip?dl=0
Normal apk: https://www.dropbox.com/s/wuhm5hga2hfyhmo/android-armv7-debugNORMAL.apk?dl=0
B
22
S
5
G
1
Posts: 28
Reputation: 1,706

Post » Mon Jul 13, 2015 7:25 pm

@ludei

EDIT: Tried with a zip file, and everything is working. Must be a prob with wifi preview. I did have to structure the zip differently than for the cloud compiler; see the post after this one.

Tried the dev app today...and ran into a pretty bad bug.

C2's "On Layout Start" trigger doesn't ever seem to fire in the dev app, even though normal exports work fine. This basically make the dev app useless ATM, since any logic under that trigger won't fire.

This happens in Canvas+ AND Webview+.

Any idea what could be amiss here?
Last edited by TiAm on Mon Jul 13, 2015 11:33 pm, edited 2 times in total.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Jul 13, 2015 11:20 pm

For those who are wondering, here's how to format and zip your exported project so it will run in the cocoon.io dev app. The file structure recognized by the cloud compiler won't work:

    1. Export from C2, make sure minify is disabled. Atomic plugs don't play nice with it yet.

    2. Delete the 'config.xml' file in the resultant folder.

    3. Zip up the contents of the export folder, not the folder itself. If you do it right, 'index.html' will be in the root dir of the zip file.

    4. Put the zip on your device, open dev app, go to the 'Documents' tab, navigate to the file and select it. Three buttons will pop up at the bottom of the screen: 'Canvas+', 'Webview+', and 'Webview'. Select your preferred environment, and away you go.
Last edited by TiAm on Wed Jul 15, 2015 8:35 pm, edited 1 time in total.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Jul 14, 2015 10:24 am

Hello!
I need to add padding on top of that my game was in the center. Canvas + does not support letterbox scale.
What do I need to add code to appear on top of padding?
B
3
S
1
Posts: 5
Reputation: 575

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests