Hey, I'm developing a very small computer game for my niece, and I've decided to go ahead and do this without XNA (the game is incredibly simple, I feel xna won't be overly useful).
I have a sprite which I want to be able to move in any direction. The movement actions will be done with the mouse: for example, the user clicks a position on the form, and the sprite moves to that position.
Now the problem I'm facing, is that I need to be able to rotate the sprite on the fly: for example, the sprite is travelling in a certain direction, when the user suddenly clicks in the opposite direction, the sprite would have to turn around and then travel in that direction. What is the most efficient way of accomplishing the rotating action? (Assume I have the appropriate graphics and sprites within my resources).
Cheers.
Loading
FroglegPosted Dec 30, 2011, 1:59 PM
If so, you could use an image list.
Put all your rotation images in the list, then move through the list up or down, according to rotation direction.
Here is a game that was created earlier in the year. The space ship is controlled by the arrow keys
You can use the same basic game engine for your game