Now that the physics is working for this basic node component, let’s make it a full contact sport. Contact detection is a huge benefit of using a physics engine, so in this SpriteKit tutorial I want to make sure that we can still enjoy those benefits while adhering closely to my weird interpretation of Entity Component Systems.
Game Development
A Physics Component for an Entity Component System in SpriteKit
Now that I have node components working in SpriteKit, it’s time to add something more dynamic than tapping to add a node that then doesn’t do anything.
Let’s get…physical.
(sorry.)
Using Different Assets for iPhones and iPads with SpriteKit
During my puzzle game process, I came up with a way that I could use a single Photoshop document and from this create larger sprites for iPads and Macs and smaller versions for iPhones.
Turns out that this might have had a case of Premature Optimisation (ladies…).
Creating a Generic Node Component in SpriteKit
After the development of my simple puzzle game, one of the things I wanted to do differently was using a generic Node Component. This would be a component that would do all the scaling, rotating, and positioning in such a way that it could apply to any node type (label, sprite, shape, etc) or even things like particle emitters.
In this post, I’ll create a simple SpriteKit scene with a basic render system and a few simple components to see how this might work.
As I write this, I’m walking the Dale’s Way with nothing but my iPad Pro so this will all be done using the Swift Playgrounds app.
Developing A Jigsaw Puzzle Game Part 10: Final Thoughts
I have reached the end of my jigsaw puzzle game journey!
Documenting this process in as much detail as I did has been revealing. There were holes in my knowledge: things that I knew how to do without a full understanding of how they actually worked. Trying to explain every line of code forced me to reach for that deeper understanding.
Despite this, some of my decisions were still questionable and I would do certain things differently now. On the other hand, I was pleased at how other aspects came out and there are ways that I have implemented things in this that I definitely want to pull into my adventure game engine.
Developing a Jigsaw Puzzle Game Part 9: Improvements
With the addition of win conditions, support for multiple puzzles, and the ability to rotate pieces, this basic jigsaw puzzle game is almost done.
Developing A Jigsaw Puzzle Game Part 8: Rotation
Now that I have a game where pieces are randomly placed and the player can drag them into position to win the game, I want to make things more difficult.
When the game begins, as well as being randomly positioned, the pieces will be randomly rotated.
Developing a Jigsaw Puzzle Game Part 7: Winning
My puzzle pieces can be moved around and now I want them to snap in to place when the player gets them close enough to their correct location.
Developing a Jigsaw Puzzle Game Part 6: Interaction
Now that this simple jigsaw puzzle game has some (unnecessarily) advanced architecture, it’s time to take advantage of it to start making this “game” into a game.
Developing A Jigsaw Puzzle Game Part 5: ECS
If you thought writing 2,000 words about opening Photoshop or taking four weeks to start coding in Xcode were frustratingly slow, then this week’s post might make you want to set fire to your computer.
As I continue to build a jigsaw puzzle game in ridiculous detail, I want to spend the next 1,500 words getting the game to look and function exactly the same as it does right now.
Before you reach for the matches, let me explain.