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

Author Topic: Afterimages while fast scrolling screen  (Read 3632 times)

0 Members and 1 Guest are viewing this topic.

underww

  • Newbie
  • *
  • Posts: 34
    • View Profile
Afterimages while fast scrolling screen
« on: January 08, 2014, 12:38:38 pm »
While scrolling the game screen, it isn't clear because of afterimages.

It is not a serious problem but, I want to fix this.

I guess this problem related with double buffering.

I'm already using vertical sync, but it doesn't help to fix this problem.

I'm using sf::View to scroll the screen.

Here's some sample code.

// view.move(0.f, 1.f); // this works well
// view.move(0.f, 2.f); // this works well too
view.move(0.f, 3.f); // the problem happens here

window.clear();
window.setView(view);
window.draw();
window.display();
 

Thanks :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10838
    • View Profile
    • development blog
    • Email
Re: Afterimages while fast scrolling screen
« Reply #1 on: January 08, 2014, 01:16:58 pm »
Can you explain further what you mean with "afterimages", i.e. can you post a screenshot?

Do you have an Intel graphics card? If not what's your GPU and which OS do you use?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

underww

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Afterimages while fast scrolling screen
« Reply #2 on: January 08, 2014, 01:44:35 pm »
Sorry for my lack of explanation.

I have a Geforce graphics card (GTX 650 Ti Boost) and use Windows 8.1 x64.

And I use SFML 2.1 stable version and latest build.

It is a bit hard to explain. It's similar to screen tearing and flickering issues.

While scrolling the screen quickly, images are a blur.

And I found that it looks because of the image before clear the window.

So I think it is a problem related with double buffering.

It can't be captured in a screenshot, but when it happens I can see.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Afterimages while fast scrolling screen
« Reply #3 on: January 08, 2014, 01:47:36 pm »
Do you strictly adhere to the clear-draw-display cycle, in exactly this order and with no exceptions?

Might it just be that your framerate is too low, so that the eye doesn't observe the movement/scrolling as smooth? What if you enable VSync?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

underww

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Afterimages while fast scrolling screen
« Reply #4 on: January 08, 2014, 01:59:49 pm »
Yes, I use VSync and framerate is 60.
I can say it is not about clear-draw-display cycle problem.

It doesn't happen with low speed scrolling.
Like an example code, 1.0f ~ 2.0f move per frame is very clear.

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: Afterimages while fast scrolling screen
« Reply #5 on: January 08, 2014, 02:22:33 pm »
Are you maybe just observing the inherent property of a monitor in that it is adapting pixel colors slowly to the requested value? Maybe try a better monitor?

underww

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Afterimages while fast scrolling screen
« Reply #6 on: January 08, 2014, 02:33:54 pm »
Ok, Thanks for replying everyone.
I thought it can be handled with triple buffering or other techniques.
But as you said, it may the problem with hardware such as a monitor.
I will test it on other systems later.

Raincode

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Afterimages while fast scrolling screen
« Reply #7 on: January 08, 2014, 03:08:20 pm »
Just saying, in case this is how you did it, I remember reading using Vsync and setting a limited framerate via SFML isn't a good idea...

Kind Regards

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10838
    • View Profile
    • development blog
    • Email
Re: Afterimages while fast scrolling screen
« Reply #8 on: January 08, 2014, 03:21:25 pm »
You might want to create a minimal example that reproduces the artifacts, so we could see if it's the code and if not test it on our ends. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: Afterimages while fast scrolling screen
« Reply #9 on: January 08, 2014, 07:55:48 pm »
I had issues my self similar to theese my gpu was set to force some stuff like motion blur etc...
Thus giving me unclear screen when moving view fast.
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0