From 16ea9836491a3c2e00ac5fc0089c1c999046f1aa Mon Sep 17 00:00:00 2001 From: Benjamin Kindle Date: Mon, 21 Dec 2020 15:45:42 -0500 Subject: [PATCH] make sure scene is paused and removed when game ends --- Wonky Blocks.xcodeproj/project.pbxproj | 6 ++++-- Wonky Blocks/UI/GameViewController.swift | 3 +++ app-store-description.md | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 app-store-description.md diff --git a/Wonky Blocks.xcodeproj/project.pbxproj b/Wonky Blocks.xcodeproj/project.pbxproj index c3ff109..ac17cd7 100644 --- a/Wonky Blocks.xcodeproj/project.pbxproj +++ b/Wonky Blocks.xcodeproj/project.pbxproj @@ -77,6 +77,7 @@ 45A248C424965BB40030EC50 /* physicsCategories.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = physicsCategories.swift; sourceTree = ""; }; 45BEC135244E5D6400B38F83 /* SwiftClipperPath+asCgPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SwiftClipperPath+asCgPath.swift"; sourceTree = ""; }; 45CFA6FC2590FA42000509BB /* Screenshots-instructions.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "Screenshots-instructions.md"; sourceTree = ""; }; + 45CFA6FF25910D7E000509BB /* app-store-description.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "app-store-description.md"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -118,6 +119,7 @@ 45525A5C244C7FD4004974AB = { isa = PBXGroup; children = ( + 45CFA6FF25910D7E000509BB /* app-store-description.md */, 45CFA6FC2590FA42000509BB /* Screenshots-instructions.md */, 459133A42496CAE6006BAC3D /* README.md */, 45332F4924ECA14500F7A72C /* Documentation */, @@ -446,7 +448,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "Wonky Blocks/Wonky Blocks.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEVELOPMENT_ASSET_PATHS = "\"Wonky Blocks/Preview Content\""; DEVELOPMENT_TEAM = Z6E4CU9G46; ENABLE_PREVIEWS = YES; @@ -469,7 +471,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "Wonky Blocks/Wonky Blocks.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEVELOPMENT_ASSET_PATHS = "\"Wonky Blocks/Preview Content\""; DEVELOPMENT_TEAM = Z6E4CU9G46; ENABLE_PREVIEWS = YES; diff --git a/Wonky Blocks/UI/GameViewController.swift b/Wonky Blocks/UI/GameViewController.swift index a76463f..6f34289 100644 --- a/Wonky Blocks/UI/GameViewController.swift +++ b/Wonky Blocks/UI/GameViewController.swift @@ -31,6 +31,8 @@ class WonkyGameViewController: UIViewController { } deinit { + spriteKitView.scene?.isPaused = true + spriteKitView.presentScene(nil) physicsController.can?.cancel() allCans.forEach { $0.cancel() } } @@ -57,6 +59,7 @@ class WonkyGameViewController: UIViewController { // update row indicators (this block doesn't remove ant rows) let timerCan = Timer.publish(every: 0.1, on: .main, in: .common).autoconnect().sink { (_) in + DispatchQueue.global(qos: .background).async { // gets the percentage that each row is filled compared to the target required to clear a row let rowStates = self.rows.map { $0.calculateRowArea() / Self.rowFilledThreshold } diff --git a/app-store-description.md b/app-store-description.md new file mode 100644 index 0000000..22f0acc --- /dev/null +++ b/app-store-description.md @@ -0,0 +1,10 @@ +# App Store Description + +> This is the description that shows up with that app in the app store. If anyone has a suggestion on different wording, open a PR to change this file. It's not automated or anything, but I will try to keep the app store description up to date with this. +You may notice I didn't mention Tetris by name. This is intentional. + +An interesting twist on the classic puzzle arcade game we all love. By removing the restrictions of a grid and adding physics, this game is a new, yet familiar challenge. + +As the pieces fall from the top of the board, your goal is to last as long as possible without the game area overflowing. Lines are removed when you fill them up with enough pieces. The longer you last, the faster pieces fall and the more points you get. + +This is an open source game. Anyone can see the code on GitHub and contribute their own changes to the game.