What Does 2D Mean? (XNA Game Studio 4.0 Programming)

What exactly does 2D mean? You can probably guess that it is short for two-dimensional, but what does that mean? Almost all games that you see have visuals on a monitor, a television, or something else that is inherently flat and two-dimensional. For the purposes of this topic, when we say 2D, we mean that things are rendered using sprites in screen coordinates.

Of course, this begs the question,"What are screen coordinates?" Look at your monitor because that is where the "screen" in "screen coordinates" comes from after all.The upper, left pixel of your monitor is the screen coordinate of 0,0 (which is sometimes called the origin). In a 2D coordinate system, the first number is the X axis, whereas the second number is the Y axis, and in the case of your monitor, the X increases as you move to the right, and the Y increases as you move down. For example, if you had a resolution of 1280×720, the lower, right pixel of your monitor is at a screen coordinate of 1279,719. This means that the top, right pixel is a screen coordinate of 1279,0, whereas the bottom, left pixel is at 0,719, as seen in Figure 2.1.

Going back in time, you could argue that some of the earliest 3D games fit this description. After all, games such as the original Doom,Wolfenstein, and Duke Nukem 3D all claimed to be 3D, yet they were nothing more than sprites rendered onto the screen that gave the illusion of 3D. Back then, those games were referred to as 2.5D; recently, the term has been repurposed to mean games that are fully rendered in 3D but where game play happens solely in 2D.


2D screen coordinates

Figure 2.1 2D screen coordinates

Another early term you might not have heard of is sprite.What exactly is a sprite (aside from the soda)? In simplest terms, it is a 2D image that you render on screen. All images you see on the Web, for example, are sprites.At its simplest level, creating a 2D game is nothing more than drawing a lot of pictures on screen at once.

Next post:

Previous post: