Issue with canvas resizing and layer scale rate

  • Problem Description

    Issue with canvas resizing and layer scale rate

    Attach a Capx

    http://headbangames.com/canvasresize.capx

    Description of Capx

    Changing window/canvas size and scaling the layout while using low quality scaling for resolution selection.

    Steps to Reproduce Bug

    • Click the screen to change window/canvas size and layout scale, objects are aligned correctly on all canvas sizes.
    • In the editor, change the scale rate of one of the layers to say 70%.
    • Try again.

    Observed Result

    layers are only aligned when layout scale is 1, on other scales they're not aligned, it even affects the other layers with 100% scale rate.

    Expected Result

    Layers should keep the same position and size, regardless of layout scale.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10.0.15063 Build 15063

    Construct 2 Version ID

    r244

  • I think it's actually working correctly. You're changing the layout scale but have bounded scrolling enabled; that causes scrolling if it can't fit everything naturally, which is particularly likely when you use a smaller scale like 0.5. If you enable unbounded scrolling for the layout it then keeps everything centered, and just the layer with the adjusted scale rate changes size, which is to be expected since you are changing the layer scale but have adjusted the rate at which one of the layers scales relative to that.

  • So if I disable bounded scrolling and limit the scrolling manually to the layout (using the main layer as reference) it should work?

    I will play around with it.

  • Ashley

    I tried it now and still, once I change the layer scale rate of one of the layers, it shows up differently in each layout scale.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, it will have a different scale each time you change the layout scale, because you changed the layer's scale rate.

  • Ashley Thanks for the clarification, I was sure it was relative to the layout scale.

    So just to make sure, the only solution for me is to set all layers to 100% scale-rate and then set the scale manually in the run-time (higher scale for lower scale-rate layers)?

    Basically I want the main layer to be 100%, and the background (layers) are ranging from 100% or 150% for different depths, I used lower scale-rate to achieve this when I used a fixed layout scale and canvas size.

  • Yes, just manually set the layer scales. The scale rate just applies an automatic scale depending on the overall scale (which includes layout scale, hence layers change scale when you change the layout scale).

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