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

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required