Web Preview and CocoonJS Preview

Discussion and feedback on Construct 2

Post » Tue Apr 30, 2013 4:48 pm

Hey!
Have you noticed a difference between the browser preview and the CocoonJS preview, for your games? Aside from obvious clipping/layout issues, certain graphics have been miss aligned. Physics objects are acting really weird, solids didn't react with solids anymore, and even background music doesn't start up sometimes.

Have you had any similar issues? Is this a known problem with the CocoonJS preview?

Thanks
B
50
S
14
G
12
Posts: 813
Reputation: 16,764

Post » Tue Apr 30, 2013 7:19 pm

Yes, I had a thread going the past couple weeks about an error I've been getting in cocoonjs where an image is completely missing in cocoonjs causing it to crash, but browser preview, HTML5, and EXE exports work fine; so there is an absolute difference in the way images are loading in cocoonjs and c2. Some sort of log/debugging tool for how images are loaded into cocoonjs would be very valuable.

By cocoonjs preview, you mean the loader app on android/ios, or is there a PC cocoonjs preview application, as this would really help save me the time of transfering the zip trying to get my bug fixed.
B
9
Posts: 59
Reputation: 997

Post » Tue Apr 30, 2013 9:33 pm

You basically summed up my issue. All other builds work just fine.

I am wondering if this is an issue with the Previewer and not the final compiler. Guess I could test that out tonight.
B
50
S
14
G
12
Posts: 813
Reputation: 16,764

Post » Tue Apr 30, 2013 9:42 pm

did you use cocoonJS launcher for iOS because i tested my game and the physics (some bullets, solids, pathfinders and more ..) are working quite well except the touch joystick control for 4player, thats a bit buggy sometimes.
also i have no issues with graphics but for now im just using coloured squares as tanks .. havent built in music yet ..
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Tue Apr 30, 2013 10:13 pm

Ive been fixing bugs and many other things the past two days. I will recompile it tonight and give it another shot.

I am using the Android app, CocoonJS Launcher on a Galaxy S2 running 4.1.2 JellyBean.
B
50
S
14
G
12
Posts: 813
Reputation: 16,764

Post » Wed May 01, 2013 1:27 am

You should try to isolate problems and report them to Ludei. We can't fix it for them, and they can't fix it if they don't know about it (I wouldn't expect them to find and deal with bug reports here.)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Wed May 01, 2013 1:33 am

Sorry to jack the thread, but it may be related.

For my issue, I got this response:

" I've tried your game in our platform and it doesn't work, Seems that your exported project is missing of some files or code, I think that this is related to Construct 2 and not to CocoonJS it self, if you are still having problem with this in the future i'll be glad to help you again. "

I know that it is assumed I have some sort of corrupted image in my project, but it still seems weird that this is an ambiguous error with absolutely no feedback as to which image it's crashing on.

[artists opinion, beware!] It seems like Construct2 and CocoonJS has a issue with the way they handle images, as everything works fine in all browsers I've tested, even mobile, and EXE export, but only CocoonJS is giving me an error specifically image related.

B
9
Posts: 59
Reputation: 997

Post » Wed May 01, 2013 3:24 am

Save the project as a folder and try exporting.

If it's already a folder, copy and paste it and try to export the newer one.

If that doesn't work, if you can pinpoint the image(s) missing from CocoonJS's compile, open them in photoshop/gimp/paint.net and re-save them.

If that doesn't work then it's something with the C2 CocoonJS compile or the code is causing issues with the compiler. Simpliest troubleshooting here is to use the copy that has the same issue, delete event sheets and have it start on a blank layout with all the assets on it and test that out, and if it crashes delete a couple them from the project until it stops crashing with CocoonJS.

If that doesn't work, then something is going seriously wrong with the exporter.


Also are you recrompressing the images or minifying the code?Thndr2013-05-01 03:25:46
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Wed May 01, 2013 4:18 am

I've gone and removed the image. It wasn't really needed anyway. The other graphical issues were from animations not destroying themselves after.

The only real issue I am noticing now is,
1) When I restart the layout the background music will stop playing. On a normal build it should continue playing.

2) I am still getting glitches in the physics department. Some times my ball will just leave the layout as if no boundaries are set. As well, sometimes it will jump right threw blocks. Odd!
B
50
S
14
G
12
Posts: 813
Reputation: 16,764

Post » Wed May 01, 2013 8:04 am

[QUOTE=Thndr] Save the project as a folder and try exporting.

If it's already a folder, copy and paste it and try to export the newer one.

If that doesn't work, if you can pinpoint the image(s) missing from CocoonJS's compile, open them in photoshop/gimp/paint.net and re-save them.

If that doesn't work then it's something with the C2 CocoonJS compile or the code is causing issues with the compiler. Simpliest troubleshooting here is to use the copy that has the same issue, delete event sheets and have it start on a blank layout with all the assets on it and test that out, and if it crashes delete a couple them from the project until it stops crashing with CocoonJS.

If that doesn't work, then something is going seriously wrong with the exporter.


Also are you recrompressing the images or minifying the code?[/QUOTE]

My major issue is not being able to pinpoint exactly what the image cocoonJs is trying to referance.

All of the PNG's were re-saved with a batch export in photoshop (all are psd, exported as png.), and all of those were saved into the construct\textures\.. folder, and all of them were imported again into construct (opened object in animation window, imported each png again) The issue can not be with the PNG files, there is an event or layout that is trying to reference an image file that is no longer there or renamed, as the cocoonjs error refers to a null image reference. I do not get any such error on exe or html5 previews/export in any browser.

I have tried with both compression and no compression, and minifying and non minifying, these are not related.

Like you said, I am deleting layout by layout and testing on cocoonjs to try and narrow down what part of the game could be resulting in the error. If I can't isolate it to a layout, I'll do it with the event sheets. I just wish there was a cocoonjs log that shows what image was attempted to be loaded that yielded a null reference. I'm not sure there is something wrong with the exporter, it's most likely specific to my project as ashley has already responded telling me that it's a corrupt image in my project. I was hoping to get some feedback and suggestions on how to somehow more quickly hunt down the cause of the null image reference, as I am loosing a lot of development time to trial and error debugging.
B
9
Posts: 59
Reputation: 997

Next

Return to Construct 2 General

Who is online

Users browsing this forum: alextro, Mirlas, wrighthill, Yura G and 16 guests