The principle of rolling a map is simple, that is, you can set the location of the map continuously. The schedule () function is used for specific implementation. [Cpp] pMap = CCSprite: create ("MapHenn.png"); pMap-> setPosition (ccp (mSize. width/2, mSize. height/2); this-> addChild (pMap, 0); schedule (schedule_selector (SpriteScene: updateMap), 0.1f); the role of the schedule () function is based on the specified time, call a function continuously. Then, update the map position in updateMap. [Cpp] void SpriteScene: updateMap (float dt) {pMap-> setPositionX (pMap-> getPositionX ()-5);} Ctrl + F5, you can see that the map continues to scroll to the left. Another problem is that if you scroll to the far right of the map, there will be no background. Just add a limit in updateMap. [Cpp] void SpriteScene: updateMap (float dt) {pMap-> setPositionX (pMap-> getPositionX ()-5); // If the map scrolls to the rightmost, restore the initial position if (pMap-> getPositionX () <-pMap-> getContentSize (). width/2 + mSize. width) {pMap-> setPosition (ccp (mSize. width/2, mSize. height/2);} here, only the map is scrolled to the left, and the right is scrolled. If you add a dynamic role in the scenario and then scroll the map, it will lead to the walking effect of the character. This is the principle of the 2D Lock Angle game.: