Sticking Nodes to Corners

I have a Direction enum that I use to position UI layers in my adventure game. It supports 8 compass directions plus a case for centre:

Continue Reading →

Interaction Nodes

The default way of working with SpriteKit is to have the SKScene instance capture all the inputs and then have logic within that scene file to figure out the user’s intention.

In order for this to work, SKNode instances added to this scene have their isUserInteractionEnabled property set to false by default. This property prevents these nodes from capturing input and are effectively invisible to the event chain.

Continue Reading →

Developing a Reusable Instruction System

I have been working on a library of basic components that is designed to work for many different types of game. It abstracts away platform-specific inputs, converting them into platform-agnostic interactions.

Taking this a step further, I have expanded this into an instruction system that takes advantage of Swift’s features to create an Instruction struct. This struct uses pseudo-English formatting that makes adding actions to entities simple and easy to read:

Continue Reading →