Exporting with cocoonjs

Discussion and feedback on Construct 2

Post » Wed Nov 27, 2013 3:29 pm

when I export with the cocoon, I select the "Scale Letterbox" mode in the construct, and the cocoon (ludei) site, has three more choices: Scale to fill, Scale to fit, Strecht to fill, but I've tested all three and still keeps popping up what's underneath the layer, for example, my application is in 800x480 resolution. and the orientation is Landscape Left to choose.

Anyone know how to make the cocoon does not display those parts that are out of 800x480?
B
3
Posts: 3
Reputation: 231

Post » Wed Nov 27, 2013 3:50 pm

Scale letterbox will expose your 'outside layer elements' if the target device has a bigger/unfitting resolution then your project view resolution.


Scale inner scales to fit to the smallest side, meaning you could end up having a part of your layout outside the users target devices viewport.

Stretch to fill actually stretches your project view to adapt itself to fit in the target screen , taking on its ratio, often problematic for objects placed in a HUD.

I set construct generally scale outer, and have about 20% of extra background around my viewport to fill empty spaces from resolution/aspect ratio differences.
This way they will just see a bit of extra background and no black lines.
This means it will scale the size of your project view until its widest size matches the width of the target device.

This is as close to an easy solution I got for an approach of 1 fits all.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Wed Nov 27, 2013 3:57 pm

@PedroPH

CocoonJS does not support Letterbox, so even if you select 'Scale Letterbox' in C2, then CocoonJS anyway uses "Scale Outer"

good solution is to make layout bigger than Window Size,
make background fitting those layout size
and then, on layout start, use ScrollTo in the center of layout,
so even if there will be another aspect ratio, or another resolution
(i.e. 800x480 vs. 853x480) your app will show nicely in the centerszymek2013-11-27 15:59:03
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Wed Nov 27, 2013 4:05 pm

@ Lennaert

Thanks for the instructions, was of good help.


@ Szymek

Could you explain me how does pro layout stay downtown more clearly? And thanks for the help.
B
3
Posts: 3
Reputation: 231


Return to Construct 2 General

Who is online

Users browsing this forum: zenox98 and 9 guests