GMS 2 Solved! Horizontal Lines on Backgrounds

Hello,

I use several backgrounds for parallax scrolling, and on each background, I see a horizontal line right where the transparency begins.

The issue has something to do with interpolating pixels and zooming in the view (my view size is 25% smaller than my view port) But it seems to be different than the commonly known "tile lines" problem when you don't add enough cushion to their border. My background layer y position is an integer, and so is my view y position.

As you can see, my background part is clean...

But in the game, I see this:

Someone else on the forums described the exact same problem I have, and the person managed to fix it him/her self, saying "I found that you cant skew the y coordinate of a background so much that the edge of the background is in the game screen. Doing so seems to create a line where the transparency ends." I don't understand what this person means by "Skew the y coordinate."

I use GMS:2
 

Attachments

PNelly

Member
I think these kinds of artifacts can show up depending on how images become organized on the texture pages, and which settings are applied to sprites and backgrounds on the texture pages. Check out the "texture pages" article in the manual and tinker with the settings for those backgrounds. You might also try placing a buffer of 1 or 2 blank pixels around those images, which can help prevent t-page artifacts from showing up when the images are scaled, kind of like the tile problem.
 

RangerX

Member
It still is because your view and port aren't the same size + interpolation is "on".
Are you doing this because you have a zoom feature in your game?
 
I think these kinds of artifacts can show up depending on how images become organized on the texture pages, and which settings are applied to sprites and backgrounds on the texture pages. Check out the "texture pages" article in the manual and tinker with the settings for those backgrounds. You might also try placing a buffer of 1 or 2 blank pixels around those images, which can help prevent t-page artifacts from showing up when the images are scaled, kind of like the tile problem.
I see... so perhaps even though I have transparency at the top of my background, the texture pages crop it, and they crop it too closely to other images? That would make a lot of sense. I'll tinker around with that later. Thanks!!

It still is because your view and port aren't the same size + interpolation is "on".
Are you doing this because you have a zoom feature in your game?
Exactly. It's a feature.
 
After a lot of work and frustration, I figured it out. I tried everything with the texture pages. I increased the buffer greatly but still lines. I even put those images in their own individual texture page. Still lines. What finally fixed it was when I noticed in the sprite properties a texture setting called "tile vertically." I turned off the setting and it finally worked. The lines I was seeing at the top of those images must have been from the bottom of those images.

Thanks for your help, getting me on the right track and all.

Oof. Time for bed.
 
Top