O'Reilly logo

Build Your Own 2D Game Engine and Create Great Web Games: Using HTML5, JavaScript, and WebGL by Jason Pace, Fernando Arnez, Jebediah Pavleas, Kelvin Sung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3

image

Drawing Objects in the World

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

Ideally, a video game engine should provide proper abstractions to support designing and building games in meaningful contexts. For example, when designing a soccer game, instead of a single square with a fixed ±1.0 drawing range, a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required