Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmksquare committed Jun 17, 2020
0 parents commit 79e0ac0
Show file tree
Hide file tree
Showing 89 changed files with 2,667 additions and 0 deletions.
9 changes: 9 additions & 0 deletions LICENSE
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.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# WWDC20 PlaygroundBook Sumission



![image](./images/image_1.png)

![image](./images/image_2.png)

## 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`.
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>
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()
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>
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.

![Round Yut board?](yut_board_round.png)

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
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()
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>
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


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()
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>
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!

![People playing yut?](yut_play.jpg)

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.
*/
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()
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>
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!

![Yut Board and Sticks?](yut.jpg)

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!**
*/
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()
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>
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
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()
Loading

0 comments on commit 79e0ac0

Please sign in to comment.