Kodeco Forums

Introduction to the SpriteKit Scene Editor

Learn how to use the visual scene editor to create SpriteKit games with almost no code!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/620-introduction-to-the-spritekit-scene-editor

Fantastic introduction to the SK Scene Editor! Your flow and construction was easy to follow and builds concepts nicely.

Wanted to come on and mention that if someone is building this for their device, they’re going to have to change their deployment profile in the project settings to their own, not Ray Wenderlich’s, as the starter project settings are. :slight_smile: Just in case that throws someone.

1 Like

Enjoyed it and was surprised how quickly it came together. Spent some time in GameScene.swift to make sure I understood the starter code. Everything worked great and I look forward to more Caroline! Thanks again!

Sincerely, Tony

Thanks for the tutorial , I do have some questions

  1. How can we make the light not going through the wall ?
  2. Why fear_bg needs player for parent ?
  3. I tried to change scale of the light with the objects from the library to make the flame a bit more alive but it doesn’t work, do I have to do it programmatically ?
  4. Sometimes the walls are invisible when I play, how can I fix that ?

cheers

@nehemie

Good questions :smiley:

  1. I debated about this. You can stop the light going through the wall by using a pure black with full opacity shadow color on the light. But I changed it to 50% opacity because I thought it looked better.

  2. It doesn’t. You can put it as child of the scene. It’s only if it’s positional audio that it needs to be a child of the node.

  3. I’m not sure what you mean by this. If you find after poking about a lot and trying various things that you can’t do something in the Scene Editor, it will normally mean you have to do it programmatically.

  4. Are you sure that your background has a z-position of -1?

For my 3rd question , I tried to find an action to increase and decrease the brightness of the light to give the illusion to actually have a flame but I suppose now I have to do it with some code , also my background was at 0 before :blush: .

Thanks for your answers

@nehemie

For the 3rd, I guess you’d want to animate the falloff property. If it were scaling or fading, you could do it the animation timeline, (as in the tutorial where you scale the camera for the start of the scene). So I think it’s code.

Very nice tutorial, easy to follow, left enough unknowns that required some searching and learning. Thanks for a great lesson.

1 Like

@caroline

  1. How do I set full opacity? Do I use set the alpha on the wall to 1?

  2. I set ‘Shadow Color’ on the light to black and alpha on the wall to 1. The background in the shadow of the wall is black but I can still see the zombies (they are shadowed but visible. The zombie Light Mask, Shadow Cast Mask, and Shadowed Mask are all set to 1. The Light Mask for the SKLightNode are set to 1.) on the other side of the wall. How can the black shadow be made to hide them too?

thanks

  1. To set full opacity of the shadow, you select the SKLightNode and change the Shadow Color’s opacity from 50% to 100%

  2. Unfortunately you’ve hit an Apple bug. If shadowedBitMask is set to the same as the SKLightNode’s Lighting Mask, and the obstacle’s shadowCastBitMask is also the same, the sprite node is supposed to be rendered taking into account shadowing.

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]