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

Author Topic: Youtube increases framerate? (!)  (Read 4213 times)

0 Members and 1 Guest are viewing this topic.

user123

  • Newbie
  • *
  • Posts: 12
    • View Profile
Youtube increases framerate? (!)
« on: May 08, 2015, 05:12:20 pm »
I am working on a simple game of mine, but I have run into a weird problem.
Using sleep() I am making sure that the game updates around 60 times a second.
I also set window.frameratelimit to 60.
Currently, I have no FPS counter implemented, but when I run the game, it runs terribly slow, something like 15-30 fps. When I open firefox, which is in NO WAY connected to my game whatsoever, and open youtube (does NOT work on other websites!) , and then I run my game, suddenly the framerate is super smooth.
I am using Visual Studio 2013 Express.
How is this possible?
How can something that is not connected to my game, affect its performance?
Is this a weird graphics card bug?
By the way, I am running my game using Local Windows Debugger button in my VS2013Express.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10837
    • View Profile
    • development blog
    • Email
AW: Youtube increases framerate? (!)
« Reply #1 on: May 08, 2015, 05:15:18 pm »
What version of SFML are you using? Can you provide a minimal and compilable example?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

user123

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: AW: Youtube increases framerate? (!)
« Reply #2 on: May 08, 2015, 05:26:58 pm »
What version of SFML are you using? Can you provide a minimal and compilable example?
I don't think I can provide a compilable example, it is ridden with custom classes, which would result into erros.
If I were to include those classes too, i'd  end up posting the full ~20 pages here, which isn't minimal.
How can I do that?
I am using version 2.2.0.1, I installed it using the NuGet button.(I tried 100's of times the manual way, too complicated)

Edit:
https://gist.github.com/anonymous/0254100bc8406fe6b0b2
Its a part of the int main().
I tried my best, I have no idea what to upload.
« Last Edit: May 08, 2015, 05:33:56 pm by user123 »

Geheim

  • Full Member
  • ***
  • Posts: 201
    • View Profile
    • Email
Re: Youtube increases framerate? (!)
« Reply #3 on: May 08, 2015, 05:38:32 pm »
I have had a similar issue with some older versions of SFML.
If nothing else than my game was open, it locked the frames at around 30, but as soon as I startet Google Chrome it was smooth again. Sometimes I have some weird performance issues with "low intense games", which normally run on every crappy computer.

Must be something with the computer itself, however I never figured out what causes the problem.
Failing to succeed does not mean failing to progress!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Youtube increases framerate? (!)
« Reply #4 on: May 08, 2015, 06:25:13 pm »
Related: http://en.sfml-dev.org/forums/index.php?topic=7750

I have never dug deeper, but I have the suspicion that this behavior might be linked to the system timer resolution, which is increased by certain applications or services. Especially Google Chrome was famous for its exaggerated use of high timer resolutions, draining battery life on laptops.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Youtube increases framerate? (!)
« Reply #5 on: May 08, 2015, 07:37:39 pm »
We fixed this a long time ago.

Quote
I am using version 2.2.0.1
Doesn't exist. Make sure that you read the SFML version, not the version of the NuGet package.
Laurent Gomila - SFML developer

user123

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Youtube increases framerate? (!)
« Reply #6 on: May 08, 2015, 07:55:01 pm »
Related: http://en.sfml-dev.org/forums/index.php?topic=7750

I have never dug deeper, but I have the suspicion that this behavior might be linked to the system timer resolution, which is increased by certain applications or services. Especially Google Chrome was famous for its exaggerated use of high timer resolutions, draining battery life on laptops.
It may be that. But when I let a friend download it, he can run it fine without running firefox.

user123

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Youtube increases framerate? (!)
« Reply #7 on: May 08, 2015, 07:55:43 pm »
We fixed this a long time ago.

Quote
I am using version 2.2.0.1
Doesn't exist. Make sure that you read the SFML version, not the version of the NuGet package.
How do I find out the real version then?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Youtube increases framerate? (!)
« Reply #8 on: May 08, 2015, 09:07:30 pm »
It's written in Config.hpp.
Laurent Gomila - SFML developer

user123

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Youtube increases framerate? (!)
« Reply #9 on: May 10, 2015, 12:30:20 pm »
It's written in Config.hpp.

#define SFML_VERSION_MAJOR 2
#define SFML_VERSION_MINOR 2

I am guessing I am running an outdated version

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Youtube increases framerate? (!)
« Reply #10 on: May 10, 2015, 03:48:03 pm »
Well, SFML 2.3 was released just a few days ago.
Laurent Gomila - SFML developer