My game is a platform game. I want the player to move when it is X pixels away from the center, moving left or right.
I understand pygame doesn't have anything that would make a camera move.
When the player has reached the point where it is X pixels away from the center, stop the player movement and have the terrain move in the opposite direction to display the illusion of a movable terrain, acting like camera motion.
You could just make something called xscroll that is added to everything that is supposed to scroll across the screen. Then, when you reach a certain distance from the center, instead of adding your players movespeed to his position, you add or subtract the movespeed from xscroll. This makes everything move very smoothly back at the same speed your character would move. I use this in all of my games and I have never had a problem with it.
How would I go about making a camera like movement in pygame?