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

Re: [pygame] ?scroll a section of the background?



Thanks for the help.  I seem to get a core dump with I try to blit the surface onto itself ...

here is the snippet

s = pygame.Surface((50, 50), color=(255, 100, 100))
for i in range(10, 200):
    s.blit(s, (i, i))
    pygame.display.flip()


This is the error I get
Fatal Python error: (pygame parachute) Segmentation Fault

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

On 10/18/05, Peter Shinners <pete@xxxxxxxxxxxx > wrote:
On Tue, 2005-10-18 at 20:51 -0400, Justin Shaw wrote:
> Pygame newbe here and I must be missing something.  I need to scroll a
> section of the screen at each update.  I had hoped I could achieve
> this with Rect.move(), but you already know that didn't work.  If you
> think you might be able to help, please read on.

What you want to do is just blit the screen into itself with an offset.






--
Justin