Game Development Reference
In-Depth Information
How it works...
All that we see running on the screen are just frames added by a time interval, which is
driven by a SKScene added as a child on the SKView that serves as the main scene of the
game.
As shown in the following diagram, a frame circle is present, which depicts the execution
cycle of the game project for each frame:
Some of the methods from the preceding diagram are explained as follows:
• An update method of SKScene is called where we can add, remove, animate, and
update different kinds of nodes and actions.
SKScene evaluates its actions that are running for the current frame following
some life cycle calls such as didEvaluateActions .
SKScene has its own physics simulation, so if some bodies are added to it, the
physics simulation is also evaluated such as collision detection, applying forces,
and so on.
• All the methods mentioned earlier contribute to the final rendering of SKView,
which is displayed as a frame to the user. Hence, regular running of these frames
makes the game appear as an environment.
Search WWH ::




Custom Search