O'Reilly logo

Foundation Game Design with HTML5 and JavaScript by Rex van der Spuy

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

9781430247166_CO-01.jpg

Chapter 8

Bumping into Things

What makes most computer games fun to play is that they are, in their essence, stylized simulations of the real world. Like the real world, they contain objects that you can interact with in some way. These objects might be walls that block your movement, friends who help you, or enemies who harm you.

To create these sorts of interactive objects, you first need a way of finding out whether one object is touching another object. In computer programming, this is called collision detection. Collision detection is a term for what happens when things bump into one another

In this chapter you’re going to learn how to figure ...

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