Jump to content
  • Advertisement
Sign in to follow this  
Jmelgaard

Game running faster on some computers

This topic is 4732 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After making my first little game... which seemed to work fine... However after further tests ect. it seems my game runs extremely fast on some computers... Works find on my Laptop and my desktop withc both have a NVidia Gfx... but my palls computer witch it runs a lot faster on has a ATI Gfx... Don't know if it got something to do with that. What can i do about that? ... My own idea of a solution is to bind it somehow to "time" in ms... or to fps?

Share this post


Link to post
Share on other sites
Advertisement
It's probably down to VSync. On your system, the game is timed to the vsync of the monitor - you should look at your graphics API to disable the update on vsync.... Which will then leave you with a 'fast' game, period.

There's two ways to go from here, one is to (as you said) limit the framerate to a specific number of frames per second. Your game would keep a 'ticker' and update only when the ticker reaches your update interval (say 1/60 seconds). This implementation can be beefed up to update the logic on a fixed rate and render interpolated graphics on every other frame. This allows your graphics card to update whenever it can, but your game logic still runs at a fixed rate. This implementation leads to smooth graphics, but does require that you store the 'last' position details for each object to allow you to interpolate between them.

Another option would be to use 'variable time stepping', which involves you passing a 'delta_time' parameter to your update cycle and using it as a scalar for whenever something is supposed to move. So if your ship was flying at 100 units per second, you'd multiply this by your deltaTime to get a frame movement. This way does avoid the need to store 'this' and 'last' position information, but can become jittery if the framerate suddenly begins to fluctuate.

I generally use the variable timestep method, but I do find fixed timestepping to be a lot 'nicer' in the end - it just takes a little more to get up and running.

Share this post


Link to post
Share on other sites
Keep in mind that if you use a timestepping method, you allow for replication of the gameplay (to add things like watching a replay, or for changing the server computer to another at runtime (easily)).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!