Traceback (most recent call last):
File col.py, line 52, in module
collide=pygame.sprite.collide_rect(sprid[0],sprid[1])
File C:\Python25\lib\site-packages\pygame\sprite.py, line 1146, in
collide_r
ect
return left.rect.colliderect(right.rect)
AttributeError: 'pygame.Surface' object has
@Zack - what i wanted were change the background colour to #FF
only when the sprites 0 and 1 collides - anyway, sorry this code is
not PEP8, and using abbreviated variable names - i came from hobbystic
80's ansi-basic , where i were hugelly one-liner, and variable names
only took 1 or 2
Well, this version runs. I'm not sure if it's doing what you want but
it does make a windows and draws some stuff. The subsurface splits are
correct. I tried to make minimal corrections.
http://pastebin.com/m1e1c7c94
-Zack
On Jul 13, 2009, at 11:47 AM, Paulo Silva wrote:
@Zack - what i
well, the exact answer i can say is 'yes and no'... ;)
the 'yes' is finally i can start understanding how collisions works on
pygame, and this is truly wonderful! thank you!
the 'no' is, when i did use 'if' over coordinates and size
calculations instead of collisions -
It only shows one sprite because you're filling the screen each and
every time you draw one. That's also part of the reason why your code
is so incredibly slow.
Delete this line:
screen.fill(0x998877)
And move it before the for loop:
screen.fill(0x998877)
for i in range (0,amnt,1):
k,
I just rolled back my repository and used a older version that doesn't
give any compile errors. The changes I made to the non compiling
version were not that big so I will not loose mutch work...
Slu
On 13-jul-09, at 06:45, René Dudfield wrote:
Hi,
you should be able to put a
Ok, good news, with the current version of the camera module, I am
able to grab a frame from the camera, copy it to the SDL_Surface and
display this image in the display.
The image is not displayed 'naturally' on the display, probably
because of a difference between the rgb mapping on the
On Tue, Jul 14, 2009 at 8:58 AM, el lauwerel.lau...@gmail.com wrote:
Ok, good news, with the current version of the camera module, I am able to
grab a frame from the camera, copy it to the SDL_Surface and display this
image in the display.
awesome. nice work!
Making code more pythonic doesn't necessarily mean meeting the PEP8
style guidelines, it just means turning the ideas that you have into
code in the most direct way that best uses the basic features of
Python. For example, python's basic collection, the list, is not an
array and works best