On, Thu Feb 12, 2009, Rene Dudfield wrote:
> coolness :)
>
> how about using the pyg prefix for all of the names?
>
> eg. sdl_pyg libSDL_pygXXX and pyg_XXX ?
>
That could be done.
>
> I think we should wait until after pygame 1.9 is released before
> moving it over to use SDL_pyg? Was th
coolness :)
how about using the pyg prefix for all of the names?
eg. sdl_pyg libSDL_pygXXX and pyg_XXX ?
I think we should wait until after pygame 1.9 is released before
moving it over to use SDL_pyg? Was that your idea too? Or start
right away? I think I'd like to wait until after... to
ok.
thanks
--- On Wed, 2/11/09, James Paige wrote:
From: James Paige
Subject: Re: [pygame] move problems
To: pygame-users@seul.org
Date: Wednesday, February 11, 2009, 6:04 PM
-Inline Attachment Follows-
On Wed, Feb 11, 2009 at 03:46:21PM -0800, Yanom Mobis wrote:
> if key[K_UP]:
ohhh. I get it now.
thanks!
--- On Wed, 2/11/09, pymike wrote:
From: pymike
Subject: Re: [pygame] move problems
To: pygame-users@seul.org
Date: Wednesday, February 11, 2009, 6:08 PM
Here's an example:
UP = 0
DOWN = 1
LEFT = 2
RIGHT = 3
keys = [0, 0, 1, 0] #up, down, left, and right k
Here's an example:
UP= 0
DOWN = 1
LEFT = 2
RIGHT = 3
keys = [0, 0, 1, 0] #up, down, left, and right keys, respectively. 0 stands
for 'not pressed', 1 stands for 'is pressed'.
if LEFT in keys:
print True
Now, it won't work, because "2" is not in the keys list.
if keys[LEFT]:
print Tr
On Wed, Feb 11, 2009 at 03:46:21PM -0800, Yanom Mobis wrote:
>if key[K_UP]:
This uses K_UP as the index and returns the value at that index.
>if K_UP in key:
The "in"
Hmm. now i remember how it's done. the part about pygame.key.get_pressed
returning 1's and 0's makes sense, but I just don't get why
if key[K_UP]:
works if
if K_UP in key:
doesn't.
--- On Tue, 2/10/09, mani...@gmx.de wrote:
From: mani...@gmx.de
Subject: Re: [pygame] move problems
To: pyga
Thanks a lot for the help, folks.
I've tried RB[0]'s suggestion and it seems to work well. =)
The new code is:
import sys
sys.path.insert(0, 'lib')
import main
main.main()
I've already updated the file for next release.
-Thiago
On Tue, Feb 10, 2009 at 8:47 PM, RB[0] wrote:
> It is an IDLE pr
Hi,
I created the sdl_pgame branch now. All shared library parts build just
fine for systems supporting libtool, but are completely untested at the
moment. The Win32 support, API docs and anything else will follow the
next days or so :-).
The libraries themselves are using a libSDL_pgXXX, functio
Have a look at my game's game.py file for your key problem.
Love,tullaris.
http://www.mediafire.com/?l4md0edjnmm
2009/2/11 Yanom Mobis
>
> this code is in my main game loop
>
> key = pygame.key.get_pressed() #create a key index
>
>if K_UP in key: #check if the up arrow is pressed
>
10 matches
Mail list logo