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

Re: [pygame] question about scrolling the world



Well, if you use the rect argument in Surface.blit(), as people have mentioned here, your computer will only draw the part on screen.  Ex:

#At Top
Screen = (800,600)
Surface = pygame.display.set_mode(Screen)

#In Draw()
rect = (top left corner, top right corner, Screen[0], Screen[1])
Surface.blit(BackgroundSurface, (0,0), rect)

Very large images can be drawn very quickly this way.
HTH,
Ian