Cat Nap: Chap 10 - Making Compound Objects p271

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, and compile, everything disappears from my screen. I have deleted this file, created a new one and simply copied the code from the reference files provided without any change. I simply get the music to play. When I delete the new file and compile, all works normally to what should happen up to this section. So is it a file issue or a coding issue?

Any thoughts by anyone? Thanks

hey rob, the easiest thing to try is running the final project included with the chapter - if that works fine, including the stone nodes, than you need to retrace your steps. In case the final project included also doesn’t work - it must be a glitch with a newer version of Xcode/SpriteKit - in that case let me know and I can give it a try myself :slight_smile:

hello Marin

Thanks for your reply.

Everything in CatNap worked just fine up to page 271, Making Compound Objects, in the 2D Games book.
That section is only a few pages long.

I have recreated the code (and created the file) several times now without luck. I have included the code I generated by copying your instructions (see below).
I have copied your code from both Challenge 1 and the Final to my program without luck.

Your Challenge code and your Final for Chap 10 both do work.

That leaves me to believe that something is going wrong with the creation of the file - can that be so?

My code is below - whoops, I can’t seem to figure out how to attach a file.

In any case, I will now just use your challenge project from here (too much time spent on one little item) - and working through the book to understand the stuff.

I’m using Xcode 8.2.1

Thanks again.


thanks Rob, I’ll put extra attention to that chapter when we do the next update - if there’s anything wrong in the text we’ll catch it