Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reading on a Book that's about Gamedevelopment with C++ and DirectX 9.

There is something that interrests me: It says that playermovements are increasing with the power of the CPU. Becouse a faster CPU will move the player with every frame ( better CPU = better FPS ) To bypass it, it says you have just to multiplicate time*movementfactor .

I'd like to know is there an another way to bypass it ?

share|improve this question
Do you mean player movement alone, or whole logic? You can fix your FPS (limit it so some max value) – Markus von Broady Nov 6 '12 at 21:50
up vote 2 down vote accepted

Why do you want another way? The one you describe is what you'd use in any kind of game development, whether or not you use DirectX.

The problem is this: In (most) games you have a main loop. This loop runs as fast as the hardware allows. However, people use different hardware, so on some computers, this will be faster than on others. So in order to make an object in a game move with the same speed on any hardware, you multiply the movement vector with the time, in seconds, since last time the loop was run. This also has the benefit that if you're moving the object, say, 5 * time units in some direction, that's the same as saying "move it 5 units/seconds".

share|improve this answer
I don't want another way, I just asked if there is another (alternative )way to bypass it. But still helpfull :) Thank you – Julien Nov 6 '12 at 19:23
There really is no alternative, the update method is called whenever possible and at no specific time interval. As a result scaling is the only possible way to manage the velocity of game objects. You could just do a +1 every frame if you want, but don't count on getting consistent performance across machines or even on your own (especially if you have another program open). – Benjamin Danger Johnson Nov 6 '12 at 19:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.