Introduction

This chapter examines the Canvas API in depth. Although you’ve seen in the past two chapters that you can build HTML5 games using technologies besides Canvas, from a game perspective Canvas still remains the most flexible technology to build a game with. Previous chapters have shown how you can use Canvas to make games using bitmapped spritesheets. Canvas, however, offers more than just a way to draw some images. It has a full repertoire of vector drawing methods for drawing shapes and curves along with support for text, transforms, and a variety of composition modes.

Get Professional HTML5 Mobile Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.