Setting layer scale below 1 causes screen flash.

0 favourites
  • 2 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Problem Description

    Zooming out on a layer by setting the layer scale value to anything less than 1 causes the screen to flash on start of layout. Values above 1 work perfectly.

    Attach a Capx

    https://www.dropbox.com/s/abjillm9tmfe1fy/Max%20Zoom%20For%20Levels.capx?dl=0

    Description of Capx

    Cycle back and forth through all the levels and the start screen. Levels 2 and 4 will flash upon starting because they have layer scale values below 1. The problem also transfers to the exported project.

    Steps to Reproduce Bug

    • Step 1 System>set layer scale .25 (the screen will flash upon this layer's start when cycling through levels)
    • Step 2 System>set layer scale 1.5 (the screen will NOT flash upon this layer's start when cycling through levels)
    • Step 3 System>set layer scale .75 (the screen will flash upon this layer's start when cycling through levels)

    Observed Result

    The screen flashes when the layer is zoomed out.

    Expected Result

    A smooth transition from level to level when the layer is zoomed in and out.

    Affected Browsers

    • Chrome: yes
    • FireFox: I don't have
    • Internet Explorer: yes

    Operating System and Service Pack

    Mac Parallels

    Windows 7 64 bit service pack 1

    Construct 2 Version ID

    r243

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I definitely see what you are talking about... it looks (to me) like C2 is adjusting the global layer - stretching it out to compensate for the shrunken layers, and there is a split second when there is nothing to display around the edges of the background sprite. You can clearly see the "Back and Next" arrow sprites at the wrong location for a tick when level 2 is displayed.

    so, I tried over-sizing the background sprite way beyond the edges of the HUD layout and that seemed to help (not completely but was noticeably better - although you could still see the controls at the wrong place, but there was less flash). Obviously, you would have to know in advance how much you were going to shrink a layer and oversize the background image enough that there was something to display until the global layer is properly in place.

    I Also tried making new background layers on all the layouts (kind of defeats the purpose of a global layer) to see if local background layers would not suffer the same stretching effect. That didn't help. I also tried putting a wait 0 before you change the scale at start of layout to make that the last thing it does on the current tick - hoping that the global layer would get in place first. But that didn't solve the problem either and then you could see objects snapping to their new size.

    so, I don't think there is anything else you can do. Over-sizing the background image gave the best result. One other thing I did was make the controls invisible on the global layer, and then in the common event sheet (event sheet - rules) in the start of layout section I put a wait 0, then made the controls visible. (I put them all in a family so I could do it with one action). That helped with seeing the controls in the wrong place for a tick most of the time (although I still did occasionally see them at the incorrect location).

    Those two things make it barely acceptable (most people would not notice), but still not the solid behaviour you would expect.

    I don't know it Ashley will feel this is a big enough issue to do anything about it - and it may be a case where the cure is worse than the problem...

    if you want to see my version: http://www.rieperts.com/games/forum/zoomtest.com

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