Setting layer scale below 1 causes screen flash.

Report Construct 2 bugs here.

Post » Sat Mar 04, 2017 6:57 pm

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
B
39
S
18
G
5
Posts: 98
Reputation: 5,621

Post » Fri Mar 10, 2017 7:59 pm

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
B
94
S
33
G
20
Posts: 438
Reputation: 17,605


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests