Advertisement

Using timers correctly

Started by March 03, 2002 10:02 AM
2 comments, last by NerdJNerdBird 22 years, 11 months ago
Well I copyed the timer code from lesson 21 and put it into my current project. I noticed that the framerate isn't totally consistent. Shouldn't it be running at a constant rate to keep the gameplay smooth? I added an fps counter to lesson 21 and noticed that its not smooth there, but the game runs the same speed on my system as it does on most other systems. Any advice for how I should set up a timer for my project? Here it is currently. www.geocities.com/david_sulock/space.zip I am thinking of making a sort of rpg/adventure type game online. It will contain elements of both types of games. I have a p4 1.5 and i'm worried about the speed that it will run on other people's computers. That link again: www.geocities.com/david_sulock/space.zip b turns on blending and s makes the stars 3d Also, for some reason you can only see the FPS counter when blending isn't on. The text is black and when its blended it goes away but when its not you can see it over a star. Edited by - NerdJNerdBird on March 3, 2002 11:31:29 AM
And when I mean advice I''ve heard people saying you can have a variable to adjust the speed on everything based on the speed the computer is refreshing. I''m not too sure how that would work and if I should use it in this case.
Advertisement
up
I''m not sure what kind of ''advice'' you''re looking for. But the frame rate generally wont be totally consistant throughout. The reason gameplay remains smooth is because all calculations based on time (movement, fading, etc) take into account the current framerate.

This topic is closed to new replies.

Advertisement