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

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