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

Author Topic: Weird black line above sprite  (Read 3776 times)

0 Members and 1 Guest are viewing this topic.

SGauvin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Weird black line above sprite
« on: March 22, 2017, 01:40:08 am »
My friend and I are making a 2D game engine, and we came across what we think is a bug.
http://imgur.com/a/aekoW
In the picture, you can see a black line that shouldn't be there. Under the black line is a background sprite, moving with the rest of the level. To make it look like the sky of the background is infinite, we simply do this :
m_window.clear(sf::Color(254, 220, 200));

This is why the color above the background sprite is pink too.
We don't understand why there is this black line. It is not always there. It only appears when the sf::View is at certain vertical positions, so when jumping, the line is flickering. But if the player only moves horizontally, the line doesn't flicker.
Does anyone know why this is?
Thank you very much :)
« Last Edit: March 22, 2017, 01:43:13 am by SGauvin »

iride

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Weird black line above sprite
« Reply #1 on: March 22, 2017, 06:51:21 am »

SGauvin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Weird black line above sprite
« Reply #2 on: March 23, 2017, 02:09:22 am »
Thank you :)
I finally fixed it using a RenderTexture

 

anything