Swift Playgrounds and Swift Student Challenge 2021 – Part 2

I made a simple playground submission for WWDC21 or the Swift Student Challenge 2021 that could be made easily. My plan was to make a simple interactive environment for Groot where he could move around and stand behind or next to his tree friends who will assume random positions in the given scene.

Objective :

A fun one-time game environment that allows the interactive character (Groot) to move near stationery characters (Groot’s tree friends) according to mouse/user touch gestures (drag)

Abstract :

Groot (no copyright intended) is surrounded by his tree friends who occupy a different position every time the playground code is run. Groot can also be moved around as needed (via touch) to go meet his other tree friends.

Introduction :

A small 2D interactive environment which allows the user to interact with and move Groot around to go stand near his friends, the trees.

Groot can be moved via touch and will follow the cursor to go where the user guides him.

The trees, or his tree friends, assume a new position every time the game is restarted according to the random variables.

Working Sample :

Github Link:

The code for this Swift Playground has been uploaded on my Github with the direct code repository link given below

Click here for code


Published by Rashmi Rao

Hi, I’m Rashmi. I’m pursuing an engineering degree in Computer Science with specialisation in Cloud Technology and Mobile Applications. I have a wide range of interests and a constant desire to learn more, which is why I published www.jotmos.wordpress.com to track my progress over the years.

Leave a comment

Design a site like this with WordPress.com
Get started