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

Author Topic: White line in Sprite..  (Read 3113 times)

0 Members and 1 Guest are viewing this topic.

Father_Sloth

  • Newbie
  • *
  • Posts: 48
    • View Profile
White line in Sprite..
« on: May 03, 2011, 07:00:19 pm »
Hey guys

Okay so I've recently started up again with sfml :) and have recently been noticing a slight glitch in my sprites..

So I've got a *really* simple game, in which the player moves around a melon. That's it. I've been using different file formats for the sprite, I've even been limiting my FPS and experimenting with that but still, remaining unsuccessful, have been getting a white line moving up the sprite. I tried taking a screenshot but it happens so fast and only now and again every 30 seconds.

Please can you show me where I might be going wrong :(

 - Simon

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
White line in Sprite..
« Reply #1 on: May 03, 2011, 10:36:10 pm »
For something like this we'll need a code sample.

Father_Sloth

  • Newbie
  • *
  • Posts: 48
    • View Profile
White line in Sprite..
« Reply #2 on: May 05, 2011, 09:15:16 pm »
Of what exactly? The part where i create the sprite/images or the part when i draw them?

 - Simon

p.s. sorry for the late response my internet went down :(

Roswell_r

  • Newbie
  • *
  • Posts: 12
    • View Profile
White line in Sprite..
« Reply #3 on: May 07, 2011, 02:17:08 am »
Just out of curiosity have you turned smoothing off? (it is on by default)

For me this will cause the sprite to have artifacts on it at certain times when moving it around on screen or just all the time. It happens in different cases, different hardware and different operating systems.

Try turning it off and seeing if that fixes it. Its part of sf::Image and the function is SetSmooth

Father_Sloth

  • Newbie
  • *
  • Posts: 48
    • View Profile
White line in Sprite..
« Reply #4 on: May 08, 2011, 11:16:37 am »
Thank you so much! That really helped, I just set my two moving images smooth to false and now all artefacts are pretty much gone (I say pretty much because there is still some lines but there not white and they happen less).

Do think it might of had something to do with the speed of movement?

 - Simon