Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Odd stripes on different monitors  (Read 3895 times)

0 Members and 1 Guest are viewing this topic.

Grundkurs

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Odd stripes on different monitors
« on: February 03, 2020, 08:16:32 am »
Hey there,
I uploaded a picture where you can see the same program running on two different machines. The violett/blue background with the subtle sloping lines is intended and tile-based. The monitor in the background works perfectly fine, however it produces this strange stripes when running my sfml-based game. I don't know where to start for looking into a possible solution of the problem. Is this monitor-related, SFML-related or OpenGL-related?
« Last Edit: February 03, 2020, 08:58:49 am by Grundkurs »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10829
    • View Profile
    • development blog
    • Email
Re: Odd stripes on different monitors
« Reply #1 on: February 04, 2020, 09:00:30 am »
Are you moving the tiles or the view in non-integer positions?

Is the resolution the same?
How are you placing the tiles?

Best would be if you could provide a minimal and compilable code that reproduces the problem.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Grundkurs

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Odd stripes on different monitors
« Reply #2 on: February 10, 2020, 08:43:34 pm »
Are you moving the tiles or the view in non-integer positions?

Is the resolution the same?
How are you placing the tiles?
I use the same resolution on both monitors (Full HD); However the size of sf::View is set to 800 x 600. Setting the Size to the native resolution does not make any difference.

i did try to place the tiles in integer positions and float positions, also the FloatRect that creates the current view, and tried all combinations
(tile-positions in int, viewRect int,
tile-positions in float, viewRect int,
tile-positions in float, viewRect in float
tile-positions in int, viewRect in float), unfortunately to no avail.

Because i could not get rid of the stripes no matter what i did, i loaded my tileSheet-Texture to the original code from SFML Game Development By Example by Raimondas Pupius  and with the code from the book (1:1) it did reproduce the stripes (see Screenshot SFML-Bug). So the "bug" as i encounter it is also present in the original code from the book.
Unfortunately i could not build a minimal build this weekend, i will try it the next weekend. However maybe you know the code from Raimondas Pupius (https://resources.oreilly.com/examples/9781785287343/tree/master/SFMLGameDevelopmentByExample/B04284_11_code), it produces the same results :-/

I did plug in another monitor on my Gaming-PC where the Stripes occure and the stripes persist also on the new Monitor.

Also i made another strange observation:
I did place a red vertical line just one pixel beyond the Tile-Size (Screenshot SFML Bug 2), so basically the red Line should never be displayed.

However when i zoom into a screenshot with MS-Paint of the running application (SFML Bug 3) i can see clearly that one red horizontal Line is fully drawn (alpha-channel most likely at 255)  and the next "wrong" displayed horizontal line is not fully red anymore. This behaviour doesnt make any sense...how can it be that the second red line - that should not be drawn in the first place - is displayed darker than the first red line?

Still: This "bug" only affects my Gaming-PC with a Vega56 Graphics card. I don't have the stripes-Issue on my Notebook (GTX 1050 tii) and another Notebook (integrated Graphics).

Edit: I installed Linux on a virtual machine running on my Gaming PC. There are no stripes Issues, though its running on the same hardware. So it may be some issue with SFML?
« Last Edit: February 11, 2020, 09:01:09 pm by Grundkurs »

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Odd stripes on different monitors
« Reply #3 on: February 11, 2020, 10:30:28 pm »
If it's working on one operating system with one set of drivers but not on another with another set of drivers, it could be a faulty graphics card driver. It's worth updating the driver fully anyway but certainly on the one that is having the problem. If it's still having a problem, it's possible that that driver for that operating system just hasn't been fixed yet :-\
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Grundkurs

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Odd stripes on different monitors
« Reply #4 on: February 12, 2020, 10:56:15 pm »
If it's working on one operating system with one set of drivers but not on another with another set of drivers, it could be a faulty graphics card driver. It's worth updating the driver fully anyway but certainly on the one that is having the problem. If it's still having a problem, it's possible that that driver for that operating system just hasn't been fixed yet :-\

thank you so much, you saved my day! I installed the newest beta drivers for my vega56 card. -> Stripes were still present. I uninstalled the Graphics-Drivers completely with DDU (Display Driver Uninstaller): Now the Stripes were only present when moving the camera, but dissapeared when standing still (at least an improvement). Now i again installed the newest beta drivers -> The Stripes finally completely dissapeared! So it actually was a Driver-Issue as you suggested!

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Odd stripes on different monitors
« Reply #5 on: February 16, 2020, 02:57:59 pm »
You are welcome. Glad it helped!
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*