-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 79e0ac0
Showing
89 changed files
with
2,667 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 BumMo Koo | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# WWDC20 PlaygroundBook Sumission | ||
|
||
|
||
|
||
 | ||
|
||
 | ||
|
||
## Description | ||
|
||
This PlaygroundBook is accepted as Apple's WWDC20 Student Swift Challenge award. In this PlaygroundBook, a Korean traditional game "Yut (윷)" is introduced. You can get a breif look at what Yut is, how the game works, and get to play it in a 3D environment. It can run on both macOS & iPadOS Swift Playground, but was submitted to run on iPadOS. (Because `PencilKit` does not work on macOS) | ||
|
||
|
||
|
||
It is made and tested with following tools: Xcode 11, Swift Playground (macOS & iPadOS version), Swift Playgrounds Author Template from Apple, Affinity Photo, Blender, and Reality Converter from Apple. | ||
|
||
|
||
|
||
It uses following frameworks: `Foundation`, `UIKit`, `SceneKit`, `AVFoundation`, `PencilKit`. | ||
|
||
|
||
|
||
Resources are from: Wikipedia, Wikimedia, textures.com. | ||
|
||
|
||
|
||
## Notice | ||
|
||
Just 20 minitue before submission, unknown part of the PlaygroundBook suddenly kept crashing, rendering everything unsuable. (Yes, I should have used git ¯\_(ツ)_/¯) I had to sumit a backup version that was unpolisehd and buggy. It missed some features (especially `ARKit` version of the game and the way game work), had typos, unmatching descriptions and dummy images, with some bugs. | ||
|
||
|
||
|
||
I was originally extremely disappointed that I couldn't submit a fully polished and feature-complete version originally imagined. Now I'm very surprised and happy I got accepted. | ||
|
||
|
||
|
||
This version of PlaygroundBook keeps everything as submitted, for anybody who wants future reference. | ||
|
||
|
||
|
||
## LICENSE | ||
|
||
See `LICENSE`. |
18 changes: 18 additions & 0 deletions
18
...v2.1 Submitted.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Manifest.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Name</key> | ||
<string>ChapterOneName</string> | ||
<key>Pages</key> | ||
<array> | ||
<string>Introduction.playgroundpage</string> | ||
<string>GameIntro.playgroundpage</string> | ||
<string>Board.playgroundpage</string> | ||
<string>Token.playgroundpage</string> | ||
<string>Stick.playgroundpage</string> | ||
<string>SceneKit.playgroundpage</string> | ||
<string>Epilogue.playgroundpage</string> | ||
</array> | ||
</dict> | ||
</plist> |
13 changes: 13 additions & 0 deletions
13
...ok/Contents/Chapters/Chapter1.playgroundchapter/Pages/Board.playgroundpage/LiveView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// See LICENSE folder for this template’s licensing information. | ||
// | ||
// Abstract: | ||
// Instantiates a live view and passes it to the PlaygroundSupport framework. | ||
// | ||
|
||
import UIKit | ||
import BookCore | ||
import PlaygroundSupport | ||
|
||
// Instantiate a new instance of the live view from BookCore and pass it to PlaygroundSupport. | ||
PlaygroundPage.current.liveView = BoardViewController.liveView() |
14 changes: 14 additions & 0 deletions
14
...ok/Contents/Chapters/Chapter1.playgroundchapter/Pages/Board.playgroundpage/Manifest.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Name</key> | ||
<string>BoardPageName</string> | ||
<key>LiveViewEdgeToEdge</key> | ||
<true/> | ||
<key>LiveViewMode</key> | ||
<string>VisibleByDefault</string> | ||
<key>PlaygroundLoggingMode</key> | ||
<string>Off</string> | ||
</dict> | ||
</plist> |
23 changes: 23 additions & 0 deletions
23
...ndbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Board.playgroundpage/main.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//#-hidden-code | ||
// | ||
// Created by BumMo Koo on May 2020. | ||
// Copyright © 2020 BumMo Koo. All rights reserved. | ||
// | ||
//#-end-hidden-code | ||
|
||
/*: | ||
# Board | ||
|
||
Yut board is a rectangularly shaped, with four straight courses and two diagnoal courses. There is a total of 29 stations. The center stations is said to represent the Polar Star, and others eastern constellation. Historically, there was a round variation of the board. | ||
|
||
 | ||
|
||
When you arrive at stations with branches, you can take the shortcut. However, you can't take the shortcut unless you stop at the branching station. | ||
|
||
One interesting way to win is advance one step, and go back one step go reach the end. It rarely happens, but when it does, it can turn the tide of the game! | ||
*/ | ||
|
||
//#-hidden-code | ||
//let boardTheme = "" | ||
//let tokenTheme = "" | ||
//#-end-hidden-code |
14 changes: 14 additions & 0 deletions
14
...Contents/Chapters/Chapter1.playgroundchapter/Pages/Epilogue.playgroundpage/LiveView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// See LICENSE folder for this template’s licensing information. | ||
// | ||
// Abstract: | ||
// Instantiates a live view and passes it to the PlaygroundSupport framework. | ||
// | ||
|
||
import UIKit | ||
import BookCore | ||
import PlaygroundSupport | ||
|
||
// Instantiate a new instance of the live view from BookCore and pass it to PlaygroundSupport. | ||
//PlaygroundPage.current.liveView = EpilogueViewController.liveView() | ||
PlaygroundPage.current.liveView = IntroductionViewController.liveView() |
14 changes: 14 additions & 0 deletions
14
...Contents/Chapters/Chapter1.playgroundchapter/Pages/Epilogue.playgroundpage/Manifest.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Name</key> | ||
<string>EpiloguePageName</string> | ||
<key>LiveViewEdgeToEdge</key> | ||
<true/> | ||
<key>LiveViewMode</key> | ||
<string>VisibleByDefault</string> | ||
<key>PlaygroundLoggingMode</key> | ||
<string>Off</string> | ||
</dict> | ||
</plist> |
53 changes: 53 additions & 0 deletions
53
...ook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Epilogue.playgroundpage/main.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
//#-hidden-code | ||
// | ||
// Created by BumMo Koo on May 2020. | ||
// Copyright © 2020 BumMo Koo. All rights reserved. | ||
// | ||
//#-end-hidden-code | ||
|
||
/*: | ||
# Thanks for playing! | ||
|
||
Hope you enjoyed the Yut game. I hope this playground triggered some interest in Korean culture! | ||
|
||
--- | ||
|
||
Yut - a Tranditional Korean Game | ||
|
||
Playground made with ❤️ by BumMo Koo | ||
|
||
Built using Xcode 11 and Swift Playground | ||
|
||
Using Swift Playgrounds Author Template from Apple | ||
|
||
Foundation, UIKit, SceneKit, AVFoundation | ||
|
||
Image from Wikipedia and Wikimedia | ||
|
||
2D assets created with Affinity Photo | ||
|
||
3D assets created with Blender | ||
|
||
USDZ converted using Reality Converter | ||
|
||
Textures from textures.com | ||
|
||
|
||
WWDC 2020 | ||
Swift Student Challenge | ||
|
||
BumMo Koo | ||
May 2020 | ||
|
||
May 2020 | ||
*/ | ||
|
||
//#-hidden-code | ||
/* | ||
|
||
|
||
|
||
*/ | ||
//#-end-hidden-code | ||
|
||
|
13 changes: 13 additions & 0 deletions
13
...ontents/Chapters/Chapter1.playgroundchapter/Pages/GameIntro.playgroundpage/LiveView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// See LICENSE folder for this template’s licensing information. | ||
// | ||
// Abstract: | ||
// Instantiates a live view and passes it to the PlaygroundSupport framework. | ||
// | ||
|
||
import UIKit | ||
import BookCore | ||
import PlaygroundSupport | ||
|
||
// Instantiate a new instance of the live view from BookCore and pass it to PlaygroundSupport. | ||
PlaygroundPage.current.liveView = GameIntroViewController.liveView() |
14 changes: 14 additions & 0 deletions
14
...ontents/Chapters/Chapter1.playgroundchapter/Pages/GameIntro.playgroundpage/Manifest.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Name</key> | ||
<string>GameIntroductionPageName</string> | ||
<key>LiveViewEdgeToEdge</key> | ||
<true/> | ||
<key>LiveViewMode</key> | ||
<string>VisibleByDefault</string> | ||
<key>PlaygroundLoggingMode</key> | ||
<string>Off</string> | ||
</dict> | ||
</plist> |
20 changes: 20 additions & 0 deletions
20
...ok/Contents/Chapters/Chapter1.playgroundchapter/Pages/GameIntro.playgroundpage/main.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//#-hidden-code | ||
// | ||
// Created by BumMo Koo on May 2020. | ||
// Copyright © 2020 BumMo Koo. All rights reserved. | ||
// | ||
//#-end-hidden-code | ||
|
||
/*: | ||
# Yut | ||
|
||
Yut, pronounced "Yoot" (/juːt/), is a traditional board game in Korea. It is often played during Korean Lunar New Year's Day when family and relatives are gathered. | ||
|
||
In fact, I got the idea of making this playground this year, while playing Yut with my family! | ||
|
||
 | ||
|
||
To here the pronunciation of "Yut", run the playground and hear the pronunciation. | ||
|
||
Also, yut is written as "윷" in Korea. Try to write the word with an Apple Pencil or your finger. | ||
*/ |
13 changes: 13 additions & 0 deletions
13
...ents/Chapters/Chapter1.playgroundchapter/Pages/Introduction.playgroundpage/LiveView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// See LICENSE folder for this template’s licensing information. | ||
// | ||
// Abstract: | ||
// Instantiates a live view and passes it to the PlaygroundSupport framework. | ||
// | ||
|
||
import UIKit | ||
import BookCore | ||
import PlaygroundSupport | ||
|
||
// Instantiate a new instance of the live view from BookCore and pass it to PlaygroundSupport. | ||
PlaygroundPage.current.liveView = IntroductionViewController.liveView() |
16 changes: 16 additions & 0 deletions
16
...ents/Chapters/Chapter1.playgroundchapter/Pages/Introduction.playgroundpage/Manifest.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Name</key> | ||
<string>IntroductionPageName</string> | ||
<key>LiveViewEdgeToEdge</key> | ||
<true/> | ||
<key>LiveViewMode</key> | ||
<string>VisibleByDefault</string> | ||
<key>PlaygroundLoggingMode</key> | ||
<string>Off</string> | ||
<key>PosterReference</key> | ||
<string>Cover.png</string> | ||
</dict> | ||
</plist> |
23 changes: 23 additions & 0 deletions
23
...Contents/Chapters/Chapter1.playgroundchapter/Pages/Introduction.playgroundpage/main.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//#-hidden-code | ||
// | ||
// Created by BumMo Koo on May 2020. | ||
// Copyright © 2020 BumMo Koo. All rights reserved. | ||
// | ||
//#-end-hidden-code | ||
|
||
/*: | ||
# Introduction | ||
|
||
|
||
Welcome! | ||
|
||
 | ||
|
||
In this playground, I will introduce you a Korean traditional game - **Yut**. | ||
|
||
You will get a breif introduction of the Yut game, will learn the rules and how to play, and finally play the yourself. | ||
|
||
This playground mainly showcases use of `SceneKit` and `ARKit`. Other frameworks and tools used to create this playground are mentioned at the end. | ||
|
||
**Let's begin!** | ||
*/ |
13 changes: 13 additions & 0 deletions
13
...Contents/Chapters/Chapter1.playgroundchapter/Pages/SceneKit.playgroundpage/LiveView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// See LICENSE folder for this template’s licensing information. | ||
// | ||
// Abstract: | ||
// Instantiates a live view and passes it to the PlaygroundSupport framework. | ||
// | ||
|
||
import UIKit | ||
import BookCore | ||
import PlaygroundSupport | ||
|
||
// Instantiate a new instance of the live view from BookCore and pass it to PlaygroundSupport. | ||
PlaygroundPage.current.liveView = SceneKitGameViewController.liveView() |
16 changes: 16 additions & 0 deletions
16
...Contents/Chapters/Chapter1.playgroundchapter/Pages/SceneKit.playgroundpage/Manifest.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Name</key> | ||
<string>SceneKitPageName</string> | ||
<key>LiveViewEdgeToEdge</key> | ||
<true/> | ||
<key>LiveViewMode</key> | ||
<string>VisibleByDefault</string> | ||
<key>PlaygroundLoggingMode</key> | ||
<string>Off</string> | ||
<key>MaximumSupportedExecutionSpeed</key> | ||
<string>Fastest</string> | ||
</dict> | ||
</plist> |
25 changes: 25 additions & 0 deletions
25
...ook/Contents/Chapters/Chapter1.playgroundchapter/Pages/SceneKit.playgroundpage/main.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//#-hidden-code | ||
// | ||
// Created by BumMo Koo on May 2020. | ||
// Copyright © 2020 BumMo Koo. All rights reserved. | ||
// | ||
//#-end-hidden-code | ||
|
||
/*: | ||
# Let's Play! | ||
|
||
Now that you learned the basics of the game, it's finally time to experience the Yut game! | ||
|
||
* Tap "Throw" or shake device to throw sticks. | ||
* Tap on tokens to see featsible steps. | ||
* Stations you can move to are highlighted with a red sphere. | ||
|
||
Have fun! | ||
*/ | ||
|
||
//#-hidden-code | ||
|
||
//let player1Name = "" | ||
//let player2Name = "" | ||
|
||
//#-end-hidden-code |
13 changes: 13 additions & 0 deletions
13
...ok/Contents/Chapters/Chapter1.playgroundchapter/Pages/Stick.playgroundpage/LiveView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// See LICENSE folder for this template’s licensing information. | ||
// | ||
// Abstract: | ||
// Instantiates a live view and passes it to the PlaygroundSupport framework. | ||
// | ||
|
||
import UIKit | ||
import BookCore | ||
import PlaygroundSupport | ||
|
||
// Instantiate a new instance of the live view from BookCore and pass it to PlaygroundSupport. | ||
PlaygroundPage.current.liveView = StickViewController.liveView() |
Oops, something went wrong.