Re: [pygame] Re: A new tutorial of Pygame for a 2D game

2008-12-20 Thread Eli Bendersky
On Sat, Dec 20, 2008 at 12:23, René Dudfield  wrote:

> Nice one :)
>
> The only thing I'd change is with the mouse handling using the mouse
> event attributes rather than call the functions :)
> event.pos and event.button   That will make the code a tiny bit more
> reliable, since the functions could be different.
>
> cheers,
>

Thanks, I was looking for that!

Are there constants to compare event.button against ? I see it returns 1 for
left button, but I'd expect some kind of standard Pygame constant I could
compare this to.

(Such information is quite hard to find in Pygame's docs)

Eli


Re: [pygame] Re: A new tutorial of Pygame for a 2D game

2008-12-20 Thread René Dudfield
Nice one :)

The only thing I'd change is with the mouse handling using the mouse
event attributes rather than call the functions :)
event.pos and event.button   That will make the code a tiny bit more
reliable, since the functions could be different.

cheers,


On Sat, Dec 20, 2008 at 8:41 PM, eliben  wrote:
>> I began posting a new tutorial for Pygame on my website. Here is the
>> first 
>> post:http://eli.thegreenplace.net/2008/12/13/writing-a-game-in-python-with...
>>
>
> Part II is available:
>
> http://eli.thegreenplace.net/2008/12/20/writing-a-game-in-python-with-pygame-part-ii/
>
>* A prettier background for the game
>* Responding to user events
>* A more complex internal state for the creeps
>* Simple animation
>* Rendering text
>