In this section we will see the basics of a game project. This includes understanding the basic architecture and work flow of game projects. Here we will learn about the scene and layers and their importance in games.
Complete game development is dependent on three core components: scenes, nodes, and sprites mentioned earlier. We need to have a command over these components to effectively start on game development.
Internally, the life cycle is executed as per the scenes—nodes are added and actions applied on these nodes. It also includes attaching some physics bodies to the nodes, support for cropping, applying animation and effects to all or a part of the content, detecting forces and collision, drawing in OpenGL, and many more things.
Apart from all this, there is an overridden update method in SKScene
, which is called for each frame of the game with the current time interval as a parameter. There you can add your actual game logic specifying...