Skip to Main Content
Build Your Own 2D Game Engine and Create Great Web Games: Using HTML5, JavaScript, and WebGL
book

Build Your Own 2D Game Engine and Create Great Web Games: Using HTML5, JavaScript, and WebGL

by Kelvin Sung, Jebediah Pavleas, Fernando Arnez, Jason Pace
October 2015
Intermediate to advanced content levelIntermediate to advanced
496 pages
13h 43m
English
Apress
Content preview from Build Your Own 2D Game Engine and Create Great Web Games: Using HTML5, JavaScript, and WebGL

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building a 2D Game Physics Engine: Using HTML5 and JavaScript

Building a 2D Game Physics Engine: Using HTML5 and JavaScript

Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung

Publisher Resources

ISBN: 9781484209523Purchase book