What Is A Sprite
Sprite is a two-dimensional bit-mapped graphics image of different objects such as aliens, space invaders, rockets, missiles, and colored blocks used in the earliest arcade games.
Sprites were the basis of the earliest generation of computer graphics-based games such as arcade video games. Since then, the technology improved to the extent that computer games based on sprites became available in home game consoles such as Xbox, Sony PlayStation, Nintendo, etc. You must have played video games in your home on these platforms.
Sprites refer to a group of pixels that can move around the screen as a unit. Sprites are graphical objects or images that are integrated into a larger scene. They are like ghosts (spirites) floating on the underlying scene.
When you play computer games, all the objects you see on the screen are sprites. Some examples of these objects are an alien or an image representing the player attacking or avoiding the alien, etc.
These image objects (sprites) can interact with each other, and collide with each other. The collisions produce the effects that the programmer desires such as making a sound or playing a musical tune. Sprites can be controlled by the player and can also be animated.
We will introduce the basic concepts of sprites to show how simple basic games can be created. These games use all the concepts of Python, Pygame, class structure, Object-Oriented Programming, and keyboard and mouse events created by the person playing the game.