 You're going to learn how math, like algebra and geometry, can be used to develop video games. Some modern video games are incredibly complex, with realistic graphics, physics, artificial intelligence, and so on. Major video games can take large teams of developers years to produce, but you can apply many of the same concepts that the big game developers use to create a simple game of your own. Let's start by looking at a fairly simple two-dimensional game. Each of the actors or sprites in this game can be described by their location and movement on the screen. Your job is to figure out how we can describe the actions of each of these sprites mathematically in relation to the coordinate plane. Let's take a quick look at the game Plants vs. Zombies as an example. If we have a zombie and a flower on the screen, there are a few things we need to know about them in order to make the game work. Where is the zombie? Enriched direction isn't moving. Where is the flower? How far apart are they? As a player of the game, you might say in general terms that they're on opposite sides of the screen, or that the zombie is moving to the left, or that the zombie and the flower are pretty close to each other. These might be okay approximations, but they really aren't specific enough and they definitely aren't stayed in a way that a computer can understand. Suppose you were talking to your friend on the phone, trying to tell them exactly where the dragon is. You could use words like, on the left, but that isn't specific enough. If you had a ruler, you could measure from left side of the screen and tell your friend exactly how many inches away the dragon is. That is exactly what computers do. Using a number line that starts with a zero on the far left and moving across to the right measuring the number of pixels on the screen. For our video game, we'll place the number lines that the screen runs from zero on the left to 400 on the right. We can imagine that the image of the dragon stick it anywhere on the line and measure the distance back to left hand edge of the center of the screen from our dragon. Anyone else who knows about our number line will be able to duplicate the exact position of the dragon, knowing only the number. On the right side of the screen, the dragon is at 400. In the center, he's at 200. What if we wanted the dragon to be off the edge of the screen? We could use numbers bigger than 400 to place them past the right hand side and negative numbers to place them past the left hand side. But even with a number line, we aren't being quite specific enough. Even at 400, the dragon could be at the top of the screen, the bottom, or anywhere in between. By adding a second number line, we can locate a character anywhere on the screen in either dimension. The first line is called the x-axis, which runs from left to right. The second line, which runs up and down, is called the y-axis. A two-dimensional coordinate consists of both the x and the y locations on the axis. Suppose we wanted to locate Ninja's position on the screen. We can find the x-coordinate by dropping a line down from the Ninja and read the position on the number line. The y-coordinate is found by running a line to the y-axis. With two numbers, x and y-coordinates, we can describe a location of any sprite on our screen. And by changing those numbers, we can get our sprites to move around on the screen. What we've created is actually Quadrant 1 of the coordinate plane. If we zoom out, we can see that there are four different quadrants to the plane. Quadrant 1, which we're using as our screen, contains the points with positive values for x and y. When counterclockwise, we get to Quadrant 2, which gains all points with a negative x and a positive y. Quadrant 3 contains all points with negative x and y, and Quadrant 4 contains all points with a positive x and a negative y.