How to Make a Game Like Candy Crush with SpriteKit and Swift: Part 1

Great tutorial!

I had a question regarding using different images. What if I wanted to save and load images from the Photo library? I have already written the functions to save and get an image array of images that are stored in the image directory I programmatically created. I am trying to load the sprite using the same:
let sprite = SKSpriteNode(imageNamed: fSprite)
using fSprite as the image directory of the saved image, but it is not workingā€¦

any suggestions? thanks!

Hey there, great tutorial! I had a quick question about the grid of tiles. If I wanted to have different dimensions, say 16x16, how would I go about this (I have tried changing dimension constants but that doesnā€™t work). In addition, how could this be done in a way that doesnā€™t move the background. Thanks!

Hi,

Iā€™ve followed the tutorial, it works, but now I want to modify it to do something else.
Iā€™m trying to reuses this piece of code but Iā€™ve noticed something strange.
If I want to use the cookiesLayer size, Iā€™ve seen itā€™s empty even even though I have all my cookies added.
I y do a print(cookiesLayer.size.height) or
print(cookiesLayer.size.width) it displays 0.0.

Can someone explain it to me why this is happening ?
I already tried to add a background color to see the size but I couldā€™t see nothing.
Maybe because the size of the layer is 0.0x0.0 ? Is not expanding when adding cookies ?

Thanks.

Do any of you have a gap between random tiles? This bug is killing me and I canā€™t figure how to fix it.

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