Files

8.7 KiB

Pit Imp - generated pixel sprite (test for bigger sprites)

Generated on 2026-11-07 with fal.ai, as a test whether creature sprites bigger than the current 10x10 can come from an image model. The description follows the game's imp (EK::Worker, sprite_rows in src/gfx.rs): orange skin, black outline, yellow eyes, dark-red tunic, pickaxe.

Step 1: sprite sheet

  • Model: fal-ai/nano-banana-pro
  • Settings: aspect_ratio: 21:9, resolution: 2K, num_images: 2, output_format: png
  • Results: raw-1.png (used: the lower row, compact chibi proportions), raw-2.png (more detailed, too fine for small sprites)

Prompt:

Pixel art sprite sheet for a dark-fantasy dungeon strategy game: the "Pit Imp", a small goblin-like worker demon. One single character shown five times in one horizontal row, evenly spaced, same size, same pose (standing, idle), each view in its own equal cell:
1. front view, facing the viewer
2. front three-quarter view, turned to the right
3. side view, facing right
4. back three-quarter view, turned away to the right
5. back view

The imp: short and stocky, big head, oversized pointed ears and two small black horns, orange skin, glowing yellow eyes, a wide mischievous grin with tiny fangs, a ragged dark-red tunic with a rope belt, bare feet with claws, carrying a small iron pickaxe with a wooden handle over its right shoulder. Thin tail.

