Sprite (Pico-8)
A small or elusive supernatural being; an elf or pixie. - noun
For collision looks here
Online editor: draw pico-8 sprites! - up to 32x32
Sprite Animation
Basic
- Easy Sprite Animation in Pico-8 - Beginner Tutorial - cover animation as basic example
- animation loop & boundary
- speed setting
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
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)
Sprite Rotation
Animating Big Sprite
- How to Animate 16x16 Sprites in Pico-8
- 4x4 Sprites - use sspr()
- sspr() is twice as slow as spr() - There are indeed ‘artificial’ costs assigned to the internal draw operations. For spr() it’s around 1 Lua vm instruction per drawn pixel, and sspr() it’s 2.
Generating Sprite
- Procedural Animated Sprites Using Screen Space in Pico-8 / itch.io - retro sun animation with sprite generated gradiant
Tips
- Shadow Techniques - PEEK/POKE MERGE
- exploding sprite in particle
- draws a sprite to the screen with an outline of the specified colour
- z-index - use hash (table) indexed on z, rather than sorting sprite for drawing
Collision
For collision looks here
Stacked Sprites
- Beginners Guide to Sprite Stacking using Magica Voxel and GameMaker Studio 2 or any Other Engine
- Flaming Stacks: Using stacked sprites in Flame
- Sprite Stacking - How to Make a 3D Game with a 2D Engine
- Sprite stacking example
Sprite Composer
Create animation from sprite composition
see also
Written on October 25, 2023, Last update on November 23, 2023
pico8
sprite
pixelart
online