SPRITE


A sprite is a small, two-dimensional image that's used in video games. Think of sprites as the visual building blocks of 2D games - they're used to represent characters, objects, items, and other visual elements in the game world.

A collection of sprites is called a sprite sheet.


Sprites are typically made with a transparent background. In many programs, a fully transparent background is shown with a gray checker pattern.

In PICO-8 the default transparent color is black (#0) but if you look at many games that use black in their sprites, they change the transparent color to a color they don't use in the sprites. Then the background of the sprite sheet is set to the new transparent color instead. 

Animated sprites are drawn frame by frame, or piece by piece, and then stitched together in code. Quickly drawing the different sprite poses creates the illusion that a single sprite is moving and animating but it is really a series of sprites.

(From the game Puzzles of the Paladin. The editors look different because of a customized color palette.)


The default sprite size in PICO-8 is 8x8, but you can increase the sprite size in multiples of 8. These can be drawn to the screen using spr().

You can also draw your sprites in various sizes to save space on your sprite sheet. You can draw these to the screen using sspr().


Sprites in PICO-8 can have up to 8 flags turned on which can be used for anything the developer wishes. This is one way to group and identify different types of sprites as friendly or hostile, as objects you can collide with, break, or pick up, and more.

Images in this Guide by NerdyTeachers is licensed under CC BY-SA 4.0

1055

17 Sep 2024

Font