Pixel Rounding "On" & Layout/Layer Scale Zoom with lerp bug!

Bugs will be moved here once resolved.

Post » Fri Feb 19, 2016 3:29 pm

Problem Description
Please take time to review this bug. When I make a Zoom Scene in my game before, I noticed that white lines would appear if you use LayoutScale Zoom with lerp and with "PIXEL ROUNDING TO "ON". I used lerp to make a smooth zoom and I also used "Layer(Dialog) Scale Rate Set to (0)" system action to maintain Layer / s scale rate to 0 so it won't zoom. In conclusion, If you use Layout or Layer Scale Zoom and if PIXEL ROUNDING is set to "ON" it will cause a white line appearing at the borders.

PS: The reason I set the zooming(Scene Mode) on the edges because the white lines (Bug) will only show if the camera(Scroll) is at the edge on smooth zooming.

Attach a Capx

https://onedrive.live.com/redir?resid=A ... ile%2ccapx

Description of Capx
If you use Layout or Layer Scale Zoom and if PIXEL ROUNDING is set to "ON" it will cause a white line appearing at the borders. The .capx is a fastly-made sample game I made to show the bug. Since it is a platformer game, move the player using the "left" and "right" arrow keys. If you reach the near edge of each side of the game then you will enter scene-mode and the white lines that are "bugs" will show.

Steps to Reproduce Bug
  • Control the Player by using the "Left" or "Right" Keys .
  • Go to any edge(side) of the game.
  • When you reach the left or right near-side or near-edge of the layout, SceneMode(Zooming) will commence and white lines will show(THE BUG).

Observed Result
As I said, White Lines in the edge of the screen will show, like borders when Pixel Rounding is "On".

Expected Result
Smooth Zooming without White Lines that makes it looks very glitchy and non-well made game.

Affected Browsers
  • Chrome: Yes
  • FireFox: Yes
  • Internet Explorer: Yes
  • Node Web Kit : Yes
  • Exported Android Crosswalk : Yes
  • Chrome Mobile : Yes


Operating System and Service Pack
Windows 8.1 64-bit Updated Drivers (WebGL supported) - Used device: Ultrabook & Mobile: Android Device

Construct 2 Version ID
Construct 2 version r222 Beta Version & r223 Beta Version
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Tue Mar 01, 2016 10:25 am

@Ashley - I've relinked the correct .capx file since the previous hyperlink directs to the backup .capx. Please check it again.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Sat Mar 05, 2016 3:34 pm

@Ashley, have you seen this bug report? I have a feeling that this is the only bug report that has not been resolved from Feb. 19, 2016 to the previous date. This bug really makes my game look unprofessional or badly made or buggy. If you can fix this as soon as possible, I'll be very grateful.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Sat Mar 05, 2016 4:12 pm

Its because you are trying to go into the "bounding" of the layout.
Set it to not bound and you will see why.
Your fix is to make your own bounding on the lerp.
clamp(lerp(),min value, max value)

If you want the object to go all the way to the corner you will have to fake your own bounding with black bars.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sat Mar 05, 2016 4:22 pm

I followed your way to fake the bounding with black bars but since my game is a rpg and has many layouts, which is a bit pain if I extend each background. I want to try your bounding fix.

But I did not understand how to implement this (clamp(lerp(),min value, max value))?

What would be the value for min val and max val?

@newt
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Sat Mar 05, 2016 5:33 pm

Actually, screw that.
Select the background layer, and set its color to black.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sat Mar 05, 2016 6:11 pm

newt wrote:Actually, screw that.


Lol. XD

newt wrote:Select the background layer, and set its color to black.


This will only work for games that has a black background. Since my game that has the problem comes with different colors, then this is not applicable. I have no choice but to manually extend the size of the background of each layout.

Btw. I think I can still say that this is a bug for which the layout scale only zooms not expand. So normally it shouldn't reach the outside edge of the window.

@Ashley?
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Sat Mar 05, 2016 6:27 pm

That would be a feature request.
Bounded scrolling set to adjust to scale.

I don't think that will have the desired effect.
It would just knock the boundaries back.
You still can't scroll to the corner.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Tue Mar 22, 2016 4:47 pm

Closing as not a bug. It is rendering correctly! I am not sure specifically which lines you are referring to, a screenshot would help to illustrate what you mean, but I see a horizontal line along the top of the terrain (TiledBackground2).

The line is not white: it is the color of the terrain. The terrain is a tiled background object, so its image wraps. The bottom row of pixels is all opaque, and at some floating-point zoom levels, there is a row of pixels at the top that partly wraps round to show the bottom row of pixels from the image again. These kinds of "seam" issues are common when you enable floating-point zoom or scrolling, since nothing exactly aligns to the pixels in the images. The only way to guarantee perfect alignment is with letterbox integer scale, pixel rounding, point sampling and simply not setting any float zoom levels like you do in your .capx.

An easier way to work around this though is just put a transparent row of pixels at the bottom of the terrain tile image. This means if it ever wraps to show the bottom row of pixels at the top of the image, they're invisible.
Scirra Founder
B
402
S
238
G
89
Posts: 24,629
Reputation: 196,025

Post » Wed Mar 23, 2016 2:36 am

@Ashley - You may have misunderstood the steps needed to show the bug. First, control the character using arrow keys to reach the end side of the layout(for example; right edge of the layout) then the Zoom will commence and on the edge of the window, white line will flash on the sides of the window, I think you are right that the cause of it is my floating-point zoom, but why does it "only show" when "pixel rounding" is "on".

I can't post a screenshot properly because "on zoom" white lines on the edge of the window is flashing (when I reach the edge of the layout when the zoom is in progress). But this actually only happens on Pixel Rounding is "on", well apparent when Pixel Rounding is "On".

----------------------------------------------------------
Since Float zoom level in my .capx is not good, how do I zoom properly without getting it to floating numbers but rounded ones?

Thanks for the check...

After several tries, I finally got a screenshot. (The lines were flashing from right and bottom of the window so I had to make 2 screenshots for each because I can't time it properly to capture both sides simultaneously). The lines are white so please view in a black background.

Album:
http://imgur.com/a/O5cCr
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests