Game Development Reference
Rotating the view has limited uses in terms of game development. It can be used for anim-
ating a particular event—the death of the main character (a slow zoom in along with rota-
tion), taking damage (a slight shake of the camera). We can also use it to rotate the world
in a top-down game around a centered character. In general, rotation is useful, but has lim-
ited use cases.
Views can also be scaled. By scaling the view, we can show either more or less of the
world, depending on the direction of the scale. In terms of games, this feature is typically
called a zoom (either in or out ). The zoom is connected directly to the size of the view.
When we tell the view to display an area two times larger than the window, we are effect-
ively zooming by a factor of two. On the other hand, if we want to show objects up close,
we have to use zoom by a factor of 1/x , where x is the zoom factor. Making the view two
times smaller, for example, requires a factor of 1 / 2 = 0.5.
Let's demonstrate the scaling by showing two examples with the sprites, which we just
used for rotation: