Previous Section  < Day Day Up >  Next Section

Chapter 1. Points and Lines

KEY TOPICS

Have you ever thought about programming a game and wondered where to start? How does the computer know where to place objects? And how does it make them move? This chapter addresses those questions and lays the groundwork for the rest of the book. This chapter first defines the point so that you can position objects on the flat 2D screen or in a complex 3D world. This chapter establishes standards for the coordinate systems; they are consistent throughout this book. From there, you can examine the idea of a line in both 2D and 3D. The point gives a position, but a line can determine a motion path or even the edge of an object. After discussing all the characteristics of a line (including slope), this chapter concludes with a discussion of line-line collision detection in a game setting.

    Previous Section  < Day Day Up >  Next Section