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

Re: [pygame] sprite groups and tilesheets



Michael Fiano wrote:

What must I do exactly to get scrolling to work?

if scrolling:
    draw background
    if scrolling will stop:
        keep a copy of the background surface
    draw player
else:
    if player moves:
        cover player old position with portion of background
        draw player in new position

Since you've got foreground elements you'll have to add those in as well, depending on whether they're alpha blended and how you're storing them you may or may not be able to just redraw them over themselves.