I want to try to have a sprite kit node move through this image and when it contacts one of the blocks it executes a function and is blocked from moving forward, but it can pass through the gaps. The way my code is set up now however, the entire image is recognized as one node so nothing can pass through even the gaps. I was wondering if anyone had some suggestions on how to work around this without having to add each individual block as its own node. Thanks.
Sorry to disappoint you but what you want to do is not possible. I know of 2 ways to detect collisions. 1) through physics like you are already doing 2) through use of intersects(_:)
Both of them require you to have separate objects. Else how is the system supposed to know the difference between the space in-between the objects and the objects them selves. Your saying you want one massive object. Maybe you could write some great script that detects intersection of different colours, but that would be a really strange solution to a simple problem
Like Steve asked. Why do you not want to add them individually? It's really easy to do. Just create an instance of the object then add it multiple times with different positions. If you are not sure how to do this then, this is the question you need to be asking.