I'm working on a Windows phone game and I'm having difficulty with the sprite movement. What I want to do is make the sprite gradually move to the position that is touched on screen, when there is only one quick touch and release. At the minute all I can do is either make the sprite jump instantly to the touch location or move along to the touch location when the touch is held down.

TouchLocation Active = null; This was bringing up errors, so I changed the TouchLocation to a bool and changed null to false. When I ran this code the sprite jumps along to the touch location in small increments, but only jumps each time the touch pad is pressed.
–
Darren GaughanNov 20 '11 at 1:53

I have changed the code, I did not know that TouchLocation was a struct. The update method must be called every frame, and you can change the ratio to change the speed.
–
BlauNov 20 '11 at 12:18

I think a good way to do it is to represent the game object you are rendering as a class that has all the require information to update and render. This way you can better manage your object. For example, lets say what you are controlling is your Player class, it might look something like this.

Regarding handling of input, please see the Game State Management example on the AppHub education resources for a good way to handle input state on the Windows Phone platform and how to best use Gestures. (Look for the InputState class)

You could do away with the bool of IsMoving but I think it helps with readability and you might want to know this elsewhere for something else.