Skip to content

PixelRoot32-Game-Engine/pixelroot32-sprite-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixelRoot32 Sprite Tutorial

A step-by-step guide to working with sprites in PixelRoot32 Game Engine. This tutorial covers the three sprite bit-depth formats supported by the engine: 1BPP (monochrome), 2BPP (4 colors), and 4BPP (16 colors).

What You'll Build

A demo scene displaying all three sprite types side by side:

  • Left: 1BPP monochrome ship sprite (green-tinted)
  • Center: 2BPP character sprite with 4-color palette
  • Right: 4BPP detailed sprite with 16-color palette

The example demonstrates sprite creation, palette configuration, and entity integration within the PixelRoot32 scene system.

Prerequisites

This tutorial builds upon the PixelRoot32 Hello World Tutorial. Before starting, you should be familiar with:

  • Creating and managing scenes (init/update/draw lifecycle)
  • Basic entity usage
  • PlatformIO project setup
  • Building for both native (PC) and ESP32 targets

If you haven't completed the Hello World tutorial, start there first to understand the engine fundamentals.

Quick Start

# Clone the repository
git clone https://github.com/PixelRoot32-Game-Engine/pixelroot32-sprite-tutorial.git
cd pixelroot32-sprite-tutorial

# Build for PC (native)
pio run -e native

# Build for ESP32
pio run -e esp32dev

What's Inside

File Description
src/SpritesTutorialScene.h Scene class header
src/SpritesTutorialScene.cpp Scene implementation with sprite entities
src/main.cpp Entry point
src/assets/ Sprite data header files

Sprite Formats Overview

Format Colors Best For
1BPP 2 Simple icons, text, shapes
2BPP 4 Classic retro sprites
4BPP 16 Detailed graphics, UI elements

Related Resources

What's Next

Combine sprite rendering with the input system from the Hello World tutorial to make sprites respond to button presses. This is the foundation for building your first interactive game!

About

A step-by-step guide to working with sprites in PixelRoot32 Game Engine. This tutorial covers the three sprite bit-depth formats supported by the engine: 1BPP (monochrome), 2BPP (4 colors), and 4BPP (16 colors).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors