Challenge: Create fun visual effects in Swift Playgrounds – Discover

Have you ever wondered how to make it look like confetti is raining down from the sky? Or how to create a kaleidoscope effect using code? In this challenge, your goal is to create a compelling visual effect using the Shapes book from the Swift Playgrounds app. Maybe it’s a constellation of objects orbiting intriguing mathematical patterns, or a structural and fluid form that adapts to your touch. It’s entirely up to you: what visual effect would you like to dream about?

Start the challenge

To get started, download and open Swift Playgrounds on your iPad or Mac, then select View All in the lower right corner to launch the Swift Playgrounds content screen. From here, you can find the Shapes book under “Starting Points” and download a copy to your device.

Swift Playgrounds app that shows downloadable books and challenges

The Shapes starting point has some great examples for reference when you get started. Check out the “Shape Graphics” page to explore the book’s basic API for creating all shape types and placing them in the scene. “Touch and Animations” shows you how to apply animations to shapes and use touch events to drive behavior. And finally, “Sprite Shapes” can help you learn how to create physics interactions between different forms. From there, you have everything you need to create your own visual composition.

Do you want to show your visual concept to the community? You can share your creation (or creation in progress) on developer forums.

Visit the Apple Developer Forums

Resources

Download Swift Playgrounds for macOS

Learn more about Swift Playgrounds

Read the terms and conditions of WWDC21 Challenges

Leave a Comment