[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] moving the ship



hi pygame users, I've a semi-OT question that isn't very inherent in pygame.
I've written a simple game, and I need a way to move my ship. When the ship 
fly vertically or horizontally I add or remove 1 to the x or y axis, making the 
ship moving 1 pixel per frame. If I try to change the step(a number different 
that 1) I lose the fluid movement, because the ship seems to "jump" every frame.

But when I try to move my ship diagonally I have a problem. The x and y 
increments are calculated by the sine and cosine of the step, but if this is
1 or another low number(for fluid movement) there is a very bad precision 
in the movement...What can I do?

thank you
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org