Sprite (Pico-8) 👾
A small or elusive supernatural being; an elf or pixie. - noun
For collision looks here
see also
- Vector Sprite
- Anti-aliased vectors by elice and freds72.
# 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.
# External tools
exportexport spritesheet.pngimport 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
- 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
# Flipping Sprite
spr has direct support to flip sprite around x and y.
# Sprite Rotation
Mars Rescue using tline
- Sprite Rotation Code Snippet - an example of the tline3d rotation algorithm!
- tline sprite rotation/scaling
- tline sprite rotation demo/mini-tutorial
- Sprite Rotation - 64x64
- 2D transforms
# 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.
# Outline
# Generating Sprite
- Procedural Animated Sprites Using Screen Space in Pico-8 / itch.io - retro sun animation with sprite generated gradiant
# Exploding Sprite
# 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
# Stacked Sprites ⮺
- The Illegal Way To Make 3D Games
- 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
