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

Author Topic: Background image problems  (Read 1411 times)

0 Members and 2 Guests are viewing this topic.

bumblecorn

  • Newbie
  • *
  • Posts: 18
    • View Profile
Background image problems
« on: February 06, 2013, 07:08:11 pm »
I have an asteroids type game with a massive image for a background (6000x4000).  I have increased the area of the level by using two sf::Views, so you can move "outside" the screen area and it will track you until you reach the edge of the second View, hence the massive image.

Anyway, the problem is that there is some tear in the image when it's being updated, like a "ripple" going up the screen whenever the image is moving. This problem is only present when using the frame limiter function:

window.setFramerateLimit(60);

Without limiting the frame-rate there is no image tearing. Is this something I have to deal with, or is it an easy fix?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Background image problems
« Reply #1 on: February 06, 2013, 07:18:00 pm »
This effect is called screen tearing. Try to enable VSync.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

bumblecorn

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Background image problems
« Reply #2 on: February 06, 2013, 07:32:39 pm »
That did the trick, thank you! I had no idea there was a V sync function.

 

anything