SpriteKit: Actions vs Manual Movement

    While working on Hunger Dash (a side project), I learned allot about when it’s appropriate to use SKActions vs Manual Movement. I hope to share valuable knowledge that can hopefully prevent you some frustration.  

    When I designed the game I used SKActions to spawn and move the logs down the river. The problem that I encountered was that SKActions are static once you dispatch them you cant modify them without complicating the logic. The solutions that I found online where hacky. I think it’s best to use things as they are intended.

    I wanted to update the speed of the logs every couple of seconds but I had realized that SKActions are limited in this sense. I tried to only change the speed of newer logs but this caused some logs to move faster and it looked unpleasant. I ended up using a combination of SKActions and manual movement to solve the problem. I first separated the menial static task from the dynamic tasks. Spawning logs at location X every Y seconds is a menial task that can be performed through actions . Moving the logs dynamically is a task suited for manual movement in the update() method.

    If you have any specific questions feel free to contact me, for now I’ll leave you with a video of the results. The logs and the river speed up seamlessly, you might not even notice. They speed up about every 3 seconds.