Python Forum

Full Version: Creating a Scrolling (infinite) Background
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been dabbling in Pygame for over a month now and I've discovered many things. I've created two games so far + 2 more in development. I intend to share those some time in the future too.

One of the many concepts I came across was the Infinity Scrolling Background feature. I eventually came up with a really solid and simple way of doing it involving only about 10 - 15 Lines of code.

What's more, my methods also works for Horizontal as well as Vertical background scrolling (with a slight tweak that's discussed in the tutorial). For anyone learning pygame, I highly recommend you check it out.

-> Scrolling Back-Ground Tutorial.
-> The Game upon which it is based.
Interesting!