Game Development Reference
BUMPING INTO THINGS
Welcome to a fun chapter! Over the next few pages, you'll be building an interac-
tive playground of clever little game design techniques that you can use to build
completely interactive two-dimensional environments, better known as action and
adventure games! A whole grab bag of things from collision detection, building walls,
and picking up and dropping objects—they're all here. With a little imagination,
you'll able to use these very simple techniques to produce a richly varied number of
different kinds of games. Hey, congratulate yourself: you've come a long way since
page 1! All your hard work is about to pay off.
At the end of the chapter, I'll introduce the ?khheoekj class, which is a custom class
designed just for this topic. It contains some specialized methods for handling com-
plex collisions between objects that you can use with any of your game projects.
Setting up the project files
By this stage in the topic, you've probably become quite adept at setting up project
files. The examples in this chapter use the keyboard control model that you looked
at in the previous chapter as a starting point. If you want to follow along with these
examples, I created ready-to-go setup files for you in the chapter's source files that
you can open as a project and use as a basis for these examples.