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 2

image

Working with HTML5 and WebGL

After completing this chapter, you will be able to:

  • Draw a simple constant color square with WebGL
  • Create a new JavaScript source code file for your simple game engine
  • Define new Singleton-like JavaScript objects to implement core game engine functionality
  • Appreciate the importance of abstraction and organize your source code structure to support growth in complexity

Introduction

Drawing is one of the most essential functionalities common to all video games. A game engine should offer a flexible and programmer-friendly interface to its drawing system. In this way, when building a game, the designers and ...

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