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

Re: [pygame] Scrolling

so... blit them all to the screen and change their x and y values as you scroll?

From: Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx>
To: pygame-users@xxxxxxxx
Sent: Monday, August 3, 2009 5:39:00 PM
Subject: Re: [pygame] Scrolling

> On Aug 3, 2009, at 11:32 AM, Yanom Mobis wrote:
>> How is scrolling done in pygame? i was thinking of blitting all  gameobjects to a surface, then blitting part of that surface to the  screen

Don't do that, just blit your objects directly to the
screen with appropriate offsets. The ones that are partly
or completely off the screen will be clipped away very

On the other hand, if you blit them to another surface
first, you'll pay the price for fully blitting all of
them even if they're not visible.

-- Greg