I was writing up an engine the same way I always do but this time something odd is happening.
I'm using SFML and setting my framerate limit to 60.
When google chrome is open my game gets 60 fps, or whatever I set it to.
When google chrome is closed my fps goes to about half of whatever I cap it to.
My compiler is Visual C++ Express and I literally just started this new engine,
so all I have is a window and some basic sprite stuff.
I can't figure this out at all, so if anybody knows the magic reasoning behind this I'd appreciate the help!
Very weird google chrome issue with game.
Moderator: Coders of Rage
-
- Chaos Rift Regular
- Posts: 101
- Joined: Thu Dec 09, 2010 2:13 am
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Very weird google chrome issue with game.
Wait what?? Closing Google Chrome makes your game run slower? Is it's a web-based game? That makes zero sense.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
-
- Chaos Rift Regular
- Posts: 101
- Joined: Thu Dec 09, 2010 2:13 am
Re: Very weird google chrome issue with game.
Yes, I am just as confused as you are.
It's c++ SFML and OpenGL only.
Also, it is very simple code, just bringing up some basic sprites to draw, not a whole game.
If Chrome is closed it will run at 30fps with SFML frame limiter set to 60.
With Chrome open it runs at 60fps with SFML frame limiter set to 60.
Basically with chrome closed I get 30-50% frame rate.
It's c++ SFML and OpenGL only.
Also, it is very simple code, just bringing up some basic sprites to draw, not a whole game.
If Chrome is closed it will run at 30fps with SFML frame limiter set to 60.
With Chrome open it runs at 60fps with SFML frame limiter set to 60.
Basically with chrome closed I get 30-50% frame rate.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Very weird google chrome issue with game.
How are you limiting your framerate?
-
- Chaos Rift Regular
- Posts: 101
- Joined: Thu Dec 09, 2010 2:13 am
Re: Very weird google chrome issue with game.
I'm using an SFML function in the window class called something like "setFramerateLimit( int limit )".
It seems that this function uses a clock to count the time and then Sleeps the remainder of the frame using the OS.
It seems that this function uses a clock to count the time and then Sleeps the remainder of the frame using the OS.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Very weird google chrome issue with game.
Have you considered packaging Chrome as a prerequisite with your game's installer? Everyone should be running Chrome all the time anyway.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- bbguimaraes
- Chaos Rift Junior
- Posts: 294
- Joined: Wed Apr 11, 2012 4:34 pm
- Programming Language of Choice: c++
- Location: Brazil
- Contact:
Re: Very weird google chrome issue with game.
Sorry to revive a semi-dying thread, but I just found this. Basically it says some applications on windows (like google chrome) lower the (global) timer interrupt interval when they are running, which may cause the behavior you're seeing.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Very weird google chrome issue with game.
Wow, nice research.bbguimaraes wrote:Sorry to revive a semi-dying thread, but I just found this. Basically it says some applications on windows (like google chrome) lower the (global) timer interrupt interval when they are running, which may cause the behavior you're seeing.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Very weird google chrome issue with game.
Interesting as shit. Sounds like a driver issue with SFML. For framerate limiting, they should be ensuring the global timer interrupt interval is frequent enough to achieve the desired framerate.