abi>>forums (http://www.anythingbutipod.com/forum/index.php)
-   Zen X-Fi2 Applications & Development (http://www.anythingbutipod.com/forum/forumdisplay.php?f=221)
-   -   Moving a sprite? (http://www.anythingbutipod.com/forum/showthread.php?t=63859)

jameswalker101 06-20-2011 03:11 PM

Moving a sprite?
I am making a Mario game for the Zen. I have made arrow buttons, and drawn them to the screen, but how can I code the LEFT, RIGHT and JUMP, (moving a sprite)

Habhome 06-20-2011 04:19 PM

You just need to keep track of your player's coordinates, and always draw the sprite based on the players current position, and in your LEFT, RIGHT and JUMP functions you modify its coordinates on the screen by adding or subtracting.
That's the quick answer, the long one is for you to check my code for Neko Apprentice, it has arrow buttons which initiates movement.

All times are GMT -5. The time now is 09:21 AM.