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




________________________________
From: Greg Ewing <[email protected]>
To: [email protected]
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
efficiently.

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



      

Reply via email to