[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] simple examples



On Feb 9, 2008 4:08 PM, Mikhail Ramendik <mr@xxxxxxxxxxx> wrote:
Thanks, but as I understand this will lock the code until a key is pressed?
 No...
You'll get input each frame which this function.  I'm not sure what you mean by "lock the code".
I am planing to have other sprites "floating", so will need to update them
periodically as well. I don't want to use threads - the task is way too
simple for the hassle.
You are right.
What you should do is have each sprite have a coordinate and an x and y speed in a list.
If you want them to have rotations or have different aspects (like color, picture, size, etc.) a class might be better.
Then, you just move each sprite's position by its speed.
Yours, Mikhail Ramendik
Ian