Before we start creating a game, you should understand how to display things on the screen. This is always taken for granted, as all frameworks have a class called sprite
, in which we just give a .png
or .jpg
file and say addChild
and tada
; we then have an image appearing on the screen. Moreover, with just a few simple functions such as move, scale, and rotate, we can even transform the sprite's position, size, and rotation. In reality, this sprite
class does a whole lot of work just to display the image on the screen.
In this chapter, we will look at Metal—a new graphics library from the people at Apple. This graphics library will help us to display objects on the screen. It is a communication tool that talks to the processor, the memory, the graphics processing unit (GPU), and the screen.
If you are coming from a DirectX or OpenGL background, you will see that the process to display stuff on the screen, otherwise known as a graphics pipeline, is very similar to that in...