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 5

image

Working with Textures, Sprites, and Fonts

After completing this chapter, you will be able to:

  • Use any image or photograph as a texture representing characters or objects in your game
  • Understand and use texture coordinates to identify a location on an image
  • Optimize texture memory utilization by combining multiple characters and objects into one image
  • Produce and control animations using sprite sheets
  • Display texts of different fonts and sizes anywhere in your game

Introduction

Custom-composed images are used to represent almost all objects including characters, backgrounds, and even animations in most 2D games. For this reason, the ...

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