Create an Endless Scrolling Background
Have you ever played a game where the main character stays in one spot, but the background moves from right to left, making it appear as if the player is traveling to the right? This popular technique, known as an endless scrolling background, isn’t only for player movement—in Gloop Drop, you’ll use it to create an infinite flow of gloop beneath the platform.
Adding Image Resources for the Gloop Flow
Select the Assets.xcassets asset catalog and drag the three files, flow_1@1x.png, flow_1@2x.png, and flow_1@3x.png from the resources/Images folder into the root of the Assets.xcassets asset catalog, as shown in the image.
This action creates a flow_1 image set. You’ll use this image set to create an endless ...
Get Apple Game Frameworks and Technologies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.