Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Low FPS = Game Slowdown

Author
Message
Alduin768
12
Years of Service
User Offline
Joined: 15th Dec 2011
Location:
Posted: 27th Oct 2012 22:33
When my brother plays my game on his computer he gets lag. While I was designing the game, I was running at 60 FPS. So with his much weaker computer, when the FPS drops down to the 30 range, his game play is twice as slow as normal.

Has anyone dealt with this before? I notice that commercial games will run at the same speed, no matter if the FPS is 2 or 120. How do they do this?
Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 28th Oct 2012 04:47
The fps of commercial games never drop below 30. Most are probably kept at 60. Try optimizing your code.

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 28th Oct 2012 07:38
You want all movement in your game to move as if it was 60 fps. So if you're at 30 fps, you want to move twice as fast.




"everyone forgets a semi-colon sometimes." - Phaelax
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Oct 2012 20:07
TIMER BASED MOVEMENT is likely what you are looking for...

Hope that helps... [Although I believe there are a few methods but this is the most common?]

Riktovitch
12
Years of Service
User Offline
Joined: 28th Oct 2012
Location:
Posted: 30th Oct 2012 17:02
This is my first post

You could also have two (or more) threads, one for rendering the game and one for moving players, checking for collision, etc. If the rendering thread starts dropping below the desired FPS it won't slow down the "processing" thread as much as it would've. This is just a guess, but it makes sense in my head.

Anyway, I'm also making a game at the moment and I use this to prevent slowdowns:



if(awesome) return true;

Login to post a reply

Server time is: 2024-11-18 21:45:20
Your offset time is: 2024-11-18 21:45:20