{"id":114629,"date":"2020-06-25T18:00:02","date_gmt":"2020-06-25T18:00:02","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=aprhkd7d"},"modified":"2020-06-25T18:00:02","modified_gmt":"2020-06-25T18:00:02","slug":"changing-the-world-one-swift-playground-at-a-time","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2020\/06\/25\/changing-the-world-one-swift-playground-at-a-time\/","title":{"rendered":"Changing the world, one Swift playground at a time"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/changing-the-world-one-swift-playground-at-a-time.jpg\" data-hires=\"false\"><\/div>\n<p>Earlier this year, students from all around the world put their passion, ingenuity, and determination to work crafting Swift playground projects for the WWDC20 Swift Student Challenge. Students from 60 different countries and regions brought their talents to the table, using the challenge\u2019s three-minute limit to stretch their imaginations and explore Apple\u2019s frameworks and technologies. The resulting 350 Swift Student Challenge winners have created AR experiences, projects powered by machine learning, educational material, virtual musical instruments, 8-bit games, and so much more. <\/p>\n<h3>Swipe to unlock<\/h3>\n<p>In 2019, after having studied just one month at the Apple Developer Academy in Porto Alegre, Brazil, Henrique Conte submitted his first Swift playground project. While he didn\u2019t win a WWDC Scholarship that year, the experience drove him to continue exploring and refining his code.<\/p>\n<p>\u201cThis year I felt that, after reading and studying about so many different Apple frameworks, I should try to accomplish the WWDC19 main phrase: \u2018Write code. Blow minds,\u2019\u201d he told us. And he did. His winning submission, a three-minute game designed for MacBook Pro\u2019s Touch Bar, excels in both its technical acuity and creativity.<\/p>\n<p>Within the playground, players have to help Eleanor, a young developer, escape from a cave. The twist: The \u201ccave\u201d level is entirely located within the Touch Bar. \u201cI chose to use unusual frameworks to show that it is possible to do amazing things with them,\u201d Conte said. \u201cI feel that [the Touch Bar] has so much potential yet to be discovered, and I wanted to demonstrate some of its capabilities.\u201d<\/p>\n<div class=\"inline-article-image\" readability=\"34\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/changing-the-world-one-swift-playground-at-a-time-1.jpg\" data-hires=\"false\"><\/p>\n<p class=\"typography-caption\">Henrique Conte\u2019s winning submission, \u201cESCape, Eleanor!\u201d<\/p>\n<\/div>\n<p>Though he had never previously developed for macOS, Conte immediately took to the challenge. Like learning any new development concept, he ran into a few initial obstacles \u2014&nbsp;\u201cwhen I received the message \u201cNo such module &#8216;UIKit\u2019 [after trying to add it to my project] I noticed things would get interesting,\u201d he joked \u2014&nbsp;but he quickly picked up the fundamentals of Mac programming, using AppKit and SpriteKit to build a fully-interactive experience, including taps, slides, keyboard integrations, and multi-screen storytelling. He also paid close attention to the design, something that has become increasingly important to him.<\/p>\n<p>\u201cI am definitely not a designer,\u201d says Conte, \u201cBut in the past few years I noticed how essential it is to follow Apple\u2019s Human Interface Guidelines and to provide a great experience. There is no point in creating a perfect code if people will have trouble using your application!\u201d<\/p>\n<p>You can find more of Conte\u2019s work on the App Store: In the last year, he\u2019s created four apps, including one to help children with autism communicate. He\u2019s currently at work on his next project, which he\u2019s building for both iOS and macOS, that addresses the problem of food waste. And \u2014&nbsp;he\u2019s happy to report&nbsp;\u2014 the macOS version will incorporate the Touch Bar. <\/p>\n<h3>The world turned upside-down<\/h3>\n<p>Louise Pieri, 21, fell in love with computer science at a young age in her native Lyons, France. She\u2019s since gone on to study at \u00c9cole 42, the programming school founded by French businessman Xavier Niel. Pieri\u2019s winning project, Meep, drew inspiration from an article she read in a scientific journal about the possibility of parallel universes, as well as her own personal journey as a transgender woman. <\/p>\n<p>\u201cMeep is a game with two levels: the first is a level where everything is reversed and upside-down and the second is where everything is normal,\u201d says Pieri. \u201cThe story is about a little blue transgender monster who wants to reach the final level and turn pink&#8230; it&#8217;s a beautiful metaphor for what happens in the life of a trans person.\u201d<\/p>\n<div class=\"inline-article-image\" readability=\"33\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/changing-the-world-one-swift-playground-at-a-time-2.jpg\" data-hires=\"false\"><\/p>\n<p class=\"typography-caption\">Louise Pieri\u2019s winning submission, \u201cMeep\u201d<\/p>\n<\/div>\n<p>Though Pieri had never previously used SpriteKit or AVKit, she knew she wanted to build a game for her Swift playground submission. She spent two days brainstorming ideas before landing on the concept for Meep and diving into the frameworks and interface. Initially, she\u2019d hoped to show both of Meep\u2019s universes on-screen at once before deciding on a multi-level experience, including an entire level upside-down. <\/p>\n<p>In addition to designing and coding the game, Pieri also created her own 2D artwork for each level in Adobe Illustrator and a story for the game \u2014&nbsp;all in under two weeks.<\/p>\n<p>Pieri has been tuning into WWDC20 this year from France, and is especially keen to learn more about the future of Apple platforms. \u201cI can&#8217;t wait to get to know iOS 14,\u201d she says. That will come in handy for her next project \u2014 bringing a version of Meep to the App Store.<\/p>\n<h3>A robot of one\u2019s own<\/h3>\n<p>Devin Green\u2019s love of development stemmed from a lifelong fascination with thinking machines. \u201cI have always been in awe of artificial intelligence,\u201d he told us. Out of that idea, the 18-year-old\u2019s winning project \u2014 an AI bot named Stanny \u2014 was born. <\/p>\n<p>\u201cWith everything that is going on in the world right now, I thought people stuck in isolation might find it beneficial to their mental health to talk to a capable AI companion,\u201d he said. Green, who will attend Stanford this fall for computer science and engineering, took about a week to build his playground \u2014&nbsp;most of that time dedicated to refining machine learning models that created Stanny\u2019s \u2018intelligence.\u2019<\/p>\n<p>\u201cThe model was trained on a data file made up of all the things you could possibly say to Stanny,\u201d Green said. After researching how others had trained chat bots, Green created his own model in TensorFlow, then brought it to his Xcode playground through Core ML Converters.<\/p>\n<div class=\"inline-article-image\" readability=\"33\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/changing-the-world-one-swift-playground-at-a-time-3.jpg\" data-hires=\"false\"><\/p>\n<p class=\"typography-caption\">Devin Green\u2019s winning submission, \u201cPolar Patterns\u201d<\/p>\n<\/div>\n<p>While no stranger to experimenting with machine learning models, Green used this project to get to know more of Apple\u2019s ML offerings. \u201cI wanted to make it as simple as possible to go from data to usable Artificial Intelligence,\u201d he told us. He worked with NSLinguisticsTagger to build a working model, then created a generated Core ML model to predict the person\u2019s intent from their query and architected his playground in SwiftUI.<\/p>\n<p>Green sees Swift as the future of machine learning and AI applications. \u201cSwift is not only a really simple and easy to use language, it\u2019s also really expansive,\u201d he told us. \u201cIt can be built on in such a way that [it] is capable of doing just about anything.\u201d<\/p>\n<p>Stanny isn\u2019t quite as full-featured: His joke-loving AI is limited to only 63 different intents. But Green has big plans \u2014&nbsp;and he can\u2019t wait to incorporate some of the technology announced at WWDC20. \u201cThe Natural Language framework is astounding,\u201d he told us. \u201cIf I had any doubts about using Swift for machine learning, they quickly disappeared while watching a natural language processing application understand text with about five lines of code&#8230; projects I\u2019ve created, like Stanny, are about to get 100x better!\u201d<\/p>\n<h3>Code as design<\/h3>\n<p>For first-time winner Renata P\u00f4rto, the challenge gave her a chance to confront her own self-doubts. \u201cAs a designer, I have always felt insecurity regarding my ability to code more complex ideas,\u201d she said. After two unsuccessful Swift playground submissions in previous years, the 21-year old student from the Universidade Federal de Pernambuco in Recife, Brazil had once again decided to submit. But after a few days of work, she scrapped the project.<\/p>\n<p>\u201cI was not satisfied with my own decision to continue with a \u2018safe\u2019 idea,\u201d she told us. Instead, she began considering concepts she\u2019d wanted to learn about but hadn\u2019t yet explored \u2014 including generative art. \u201cOne of the things I always thought was fantastic about programming is the possibility of transforming lines of code into visual and interactive experiences,\u201d she said. Just six days later, she emerged with Polar Patterns, a Swift playground that helps people learn more about mathematical roses and generate their own visual art.<\/p>\n<p>\u201cWith SpriteKit, I was able to convert the polar equation of mathematical roses into SKShapes, transforming the results from the formula into visual elements,\u201d she said. P\u00f4rto designed just two images herself, relying on her algorithmic code and a few UIKit elements to create the entire visual experience. <\/p>\n<p>Designing an entirely programmatic art interface was a departure for P\u00f4rto. \u201cI am very used to prototyping before programming,\u201d she told us. This project, however, involved creating an experience that would dynamically shift and change depending on what actions someone took within the playground, making it important for P\u00f4rto to visualize and experiment constantly to perfect her interface.<\/p>\n<div class=\"inline-article-image\" readability=\"33\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/changing-the-world-one-swift-playground-at-a-time-4.jpg\" data-hires=\"false\"><\/p>\n<p class=\"typography-caption\">Renata P\u00f4rto\u2019s winning submission, \u201cPolar Patterns\u201d<\/p>\n<\/div>\n<p>The result brings the beauty and complexity of polar roses to a Swift playground \u2014 and landed P\u00f4rto a winning submission. \u201cIt\u2019s a great joy learning about development, even though I am a design student,\u201d she told us. \u201cStudying design helped me to practice my empathy for [people] and to know what resources to use and how to work with them to achieve better results.\u201d<\/p>\n<p>That empathy continues through her work with a local developer group, creating educational tools for new developers in her community. \u201cI always try to pass on my design knowledge to developers, and my developer knowledge to designers,\u201d she said. \u201cAnd hopefully one day they will make products that make a difference in other people\u2019s lives.\u201d<\/p>\n<hr>\n<p><em>Learn more about the Swift Student Challenge winners.<\/em><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/news\/?id=zvqmpiak\" class=\"icon icon-after icon-chevronright\">Swift Student Challenge winners determined to shape the future<\/a><\/p>\n<p><a href=\"https:\/\/apps.apple.com\/us\/story\/id1517413279\" class=\"icon icon-after icon-chevronright\">App Store: Meet the Swift Student Challenge winners<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this year, students from all around the world put their passion, ingenuity, and determination to work crafting Swift playground projects for the WWDC20 Swift Student Challenge. Students from 60 different countries and regions brought their talents to the table, using the challenge\u2019s three-minute limit to stretch their imaginations and explore Apple\u2019s frameworks and technologies. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":114630,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-114629","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apple-developer-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/114629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=114629"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/114629\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/114630"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=114629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=114629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=114629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}