I suspect there is an error in your update or draw loop (note, both have a gametime parameter- but you should only update game logic in the Update loop).
To demonstrate I made this demo:
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using System; using System.Diagnostics; namespace TimeStepDemo { /// <summary> /// This is the main type for your game. /// </summary> public class Game1 : Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D _pixel; // have a pixel to draw stuff. Vector2 _position; //position of the object. Vector2 _center; //center of the circle. double _angle; //current angle of the circle. double _angleSpeed; //how fast the object should go. float _frametime; // record the time a frame in the update took. long _millisecondsPerCircle; //how many miliseconds to complete a circle (to compare settings). Stopwatch _stopwatch; //to recored the time. public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; //---------------------- // Try different combinations of true and false here! //---------------------- IsFixedTimeStep = true; graphics.SynchronizeWithVerticalRetrace = false; graphics.ApplyChanges(); } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { base.Initialize(); } /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); //have one white pixel texture. _pixel = new Texture2D(GraphicsDevice, 1, 1); _pixel.SetData<Color>(new Color[] { Color.White }); //set the position and angle speed of the object. _center = new Vector2(300, 300); _angle = 0; _angleSpeed = 4; //initialize the stopwatch to measure the time it takes for the object to complete a circle. _millisecondsPerCircle = 1; _stopwatch = new Stopwatch(); _stopwatch.Start(); //note: this value should be fairly constant //regardless of the fixed timestep //or vertical retrace. } /// <summary> /// UnloadContent will be called once per game and is the place to unload /// game-specific content. /// </summary> protected override void UnloadContent() { } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) Exit(); //remember the angle (to measure time). double oldangle = _angle; //update the moving object: _angle = (_angle + _angleSpeed * gameTime.ElapsedGameTime.TotalSeconds) % (2*Math.PI); _position = _center + new Vector2((float)Math.Cos(_angle), (float)Math.Sin(_angle)) * 150; if(oldangle>_angle) //we have looped if we pass the 0. { _millisecondsPerCircle = _stopwatch.ElapsedMilliseconds; _stopwatch.Restart(); } //record the frametime. _frametime = (float)gameTime.ElapsedGameTime.TotalSeconds; base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); //draw a red moving box: spriteBatch.Draw(_pixel,new Rectangle((int)_position.X,(int)_position.Y,7,7),Color.Red); //draw the frametime: spriteBatch.Draw(_pixel, new Rectangle(0, 2, (int)(10000 *_frametime), 10), Color.Blue); //draw the time it took to complete a circle: spriteBatch.Draw(_pixel, new Rectangle(0, 22, (int)(_millisecondsPerCircle/10), 10), Color.Green); spriteBatch.End(); base.Draw(gameTime); } } }
The result is a red box going in circles. A blue bar shows the frametime (shorter without fixed timestep). The green bar shows the time it took to complete a circle. The green bar- shown after 1 completed circle, is a constant length regardless of the frametime. This shows that the red object moved equally fast in each scenario. I used bars to visualize the timeframe, since I didn't want to introduce a spritefont- just copy this code and it should work.
In the Game() constructor you can change the values for fixed timestep and the vsync to true or false. Note how the fixedtimestep influences the length of the blue bar. Also the vsync influences the frametime. To max out fps, set both to false.
The code for moving an object is a bit different (for demonstration purposes) but the principle of movement and frametime is the same. Hopefully this demonstrates how to unlock the fps and have higher framerates while the objects move at the same speed. Perhaps it helps you debug your own code.
TimeSpan.FromSeconds(16.666)line looks like you're mixing seconds & milliseconds - should that not be eitherTimeSpan.FromMilliseconds(16.666)orTimeSpan.FromSeconds(0.016666)? \$\endgroup\$