Style: crisp retro pixel art at about 32x32 pixels per character, scaled up with hard square pixels, a one-pixel near-black outline around the figure, limited palette of about 12 colours, flat shading with one highlight and one shadow tone, no anti-aliasing, no gradients, no blur. Flat pure magenta background (#FF00FF) everywhere, no ground, no shadows, no text, no labels, no grid lines.

Step 2: pixel grid and palette

tools/pixelize_sprite.py (needs Pillow) removes the magenta background, cuts out the five views, samples them down to a fixed grid (one scale for all views, standing on the bottom) and reduces them to one shared palette:

python3 tools/pixelize_sprite.py raw-1.png imp --views 5 --size 32 --colors 16 --crop 0,0.27,1,0.72

Result: imp-32.png (views front, front 3/4, side, back 3/4, back; transparent) and the 8x preview imp-32-preview.png (a 24x24 test lost most of the face and was dropped). The final idle sheet was made again with the body scale of the animation (see below).

Findings

  • 32x32 keeps the face (eyes, grin) and the silhouette readable; 24x24 already loses most of the face.
  • The pickaxe's iron mostly turns dark; small details would need a manual touch-up.
  • In the high-res graphics style the game uses imp-32.png (idle) and imp-hack-32.png (digging).

Digging animation (2026-11-07)

Four frames per view (wind-up, swing, impact, recover), made with fal-ai/nano-banana-pro/edit (resolution: 2K, num_images: 2, output_format: png).

  1. Front, front three-quarter and side: reference image = the lower row of raw-1.png (scaled to half size), aspect_ratio: 4:5. Used: hack-raw-1.png, rows 1-3 (its rows 4-5 showed the front instead of the back in some frames; the second result was dropped).
The attached image is a pixel art sprite sheet of the "Pit Imp" in five views (left to right: front, front three-quarter turned right, side facing right, back three-quarter turned away to the right, back).

Create a new pixel art sprite sheet of exactly the same character - same proportions, colours, outline, pixel size, tunic, horns, ears, tail and the same small iron pickaxe - showing a looping digging animation: the imp swings the pickaxe with both hands and hacks at a rock wall in front of it (the wall itself is not shown).

Layout: a grid of 5 rows and 4 columns, every figure the same size, evenly spaced, each in its own equal cell, all standing on the same baseline within their row.
Rows (one view per row, top to bottom): 1 front view facing the viewer, 2 front three-quarter view turned to the right, 3 side view facing right, 4 back three-quarter view turned away to the right, 5 back view.
Columns (animation frames, left to right): 1 wind-up - the pickaxe raised high above and behind the head, body leaning back; 2 swing - the pickaxe coming down over the head, body leaning forward; 3 impact - the pickaxe head struck down low in front of the body at knee height, body bent forward, a few small rock chips flying; 4 recover - pulling the pickaxe back up at chest height, body upright.
The feet stay in place in all four frames; only arms, pickaxe, head and upper body move.

Style: identical to the attached sheet - crisp retro pixel art, hard square pixels, one-pixel near-black outline, limited palette, no anti-aliasing, no blur. Flat pure magenta background (#FF00FF) everywhere, no ground, no shadows, no text, no labels, no frame lines, no grid lines.
  1. Back three-quarter and back: reference images = the idle sheet and the upper three rows of hack-raw-1.png, aspect_ratio: 16:9. Used: hack-back-raw-2.png (the first result was dropped).
The first attached image is a pixel art sprite sheet of the "Pit Imp" in five idle views (front, front three-quarter, side, back three-quarter, back). The second attached image shows the same imp's digging animation (columns: 1 wind-up with the pickaxe raised high above and behind the head, 2 swing with the pickaxe coming down over the head, 3 impact with the pickaxe struck down low in front of the body with rock chips, 4 recover with the pickaxe pulled back up at chest height) for the front, front three-quarter and side views.

Create the same four-frame digging animation for the two views seen FROM BEHIND, where the imp faces away from the viewer and we see the back of its head, its back, the tunic from behind and the tail; the face and eyes are never visible:
Row 1: back three-quarter view, the imp turned away from the viewer towards the upper right, hacking at a wall in front of it (away from the viewer).
Row 2: back view, the imp seen straight from behind, hacking at a wall in front of it (away from the viewer).
Columns (frames, left to right): 1 wind-up - pickaxe raised high above the head, its head visible above the imp's head; 2 swing - pickaxe coming down, partly hidden by the head; 3 impact - the pickaxe is in front of the imp and mostly hidden by its body, only the tip shows low at one side, a few rock chips fly up beside the body; 4 recover - pickaxe pulled back up at shoulder height, its handle visible beside the body.
The feet stay in place in all frames.

Layout: a grid of exactly 2 rows and 4 columns, every figure the same size and the same character size as in the attached sheets, evenly spaced, each in its own equal cell, all standing on the same baseline.
Style: identical to the attached sheets - same character, proportions, colours, outline and pixel size, crisp retro pixel art, hard square pixels, no anti-aliasing, no blur. Flat pure magenta background (#FF00FF) everywhere, no ground, no shadows, no text, no labels, no frame lines, no grid lines.

Pixel grid

All sheets of the imp share one body scale (horns to feet = 30 pixels, measured with --measure on a frame where the pickaxe is below the horns), the feet row 31 and the idle sheet's palette plus two iron greys:

T=tools/pixelize_sprite.py
python3 $T raw-1.png imp --views 5 --size 32 --colors 16 --crop 0,0.27,1,0.72 --step 18.43 --feet 31
# per view row of the hack sheets (body heights 438, 441, 399 / 664, 653 source pixels):
python3 $T hack-raw-1.png row0 --grid 1x4 --size 32 --crop 0,0,1,0.2 --step 14.6 --feet 31 \
    --palette imp-32.png --add-colors "150,152,168;104,106,122" --outline-weight 0.6
# ... rows 1-2 of hack-raw-1.png, rows 0-1 of hack-back-raw-2.png likewise,
# then the five rows stacked into imp-hack-32.png (4 frames x 5 views)

imp-hack-32-preview.png: the frames, the idle views in the right column for comparison. The game copies imp-32.png and imp-hack-32.png to assets/sprites/.

Sack

The gold sack is not generated: it is a small hand-made pixel pattern (SACK_HD, SACK_SMALL in src/gfx.rs) that the game places on every frame when the atlas is built.

64x64 (2026-11-07)

The high-res style shows the imp in 64x64 when close and in 32x32 at the normal zoom (both from the same raw sheets; a 64x64 sprite shown smaller would lose pixels and flicker). The 64x64 sheets use the body scale 60 pixels, the feet row 63, 24 colours plus the iron greys:

python3 $T raw-1.png imp --views 5 --size 64 --colors 24 --crop 0,0.27,1,0.72 --step 9.217 --feet 63 \
    --add-colors "150,152,168;104,106,122"
# hack rows: --size 64 --step <body height>/60 --feet 63 --palette imp-64.png --outline-weight 0.6

Results: imp-64.png, imp-hack-64.png, preview imp-hack-64-preview.png (idle views in the right column). The game copies them to assets/sprites/.