O'Reilly logo

Invent Your Own Computer Games with Python , 4th Edition by Al Sweigart

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

12THE CARTESIAN COORDINATE SYSTEM

image

This chapter goes over some simple mathematical concepts you will use in the rest of this book. In two-dimensional (2D) games, the graphics on the screen can move left or right and up or down. These games need a way to translate a place on the screen into integers the program can deal with.

This is where the Cartesian coordinate system comes in. Coordinates are numbers that represent a specific point on the screen. These numbers can be stored as integers in your program’s variables.

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