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

Re: [pygame] simple examples



Mikhail Ramendik wrote:
Actually I do plan to have a different picture for each sprite. So I was planning to use the Sprite class to store the pictures and coordinates, and only do the blit in the main loop.

As for moving position by speed - I would somehow need to coordinate it with real time as "speed per loop" seems somewhat meaningless.

I am a total beginner in pygame and that's why I hoped to see an example. Right now I am not even sure how the main loop should be constructed. (I really am only doing it because I have a kid unedr 3 yo, and all the Linux "games for small children" rely on the mouse - which my kid does not grok, and I see his point, the mouse thing is really way less "natural" than keys. My aim is to do enough for my son's fun - then I'll just release the code, perhaps someone else will want it).

I would suggest downloading the Pygame 1.7 source from www.pygame.org and looking at the examples directory. It includes Aliens, which has several kinds of moving sprites and uses the arrow keys to move the gun. The source also contains the Pygame documentation, which has several tutorials.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>