ScrollBuffer - 0.1
(No image. It does what any tiler and scroller should do. Run scrollbuffer.py for a demo.)
ScrollBuffer is a scrolling buffer class for a tile-based renderer where tiles comprise a map that is larger than the screen.
This class is easy to use and much more efficient than re-tiling the screen every frame. It reduces calls to blit by using pygame's Surface.scroll() to scroll previously rendered pixels, and only renders tiles that emerge into view.
This is a work in progress that will likely be integrated into Gummworld2 once the best design is found. So far it is promising, delivering high framerates comparable to Gummworld2's tile collapsing trick, and has none of the downsides of concatenating tiles.
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.