Sprite (Pico-8) 👾

A small or elusive supernatural being; an elf or pixie. - noun

For collision looks here

see also

# Editor 🖍️

Tips for the Embeded Pico 8 Editor

  • to swap out a color in your sprite for another one, just select the color you want and control-click the color you’re replacing to instantly replace all of it.
  • poke(0x5f2e,1) / details - prevents PICO-8 from resetting the palette when you return to the editor - this enable seeing the customized palette to draw sprite - this poke must be called inside the program, otherwise reset happens
    • poke(0x5f2e,2+1) - will keep enabled the second palette on screen (so display stay after program stop)
  • GFXedit - GFXedit is a small tool to handle the sprite, map und label data from a p8-file with many features, like export and import as png or lua-data, copy&paste, display the usage of sprite and many more.

GFXedit screenshot

# External tools

  • export
    • export spritesheet.png
    • import spritesheet.png
  • respriter - move sprites around and have the map updated to point to the new location of your sprites ( remove the 2 square brackets on tab 5, line 375. to fix bugs on latest version)

Online editor: draw pico-8 sprites! - up to 32x32

# Physics

Player movement is one of the most important systems in any game because it is foundational to the gameplay experience. It defines how players interact with the world, how challenges are designed, the pacing, and how the game feels moment to moment. Small changes in movement rules can completely alter pacing, difficulty, and player experience. Because of this, there is no single “correct” way to design movement, only approaches that better fit certain goals, genres, and player expectations. - game design: Player Movement Types

# Collision

For collision looks here

# Sprite Animation

# Basic

Assuming you have GFX 8x8 sprite available from 1 to 5, code looks like this (from How to Animate a Sprite!):

sprite = 1
x = 64
y = 64
timing = 0.25

function _draw()
    cls()
    spr(sprite, x, y)
end

function _update()
    --animate
    sprite += timing
    if sprite >= 5 then sprite = 1 end
end

# anim()

Obviously code above can be made generic (see anim()), and complefixied when dealing with non-symetrical actor (multi 8x8 sprite) (see Advanced animation).

see also

# Flipping Sprite

spr has direct support to flip sprite around x and y.

# Sprite Rotation

Mars Rescue using tline

# Animating Big Sprite

# Outline

# Generating Sprite

# Exploding Sprite

# Tips

# Stacked Sprites ⮺

# Sprite Composer ⮺

Create animation from sprite composition

caption

# Storing sprite

# see also

Written on October 25, 2023, Last update on June 14, 2026
pico8 sprite pixelart online