Virtual Resolution Management

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
franfox
Prole
Posts: 11
Joined: Fri Feb 09, 2018 3:48 pm

Virtual Resolution Management

Post by franfox »

Hi everyone,

I'm doing the CS50's youtube courses and in the early chapter 1 I've noticed that a simply task, like a make two images to scroll in parallax, is giving me a glitchy result. As you could see in the file attached, the background image is making some glitch while moving (you could see more clearly at the end on image).

I think is related to the Push library so I've tried to do it manually and I can't see this behavior. So I want to ask you guys if to manage the virtual resolutions are you using this library or another and why do you think this glitch happens.

Thanks!
bird.love.zip
(7.06 KiB) Downloaded 105 times
User avatar
pgimeno
Party member
Posts: 3674
Joined: Sun Oct 18, 2015 2:58 pm

Re: Virtual Resolution Management

Post by pgimeno »

I can't see any glitch.
User avatar
franfox
Prole
Posts: 11
Joined: Fri Feb 09, 2018 3:48 pm

Re: Virtual Resolution Management

Post by franfox »

pgimeno wrote: Fri Apr 13, 2018 3:57 pm I can't see any glitch.
Maybe it's a bit subtle but when the mountains are moving you can see isn't a soft movement, also you can notice it at the end of the image (when the screen goes black)
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Virtual Resolution Management

Post by ReFreezed »

I do see one glitch - not sure if it's the same as what you're seeing.
Fifty Bird glitch.png
Fifty Bird glitch.png (24.27 KiB) Viewed 3776 times
I've highlighted the issue which reminds me of screen tearing caused by Vsync, but it's happening diagonally. I've looked at the code and it seems to happen when the canvas (or "virtual screen") is drawn to the actual screen at 250% scale (which is what the game starts in if you don't resize the window). When resizing the window the glitch usually disappears but not at all window sizes.

Maybe there's a rounding issue somewhere in LÖVE or OpenGL, as I don't find anything weird in the push library that would cause this. All push is doing is allowing you to draw to a canvas which is then drawn to the screen at a certain position and with a certain scale. It's weird.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
pgimeno
Party member
Posts: 3674
Joined: Sun Oct 18, 2015 2:58 pm

Re: Virtual Resolution Management

Post by pgimeno »

Ah, I could see it by taking a snapshot. Thanks, ReFreezed. Indeed it looks like a rounding problem. That triangle is most likely the dividing line between the upper and the lower triangle of the quad (rectangles are drawn as two triangles).

I guess the main problem is the 50% part of the 250%. Rounding errors are more visible at the halves. I've had trouble drawing regular images at or near positions with a decimal part of 0.5.

https://bitbucket.org/rude/love/issues/ ... ing-images

Anyway, unless you work with integral multiples, those rounding errors are likely to appear.
User avatar
franfox
Prole
Posts: 11
Joined: Fri Feb 09, 2018 3:48 pm

Re: Virtual Resolution Management

Post by franfox »

Thanks guys! It's true you can solve the problem changing the display size to any virtual sizer round variations (x2, x3, x4) and not the current scale.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests