HTML and CSS Reference
In-Depth Information
Applying Transformations to Game Graphics
Our game will probably have many individual logical display objects that need to be updated
on a single frame tick. We can make use of the Canvas stack (
save()
and
restore()
func-
tions) and use the transformation matrix to ensure that the final output affects only the current
object we are working on—not the entire canvas.