# 2D iOS & tvOS Games by Tutorials

**URL:** https://forums.kodeco.com/c/books/2d-ios-tvos-games-by-tutorials/14.md?page=4

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 5

---

## [Is there a way to translate things done using Scene Editor to code?](https://forums.kodeco.com/t/is-there-a-way-to-translate-things-done-using-scene-editor-to-code/30548)

<div class="topic-metadata">

**Author:** [@aliiiiiiceee](https://forums.kodeco.com/u/aliiiiiiceee)\
**Replies:** 1\
**Last updated:** [June 6, 2017, 12:49am UTC](https://forums.kodeco.com/t/is-there-a-way-to-translate-things-done-using-scene-editor-to-code/30548 "2017-06-06T00:49:06Z")

</div>

So i made a few scenes using SKScene editor but would like to have it in code, is there a way to do so?

---

## [Pinning the board in chapter 11](https://forums.kodeco.com/t/pinning-the-board-in-chapter-11/12757)

<div class="topic-metadata">

**Author:** [@ulfandersson](https://forums.kodeco.com/u/ulfandersson)\
**Replies:** 5\
**Last updated:** [June 3, 2017, 7:26pm UTC](https://forums.kodeco.com/t/pinning-the-board-in-chapter-11/12757 "2017-06-03T19:26:10Z")

</div>

Hi! I’m looking for the code for pinning the board in challenge1, chapter 11 of 2D iOS & tvOS Games by Tutorials. It doesn’t seem to be presented in the book. The question has been asked before, according to a Google s…

---

## [Download 2DGames to iPad?](https://forums.kodeco.com/t/download-2dgames-to-ipad/30360)

<div class="topic-metadata">

**Author:** [@roblawson](https://forums.kodeco.com/u/roblawson)\
**Replies:** 0\
**Last updated:** [May 31, 2017, 7:40pm UTC](https://forums.kodeco.com/t/download-2dgames-to-ipad/30360 "2017-05-31T19:40:28Z")

</div>

After finishing the tutorials, can the games be downloaded to one’s own iPad or iPhone? I tried this but could not get past the RW development team certification. Please advise

---

## [Assets Sizing - Help](https://forums.kodeco.com/t/assets-sizing-help/29917)

<div class="topic-metadata">

**Author:** [@darkmatter](https://forums.kodeco.com/u/darkmatter)\
**Replies:** 0\
**Last updated:** [May 19, 2017, 10:04pm UTC](https://forums.kodeco.com/t/assets-sizing-help/29917 "2017-05-19T22:04:15Z")

</div>

Hey I have a question regarding asset background sizing. In the tutorial book we use a universal asset sizes. My question is the ipad size is 2048 by 1536 this would be the 3x ?? and if i wanted it to fit on an iphone 6…

---

## [Ch 23: Page 611 Linking to auto-record button](https://forums.kodeco.com/t/ch-23-page-611-linking-to-auto-record-button/29898)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 0\
**Last updated:** [May 19, 2017, 3:41pm UTC](https://forums.kodeco.com/t/ch-23-page-611-linking-to-auto-record-button/29898 "2017-05-19T15:41:21Z")

</div>

In Xcode 8.3.2 I had to drag from the small circle beside the @IBAction code to the button to get a link. No choice but the Touch Up Inside was connected. I couldn’t get a control-click to work anywhere.

---

## [Chapter 14 Saving and Loading](https://forums.kodeco.com/t/chapter-14-saving-and-loading/29814)

<div class="topic-metadata">

**Author:** [@darkmatter](https://forums.kodeco.com/u/darkmatter)\
**Replies:** 2\
**Last updated:** [May 18, 2017, 2:09pm UTC](https://forums.kodeco.com/t/chapter-14-saving-and-loading/29814 "2017-05-18T14:09:52Z")

</div>

I keep getting an error the player node is always nil I cannot figure this out for the life of me. Is anyone else getting this error ?? But when I put addchild(player) instead it has both characters on the scene…very co…

---

## [P197, recording slider?](https://forums.kodeco.com/t/p197-recording-slider/29684)

<div class="topic-metadata">

**Author:** [@perlguy](https://forums.kodeco.com/u/perlguy)\
**Replies:** 0\
**Last updated:** [May 15, 2017, 5:16pm UTC](https://forums.kodeco.com/t/p197-recording-slider/29684 "2017-05-15T17:16:23Z")

</div>

The code works fine, but I am a bit confused. The text says to “move the recording slider left and right to see the…” Where do I find the “recording slider”? Thanks

---

## [Page 394 problem! fatal error in pest control! PLEASE HELP](https://forums.kodeco.com/t/page-394-problem-fatal-error-in-pest-control-please-help/26836)

<div class="topic-metadata">

**Author:** [@joeeydubu](https://forums.kodeco.com/u/joeeydubu)\
**Replies:** 4\
**Last updated:** [May 14, 2017, 2:35pm UTC](https://forums.kodeco.com/t/page-394-problem-fatal-error-in-pest-control-please-help/26836 "2017-05-14T14:35:33Z")

</div>

okay so I got through the whole of pest control and finally came to the end 394, and added all of the init(coder:) to the player, bug, game scene, then I go to run and it fatal errors saying unexpectedly found nil whils…

---

## [Ch21: Page 562 Registering the app](https://forums.kodeco.com/t/ch21-page-562-registering-the-app/29614)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 0\
**Last updated:** [May 12, 2017, 7:09pm UTC](https://forums.kodeco.com/t/ch21-page-562-registering-the-app/29614 "2017-05-12T19:09:00Z")

</div>

I seem to have problems with this each time I work with a new app. My understanding is that you need to get an App ID before registering on iTunes Connect. I did this through Developer Center:Account:Login. Then Certific…

---

## [What's the meaning of?](https://forums.kodeco.com/t/whats-the-meaning-of/29512)

<div class="topic-metadata">

**Author:** [@nehemie](https://forums.kodeco.com/u/nehemie)\
**Replies:** 4\
**Last updated:** [May 12, 2017, 5:20am UTC](https://forums.kodeco.com/t/whats-the-meaning-of/29512 "2017-05-12T05:20:55Z")

</div>

Hi everyone , I am actually doing the tile map tutorial, I feel myself stuck with the meaning of a line in a method in the chapter 13: Intermediate Tile Maps page 364. func tileGroupForName(tileSet: SKTileSet, name: St…

---

## [Ch19: Page 533 Images for tvOS version](https://forums.kodeco.com/t/ch19-page-533-images-for-tvos-version/29574)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 0\
**Last updated:** [May 11, 2017, 4:50pm UTC](https://forums.kodeco.com/t/ch19-page-533-images-for-tvos-version/29574 "2017-05-11T16:50:09Z")

</div>

Update: I started from the macOS challenge folder and added a new target, tvOS. It now seems to only have the Apple tv icons and not the additional Universal ones. I must have done something wrong the first time…not sure…

---

## [Chapter 12 page 338](https://forums.kodeco.com/t/chapter-12-page-338/29279)

<div class="topic-metadata">

**Author:** [@nehemie](https://forums.kodeco.com/u/nehemie)\
**Replies:** 2\
**Last updated:** [May 5, 2017, 12:30pm UTC](https://forums.kodeco.com/t/chapter-12-page-338/29279 "2017-05-05T12:30:53Z")

</div>

Hi everyone, I am doing the tile map tutorial can anyone explain me this function in deeper details please (the function is to have special animation depending on which direction my character is moving) func animationD…

---

## [Where is the SKTUtils folder?](https://forums.kodeco.com/t/where-is-the-sktutils-folder/28175)

<div class="topic-metadata">

**Author:** [@jallison22](https://forums.kodeco.com/u/jallison22)\
**Replies:** 2\
**Last updated:** [May 3, 2017, 4:30pm UTC](https://forums.kodeco.com/t/where-is-the-sktutils-folder/28175 "2017-05-03T16:30:10Z")

</div>

I am working through Catnap and have ground to a halt because can’t find the SKUtils folder. I just re-downloaded the book, but I am not able to find SKTUtils. i am guessing the rest of the tutorial relies on the library…

---

## [Ch15: P416 - Int.random?](https://forums.kodeco.com/t/ch15-p416-int-random/29131)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 3\
**Last updated:** [May 2, 2017, 3:18pm UTC](https://forums.kodeco.com/t/ch15-p416-int-random/29131 "2017-05-02T15:18:45Z")

</div>

Int doesn’t seem to have the method random. It seems to be used in SKTUtilies as well. I used let intRandom = 1 + Int(arc4random\_uniform(100)) // if Int.random(min: 1, max: 100) \<= platformPercentage if in…

---

## [Ch11 P301 Error Terminating app due to uncaught exception 'NSInvalidArgumentException'](https://forums.kodeco.com/t/ch11-p301-error-terminating-app-due-to-uncaught-exception-nsinvalidargumentexception/28931)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 1\
**Last updated:** [April 26, 2017, 6:22pm UTC](https://forums.kodeco.com/t/ch11-p301-error-terminating-app-due-to-uncaught-exception-nsinvalidargumentexception/28931 "2017-04-26T18:22:19Z")

</div>

I’ve just added the hint sprite and the start of the HintNode code and get this error. Any suggestions? Thanks

---

## [Chapter 2: Challenge 2](https://forums.kodeco.com/t/chapter-2-challenge-2/28814)

<div class="topic-metadata">

**Author:** [@polyhickup](https://forums.kodeco.com/u/polyhickup)\
**Replies:** 1\
**Last updated:** [April 25, 2017, 9:48am UTC](https://forums.kodeco.com/t/chapter-2-challenge-2/28814 "2017-04-25T09:48:50Z")

</div>

For my game I need to modify some of the code that is used in this challenge. But I do not get the code and how it works. I am talking about this code: //1 if let lastTouchLocation = lastTouchLocation { let diff = lastT…

---

## [From the Animatable example, just need a tad of guidance please on a new project](https://forums.kodeco.com/t/from-the-animatable-example-just-need-a-tad-of-guidance-please-on-a-new-project/27843)

<div class="topic-metadata">

**Author:** [@escarn88](https://forums.kodeco.com/u/escarn88)\
**Replies:** 0\
**Last updated:** [April 3, 2017, 7:38pm UTC](https://forums.kodeco.com/t/from-the-animatable-example-just-need-a-tad-of-guidance-please-on-a-new-project/27843 "2017-04-03T19:38:13Z")

</div>

Hello, I want to animate to a direction like I did in the examples but I made a sprite which is spawned in random positions and moves randomly. I can’t seem to remember how to capture the previous position to minus curr…

---

## [Adding the art section of chapter 1 - can't find "starter\\resources\\icons"](https://forums.kodeco.com/t/adding-the-art-section-of-chapter-1-cant-find-starter-resources-icons/28570)

<div class="topic-metadata">

**Author:** [@liorwinston](https://forums.kodeco.com/u/liorwinston)\
**Replies:** 4\
**Last updated:** [April 20, 2017, 12:58pm UTC](https://forums.kodeco.com/t/adding-the-art-section-of-chapter-1-cant-find-starter-resources-icons/28570 "2017-04-20T12:58:14Z")

</div>

I bought the physical copy and I don’t know where can I find the path to the files. Please advise.

---

## [Cat Nap: Chap 10 - Making Compound Objects p271](https://forums.kodeco.com/t/cat-nap-chap-10-making-compound-objects-p271/27310)

<div class="topic-metadata">

**Author:** [@roblawson](https://forums.kodeco.com/u/roblawson)\
**Replies:** 3\
**Last updated:** [April 18, 2017, 6:04pm UTC](https://forums.kodeco.com/t/cat-nap-chap-10-making-compound-objects-p271/27310 "2017-04-18T18:04:15Z")

</div>

Has anyone been able to make it through this section successfully? Up to this point, everything has worked fine. However, when I create the new StoneNode file (that is supposed to join the stones) and enter the code, a…

---

## [Images in Adding the art section of chapter 1](https://forums.kodeco.com/t/images-in-adding-the-art-section-of-chapter-1/13408)

<div class="topic-metadata">

**Author:** [@thicksauce](https://forums.kodeco.com/u/thicksauce)\
**Replies:** 2\
**Last updated:** [April 18, 2017, 4:55pm UTC](https://forums.kodeco.com/t/images-in-adding-the-art-section-of-chapter-1/13408 "2017-04-18T16:55:26Z")

</div>

Hello, Reading the book and so far so good! just ran into alittle snag , when it addresses the AppIcon and it says to drag and drop the appropriate icon from “starter\\resources\\icons” i have no idea where this file pat…

---

## [Cat Nap p260 - rope and hook do not show](https://forums.kodeco.com/t/cat-nap-p260-rope-and-hook-do-not-show/26393)

<div class="topic-metadata">

**Author:** [@roblawson](https://forums.kodeco.com/u/roblawson)\
**Replies:** 2\
**Last updated:** [April 6, 2017, 5:55pm UTC](https://forums.kodeco.com/t/cat-nap-p260-rope-and-hook-do-not-show/26393 "2017-04-06T17:55:35Z")

</div>

In Cat Nap, p260 (chap 10), after adding code for the hook and the rope on p259 and p258, the rope and hook should be visible when running the simulator (per the author’s remarks). The rope and hook do NOT appear in the…

---

## [CatNap: mrreow.mp3 not looping](https://forums.kodeco.com/t/catnap-mrreow-mp3-not-looping/21831)

<div class="topic-metadata">

**Author:** [@sonoblaise](https://forums.kodeco.com/u/sonoblaise)\
**Replies:** 7\
**Last updated:** [April 6, 2017, 1:30am UTC](https://forums.kodeco.com/t/catnap-mrreow-mp3-not-looping/21831 "2017-04-06T01:30:55Z")

</div>

It seems there is a problem here with the PlaySoundFileNamed action we put in the cat’s mouth animation. I just realized that the sound does play, but only once and it raises an error: 2016-10-27 15:11:09.183 CatNap\[28…

---

## [Ch 13: No firebugs - a bug?](https://forums.kodeco.com/t/ch-13-no-firebugs-a-bug/27637)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 2\
**Last updated:** [March 28, 2017, 7:28pm UTC](https://forums.kodeco.com/t/ch-13-no-firebugs-a-bug/27637 "2017-03-28T19:28:26Z")

</div>

I’m on page 355-6 and finding no firebugs when I run the game. I just upgraded to Xcode 8.3 :wink: In TileSets.sks selecting Enemies:bug:Tile:firebug the User Data entry doesn’t seem to like firebug as a Name but revert…

---

## [Particle Z order using TargetNode - need a global Z order](https://forums.kodeco.com/t/particle-z-order-using-targetnode-need-a-global-z-order/27473)

<div class="topic-metadata">

**Author:** [@3dfuel](https://forums.kodeco.com/u/3dfuel)\
**Replies:** 0\
**Last updated:** [March 23, 2017, 9:06pm UTC](https://forums.kodeco.com/t/particle-z-order-using-targetnode-need-a-global-z-order/27473 "2017-03-23T21:06:11Z")

</div>

I am building a little top down two player tank game (the book has been quite helpful!). What I am trying to do is have my tank start to smoke once it’s life points get below a certain amount. That all works just fine. …

---

## [HELP! Challenge 1: Obstacles](https://forums.kodeco.com/t/help-challenge-1-obstacles/27186)

<div class="topic-metadata">

**Author:** [@briancanela](https://forums.kodeco.com/u/briancanela)\
**Replies:** 1\
**Last updated:** [March 14, 2017, 6:05am UTC](https://forums.kodeco.com/t/help-challenge-1-obstacles/27186 "2017-03-14T06:05:24Z")

</div>

I did the challenge, but there is problem I am having. When I checked on the select tile, there is no wall tile I created in the GameScene.sks for the Obstacles set. There is still just the grass and water tiles appearin…

---

## [ZombieConga, enumerateChildNodes in swift 3](https://forums.kodeco.com/t/zombieconga-enumeratechildnodes-in-swift-3/17235)

<div class="topic-metadata">

**Author:** [@nickbonny](https://forums.kodeco.com/u/nickbonny)\
**Replies:** 4\
**Last updated:** [March 12, 2017, 5:43pm UTC](https://forums.kodeco.com/t/zombieconga-enumeratechildnodes-in-swift-3/17235 "2017-03-12T17:43:27Z")

</div>

Hi, I’ve just upgraded to swift 3 and i got a problem with: enumerateChildNodes(withName: “train”) { (node: SKNode, stop: UnsafeMutablePointer) in… In swift 2, if I wanted to stop enumerating nodes I could just type: s…

---

## [Page 217 Texture from image to physics](https://forums.kodeco.com/t/page-217-texture-from-image-to-physics/26945)

<div class="topic-metadata">

**Author:** [@mamazur](https://forums.kodeco.com/u/mamazur)\
**Replies:** 4\
**Last updated:** [March 9, 2017, 4:28am UTC](https://forums.kodeco.com/t/page-217-texture-from-image-to-physics/26945 "2017-03-09T04:28:39Z")

</div>

Just wonder how to create texture to physics from png picture without background with hole to physics. Such hole shouldn’t react to touch, physics contact or physics collision. How to do that? Some ideas. Thanks

---

## [GameContoller example?](https://forums.kodeco.com/t/gamecontoller-example/26817)

<div class="topic-metadata">

**Author:** [@3dfuel](https://forums.kodeco.com/u/3dfuel)\
**Replies:** 3\
**Last updated:** [March 9, 2017, 1:33am UTC](https://forums.kodeco.com/t/gamecontoller-example/26817 "2017-03-09T01:33:28Z")

</div>

Seems the book is missing a nice example of how to use a physical game controller. I saw an older Objective C version - anyone have a link to a nice simple (very simple!) sample project?

---

## [Chapter 2 defining boundaries (pg71)](https://forums.kodeco.com/t/chapter-2-defining-boundaries-pg71/26924)

<div class="topic-metadata">

**Author:** [@muzafar](https://forums.kodeco.com/u/muzafar)\
**Replies:** 3\
**Last updated:** [March 6, 2017, 2:18pm UTC](https://forums.kodeco.com/t/chapter-2-defining-boundaries-pg71/26924 "2017-03-06T14:18:46Z")

</div>

Hey people, When i define boundaries to bounce my zombie off i get an error stating I ‘cannot assign value of type ‘CGfloat’ to type ‘CGPoint’’ . as far as i can tell the zombie.position value is CGFloat and we defined…

---

## [Override func update(\_ currentTime: TimeInterval) is not working!](https://forums.kodeco.com/t/override-func-update---currenttime-timeinterval-is-not-working/25812)

<div class="topic-metadata">

**Author:** [@elearner](https://forums.kodeco.com/u/elearner)\
**Replies:** 4\
**Last updated:** [March 6, 2017, 12:01pm UTC](https://forums.kodeco.com/t/override-func-update---currenttime-timeinterval-is-not-working/25812 "2017-03-06T12:01:54Z")

</div>

I just started working on SpriteKit, today. I tried to paste the above function into my GameScene file and I get an error. The error states that “override can only be specified on class members” “Fix it - Delete overr…

[Previous page](https://forums.kodeco.com/c/books/2d-ios-tvos-games-by-tutorials/14.md?page=3)

[Next page](https://forums.kodeco.com/c/books/2d-ios-tvos-games-by-tutorials/14.md?page=5)
