Hi,

This is my first post here, and I am very happy to have found a place where I hopefully can get some help with solving my problem. I just started using DelphiX a few dags ago, although I have been using Delphi for many years.

My problem concerns framerate, and having searchd the net for an answer, I have found that this is a common issue, although it seems somehow ignored.

My "game" is coded within a DXTimer.OnTimer event. All the tutorials I have found on the subject say that I should put the timer interval to 0 or 1, to get as many fps as the computer can render. But they compleatly ignore the fact that not every computer is of the same hardware as the one the game is being developed on.

The first thing, that I hope you could explain to me, is this phenomenon:
I get now difference in fps when I set the timer interval to 1 instead of zero, when doWaitVBlank-property of the DXDraw is set to true. I get around 65 fps.
But when I set doWaitVBlank to true, a timer interval of 1 still gives me around 65 fps, but an interval of 0 gives me like 750 fps, and the game runs _extremly_ fast.
Why is that?


My goal is, of course, to make a game that runs equally "fast" on every computer, meaning, the ball should move across the playfield in the same amount of time on a fast computer, as on a slow. The only difference should be that the game runs "smoother" on the fast one. The framerate (fps) must not affect the speed of the game.

Well, I am sure that you understand the problem. I have read somewere that the value LagCount is the key to the solution, but still, it is unclear to me.

Is there any peace of text that covers this, or an example, perhaps?

Thank you in advance
//Daniel

And sorry about my english. I'm from Sweden.