O'Reilly logo

Game Coding Complete, Fourth Edition by David Graham, Mike McShaffry

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 17COLLISION AND SIMPLE PHYSICS

by Mike McShaffry

image

Even the simplest 2D game needs collision. After all, if the objects in a game can’t interact, how fun could the game possibly be? Breakout is a great example of a simple game. A ball bounces off walls, bricks, and the paddle. If you look at it this way, the core of the game experience is created by the 2D collision algorithm. It’s almost impossible to design a game without at least some rudimentary collision. Perhaps a text adventure like Zork is one example, but hey, it hasn’t exactly been flying off the shelves lately. If you are familiar with Zork, that’s great because you know your ...

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