Exploring computer pixels

When you observe the computer screen closely, you might find small dots forming rows and columns. From a certain distance, the matrix of dots represents images, which we normally see when we look at the screen. These dots are called pixels. Since computer games should be made to be pleasantly visual in nature, we have to work with these pixels in order to create and customize the game screen, and even use them to make a player move in the game, which will be shown on the screen. Whenever a player presses any key on the keyboard, changes in movement must be reflected in the pixels of the screen. For example, when a player presses the RIGHT key, a specific character must move a number of units in pixels to the right ...

Get Learning Python by Building Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.