Movement in game programming

Posted by hanesjw on Stack Overflow See other posts from Stack Overflow or by hanesjw
Published on 2010-06-07T17:49:29Z Indexed on 2010/06/07 17:52 UTC
Read the original article Hit count: 147

Filed under:
|

This question may have been asked before, but I'm starting to get into game programming on the Android. I'm having a hard time figuring out the best way to move an object.

To put it simply, lets say I have a bitmap located on 0,0 and i want to move it across the screen. The obvious way to do it would be to simply increment the X position by one every time the Surface View onDraw method gets called.

But what if I wanted to make it move faster? I could increment it by two or three instead of one, but then the movement starts to get really choppy and stupid looking.

What is the best way to go about doing this?

© Stack Overflow or respective owner

Related posts about android

Related posts about game-development