Does margins effect..

0 favourites
  • 12 posts
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • Do margins effect the way the layout is displayed on a mobile device as at the moment I have been exporting using cocoonjs and crosswalk to test and they both come out perfectly height wise but on the width there is a 1cm gap line on the right side of screen where u can see the goings on behind the game level.

    my margins are set to H- 500, W- 500

    My layout size is 1024 - 576, I set it to this so it is 16:9 ratio to hopefully support more screen sizes.

  • From the manual:

    [quote:24rkfono]Margins

    The size, in pixels, of the margins. The margins are the grey areas outside the layout area. This only affects the Layout View and has no effect when previewing.

    So they seem to only be a workplace decoration.

  • Ye the part which threw me when I read the manual was where is says it only affects the layout view and had no effect when previewing, but didn't know if that meant it still effected it when exported.

    Ok thanks for the reply it may be down to something else then.

  • Do you know what the aspect ratio of your mobile device is? If it's a 16:10 and your project gets scaled to match the height it looks like there would be a gap similar to what you mentioned.

  • ye the device uses a 16:9 ratio, also if the ratio was wrong wouldn't there be gaps on both sides of the screen not just the one side.

  • It seems like the gaps should appear on both sides. I recall reading something about settings that cause the layout to be drawn from the upper left, but of course I can't find it now.

    I was re-reading through this tutorial and it sure sounds like it's an issue of aspect ratio: (Other than the gap is on one side.)

    https://www.scirra.com/tutorials/73/sup ... reen-sizes

    [quote:143056tt]This is the same problem faced by TV producers. There are many TVs out there using aspect ratios of 4:3, 16:9 and 16:10. If a producer films a TV show only in 4:3, on a 16:9 TV there will be gaps at the sides, or possibly even unintended off-set equipment and crew visible! Similarly, if you draw a background exactly fitting one display, then run it with Scale outer mode on another display with a slightly different aspect ratio, gaps will appear at the side or content outside the layout becomes visible. This can even happen if you simply don't take in to account the space taken up by the status bar on devices like the iPhone.

    There are two ways to solve this problem:

    1) Use Scale outer mode, and draw your backgrounds wider (or taller, depending on orientation) than the window size, past the normally viewable edges, to ensure no gaps ever appear regardless of the device aspect ratio.

    2) Use Scale inner mode, and make sure nothing important is close to the edges, since the edges are susceptible to being cut off on different size displays.

    You might try the solutions offered just to see if it changes anything.

  • Thanks for finding the above^ I will try the solutions.

    One thing that is weird is its not just a black bar on the one side you can actually see through it like as if the viewport is overlapped the layout so you can see behind the level.

    But I swear on older versions of construct you could change the viewport width and height, as well as layout size but I may be wrong.

  • You still can. Which led me to this:

    [quote:1trzanri]layer.viewLeft

    layer.viewRight

    layer.viewTop

    layer.viewBottom

    Defines the rectangle of the currently visible viewport. This may be larger or smaller than the canvas size if the scale is not 1.0.

    You don't have a scale set to below 1.0 do you?

  • ah now that I didn't know I will check this now I think this may be the problem.

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Worked a treat!

    Think I accidentally set the scale below 1.0, its all ok now, much appreciated for all your help!

  • Glad you found it!

    FYI: I take Fish-n-Chips tips!

  • lol

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)