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

Author Topic: vSync sf::View bug (SFML 2.0)  (Read 2433 times)

0 Members and 1 Guest are viewing this topic.

schmitty

  • Newbie
  • *
  • Posts: 6
    • View Profile
vSync sf::View bug (SFML 2.0)
« on: November 07, 2012, 10:25:33 pm »
I am having a strange bug when Vsync is enabled and the view follows the player in my 2D game.

When Vsync is enabled, and the view's center is set to the players position each frame, the player jitters back and forth when receiving input commands. This only happens when Vsync is enabled, when the framerate is unlocked the player stays in the center of the screen as expected.  Any ideas what might be causing this?

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: vSync sf::View bug (SFML 2.0)
« Reply #1 on: November 07, 2012, 11:05:48 pm »
Sorry I've lost my magical crystal ball last year, so I'm unable to see your not provided code... ;D
On a serious note, you should always provide an example of what your doing, because in most cases it's not SFML or anything else related to the problem, but the programmer itself has made a for him not so obvious mistake. Also read this. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

schmitty

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: vSync sf::View bug (SFML 2.0)
« Reply #2 on: November 07, 2012, 11:10:13 pm »
Sorry I'm at work right now I will post my code when I get home. Thanks for the etiquette link.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: vSync sf::View bug (SFML 2.0)
« Reply #3 on: November 07, 2012, 11:13:00 pm »
I think I might have faced this problem actually, I'm not exactly sure now. Will have to dig into old(as in - solution for earlier visual) project to check it out.
Edit: Nope, converted and recompiled but I can't reproduce the bug I used to have, like it doesn't exist anymore.
Quote
Sorry I've lost my magical crystal ball last year, so I'm unable to see your not provided code... ;D
Lies! You still had it in august this year:
Quote
Depends on your code change which my magic ball unfortunatly refuses to show... ;)
« Last Edit: November 07, 2012, 11:42:17 pm by FRex »
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: vSync sf::View bug (SFML 2.0)
« Reply #4 on: November 07, 2012, 11:48:59 pm »
Quote
Sorry I've lost my magical crystal ball last year, so I'm unable to see your not provided code... ;D
Lies! You still had it in august this year:
Quote
Depends on your code change which my magic ball unfortunatly refuses to show... ;)
Hahaha lol ;D
Okay, okay I confess: I slipped the other day, it fell out of my hands and broke into two pieces. Tried gluing them together but it didn't work. :-\
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/