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

Re: [pygame] pygame 1.7.1rc2 released.



Getting segfaults here:

winxp
amd2200
ati radeon9800
py2.4.1

It happens after a certain amount of time of holding down a key.  If I
sit there and don't move, it doesn't crash, but as soon as I hold down
a movement key it crashes after about 4-5 seconds.

It could be a graphics issue, as there are certain spots where I move
the character when it crashes; or the problem could be in my collision
code.  But pygame 1.7 works ok, so I don't think thats the problem...

Ok, it's got to be something with graphics.  If I scroll my camera to
make the character appear in the spot thats causing trouble, it still
crashes; even if he's not moving.

Ok, narrowing it down further ;)  It seems to happen whenever the
character gets off screen and makes the camera track him (how I have
my game set up).  If I stop making the camera track the player and
scroll manually, it only crashes if I move left or up.

These are the lines of code that crash it; located in a tilemap
blitting routine:
#cx and cy is the amount of pixels to scroll

#scrolling left
#shift the screen to the right cx pixels
self.surf.blit(self.surf,(-cx,0),(0,0,self.size[0],self.size[1]))

#scrolling up
#shift the screen up cy pixels
self.surf.blit(self.surf,(0,-cy),(0,0,self.size[0],self.size[1]))


For now I'll take the optomization out and just draw all the tiles
every frame.  Other than that, this version seems a LOT faster!