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

Re: [pygame] pygame 1.7.1rc2 released.



Yeah, that fix worked, I think I see the problem.  I'm not sure if the
modified lines actually do what the original code did however.  If you
scroll to the left by say, 4 pixels, it should copy the screen
starting from 0 on the left, and ending at the width of the screen - 4
pixels, and reblit that 4 pixels over.  What the new code would do, is
copy the right side of the screen (minus those 4 pixels on the left)
and reblit it over at x=0.  This is going to scroll the screen to the
left, which is actually scrolling to the RIGHT in the scene.  So it's
backwards.

Here, I made up a little demo app that demonstrates.  You were right
on about the problem being the screen blitting to itself.  I'm just
not sure why it works one way and not the other?

http://www.spinheaddev.com/pygame1.72blittest.zip

If you hold down left it crashes
If you hold down right it works ok
If you hold down shift, it copies the surface first and blits the copy
instead.  It doesn't crash, but it's also signifigantly slower than
scrolling right.

I've actually been getting good enough framerates with blitting every
tile so I haven't been using this optomization for a while; also there
is a lot of code to wade through and I didn't want to burden you with
that :)

Good luck tracking this down!