Skip to main content
Back to blog
Game Dev React Native

Procedural pixel art without sprites: rendering with Canvas

How we rendered the entire visual scene of Build Your Empire without a single sprite sheet — just code, rectangles and a color palette.

JM
Javier Manzano
CTO & Co-founder • August 25, 2026
Procedural pixel art without sprites: rendering with Canvas

In Build Your Empire there isn’t a single image file for the game graphics. No sprites, no texture atlases, no building PNGs. Everything is drawn in real time with code.

The idea

Inspired by Kairosoft games (Game Dev Story, Mega Mall Story), we wanted a pixel art style but with an advantage: completely dynamic graphics. The player’s tower had to visually grow when hiring employees. Rival buildings had to reflect their actual progress.

How it works

We use @shopify/react-native-skia to draw on a native Canvas. The base unit is an 8x8 pixel block:

function PlayerTower({ x, y, employees }) {
  const level = calculateLevel(employees); // 1-8 floors
  const floors = [];

  for (let i = 0; i < level; i++) {
    floors.push({ x, y: y - i * BLOCK, w: 2 * BLOCK, h: BLOCK, color: '#5b8dd9' });
    if (i % 2 === 0) {
      floors.push({ x: x + 2, y: y - i * BLOCK + 2, w: 4, h: 4, color: '#f4c26b' });
    }
  }
  floors.push({ x: x + 2, y: y - level * BLOCK, w: BLOCK, h: 4, color: '#f4c26b' });

  return floors;
}

The palette

Only 7 colors define the entire scene:

ColorHexUsage
Purple sky#1a0a3eUpper sky
Sunset#e8956bMid sky
Gold#f4c26bLower sky, accents
Tower blue#5b8dd9Player building
Ground green#2d5a27Terrain
UI purple#0d0820Interface background
Window white#ffffffLit windows

Advantages of the procedural approach

  1. Minimal bundle — no graphic assets, lighter app
  2. 100% dynamic — buildings reflect actual game state
  3. Easy to modify — changing a color or proportion means changing a constant
  4. No resolution conflicts — no bitmap scaling, always crisp
  5. Generative — each game can have visual variations

When NOT to use this approach

  • Characters with complex animations (better with sprites)
  • Visual styles requiring textures or organic gradients
  • Games with many distinct objects (code scales worse than an atlas)

The result

A complete scene — gradient sky, 7 buildings, trees, people and ground — rendered at 60fps on an iPhone SE. All with fewer than 300 lines of drawing code.

See the pixel art in action →

Don't miss a thing

JM

Javier Manzano

CTO & Co-founder at Soamee

Passionate about technology and software development. Sharing knowledge and experiences to help other developers grow.

Did you enjoy this article?

If you need help with your development project, we are here for you.

Procedural Pixel Art with Canvas, No Sprites

Tell us your challenge. We'll propose a solution.

No commitment. Within 24 hours, you'll receive a proposal with scope, timeline and budget. No fine print.

Book a free call →