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

Re: [pygame] sprite groups and tilesheets



This doesn't answer your question directly, but you could have a look
at my gamelet, "Scroll, Jump and Beguile" that does scrolling and only
redraws the whole screen when necessary.

On Sat, Nov 15, 2008 at 1:53 AM, Michael Fiano <michael.fiano@xxxxxxxxx> wrote:
> On Fri, 14 Nov 2008 08:10:53 -0800
> James Paige <Bob@xxxxxxxxxxxxxxxxxxx> wrote:
>
>> If you are making a game with scrolling, you should probably get used
>> to the idea that you will be re-drawing everything every time.
>>
>> If I understand correctly, you are asking about how to redraw the
>> background and forgeground but NOT the player when you scroll, right?
>> But any scrolling implies that the character is going to be moving
>> too.
>
> The map isn't always scrolling. there is a 1/4 margin around the screen
> that activates the scrolling; it doesn't scroll unless the player tries
> to move more than 75% in any direction. i want to have a faster
> framerate when there is no scrolling by only updating the player and the
> background and foreground contained in it's rect area. 32x32 x3,
> compared to about 2000x2000 x3. i'm thinking theres a big difference,
> or am i not getting something?
>