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
Learn how to use the visual scene editor to create SpriteKit games with almost no code!
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. Just in case that throws someone.
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
cheers
Good questions
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.
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.
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.
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 .
Thanks for your answers
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.
How do I set full opacity? Do I use set the alpha on the wall to 1?
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
To set full opacity of the shadow, you select the SKLightNode and change the Shadow Color’s opacity from 50% to 100%
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! :]