Latagore @ Thu Oct 18, 2007 11:00 am wrote:
I know how to turn it, just not how to turn it back and forth. I want to be able to turn 36 different directions, at least.
EDIT: And since it is from top down, I can just rotate the picture in a picture editing program or simply use the shapes provided in Turing.
If you're going ahead with using external images, why not just use Pic.Rotate to generate images for the other angles?
1) Start the game and load the picture
2) Make copies of the picture using Pic.Rotate for each angle you want in an array
3) Store x,y, and angle for your player (preferrably in some structure)
4) Input: left/right will add/subtract X degrees from the angle, up/down will add SPEED * cos(angle) to x, SPEED * sin(angle) to y
5) Draw picture(angle) at x, y.
EDIT: And there's a bit more to it, that was just the general idea. You want 36 directions? That's reasonable, but make the array of pictures 0..35 and the angle in the range of 0 <= angle < 36, and when you're picking the picture to draw make sure you take the angle div 10. You'll want to go with a real number when doing the trig calculations..