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

Author Topic: Blue/Green lines appear when moving camera left/right inside a tilemap.  (Read 1011 times)

0 Members and 1 Guest are viewing this topic.

MrAlce

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
When I move the camera left/right some green/blue stripes appear.

With VGA screens nothing happens, but with HDMI screens always happens. I had been looking for help in older posts of this forum, and it seems to be an old SFML issue which could be "fixed" rounding the center of the camera to an integer value per frame.

This works great with pixel movement games, but im using box2d and the result of this its crappy.

This is how my game prototype looks without rounding the center of the camera:


And this is how it looks rounding the center of the camera (notice that the "cookie" shakes):


There is an option that fixes the problem of the lines and does not affect the precision of movements?
« Last Edit: September 19, 2022, 03:25:37 pm by Vestelion »

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: Blue/Green lines appear when moving camera left/right inside a tilemap.
« Reply #1 on: September 20, 2022, 12:33:05 am »
that can happen when tiles are sized as floats instead of integers
Visit my game site (and hopefully help funding it? )
Website | IndieDB

 

anything