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

Re: [pygame] Problems with events and keys



Oh, I think I figured it out but I can't test it... I am not in front of my main PC right now. The problem seems to be that I used pygame.event.Event when I should have used pygame.event.pump() which, in its description, specifically says that it should be used with pygame.USEREVENTs which is what I was trying to do. I should read a little slower...

On 2/9/07, Charles Christie < sonicbhoc@xxxxxxxxx> wrote:
I didn't think punctuation would work but that's an easy fix if I want punctuation in later.

Now my only problem is that the pygame.event.Event(GAME_OVER_W) or pygame.event.Event(GAME_OVER_L) statements don't work at all.

On 2/8/07, Luke Paireepinart < rabidpoobear@xxxxxxxxx> wrote:
Charles Christie wrote:
> lol... I forgot to tell it to accept spacebar input :P
>
> This is coming along quite well. Soon I'll start coding the
> shoot-em-up game part of this... then it'll get really interesting.
>
> I noticed that certain punctuation didn't work but I'm not worried
> about those. The game probably won't use any punctuation and if it
> does, it's a simple fix.
I don't think any punctuation would work.
>
> Anyway, here's what I've got now. Much better now, isn't it? I'm
> making a backup of this code so I can show my teachers. I also have to
> change the location of the text that got stuck all in the middle...
> but that shouldn't be too much trouble...
>
> Next week I'll be able to put that helpers.py file to some good use,
> hopefully... ;P
There's no reason to do isalpha and isalnum. isalnum covers all cases of
isalpha with the addition of numbers.
I have a class in 9  minutes so i can't peruse your code any deeper
right now, but I'm happy to hear it's coming along and that you seem to
be enjoying yourself.
-Luke