© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. Sung et al.Build Your Own 2D Game Engine and Create Great Web Gameshttps://doi.org/10.1007/978-1-4842-7377-7_3

3. Drawing Objects in the World

Kelvin Sung1  , Jebediah Pavleas2, Matthew Munson3 and Jason Pace4
(1)
Bothell, WA, USA
(2)
Kenmore, WA, USA
(3)
Lake Forest Park, WA, USA
(4)
Portland, OR, USA
 
After completing this chapter, you will be able to
  • Create and draw multiple rectangular objects

  • Control the position, size, rotation, and color of the created rectangular objects

  • Define a coordinate system to draw from

  • Define a target subarea on the canvas to draw to

  • Work with abstract representations of Renderable objects, transformation operators, and cameras

Introduction ...

Get Build Your Own 2D Game Engine and Create Great Web Games: Using HTML5, JavaScript, and WebGL2 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.