   Time Based Movement
  Hey, I'm working on a RTS with a friend and we are having some issues with time based movement; notably, units move slower at lower FPS than at higher FPS.  We do have a system for calculating the speed that a unit is traveling based on elapsed time, but it generally returns the same results, no matter the FPS.Here is the implementationTimeBasedUpdater.hppclass TimeBasedUpdater{private:static Uint32 start;static Uint32 current;public:// returns the value adjusted for time based movementstatic float GetCorrectedValue(float value);// needs to be restarted each framestatic void Restart(){start = SDL_GetTicks();}};TimeBasedUpdater.cpp#include "TimeBasedUpdater.hpp"#include <iostream>Uint32 TimeBasedUpdater::start= 0;Uint32 TimeBasedUpdater::current= 0;float TimeBasedUpdater::GetCorrectedValue(float value){do {current = SDL_GetTicks();} while (start>=current);//Uint32 frame_time = current-start;std::cout << (value*(current-start)) << std::endl;return float(value*(current-start));}(Yes, Restart() is being called at the end of each frame)All of the source is located at http://code.google.com/p/basicrpg34253/source/browse/#svnLet me know if you want something specific.Thanks; any thoughts?   
  The infamous Gaffer on Games article, Fix Your Timestep!, may give you some ideas.  [smile]   