tools-gamedev

Tools > Guides > 8-direction sprite sheet grid

Slice an 8-direction sprite sheet without guessing the grid

Short answer: an 8-direction sheet is always 8 rows (one per facing) and N columns (frames per facing). Divide the sheet: width / columns and height / 8 must both be whole numbers and equal - that number is your cell size. Keep the rows in S, SE, E, NE, N, NW, W, SW order, count the frames per action instead of assuming 4, and the same grid imports into Godot 4, Unity or RPG Maker. Takes about 10 minutes; the checker below does the arithmetic and the naming for you.

Guide date: 2026-10-17. Engines covered: Godot 4.x, Unity 2D, RPG Maker MZ/MV, Tiled 1.10. Engine docs: SpriteFrames - Unity Sprite Editor - Tiled docs. Every number below is a worked-example fact from our own pack files at products/game-dev-2d/octosprite-8-direction-sprite-generator/ (judge PASS 2026-10-08), measured on disk 2026-10-17 - the recipe works on any seller's sheet cut to the same grid. Buyer search words: "8 direction sprite sheet", "sprite sheet grid 32x32", "rpg maker 8 direction charset".

What the grid of an 8-direction sheet looks like

Diagram of the real layout, not a screenshot: the worked example's sheets are 128x256 PNG RGBA with 32x32 transparent cells, 8 facing rows top to bottom (S, SE, E, NE, N, NW, W, SW) and 4 frame columns - measured on disk 2026-10-17 from assets/sheets/mage_8dir.png, assets/idle_sheets/mage_idle_8dir.png, assets/run_sheets/mage_run_8dir.png, assets/attack_sheets/mage_attack_8dir.png and assets/hurt_sheets/mage_hurt_8dir.png (all five are 128x256).

The 4-step recipe

  1. Get the cell size out of the sheet, not out of hope. Rows are 8 by definition; columns are the frames per facing. cell_w = width / columns and cell_h = height / 8. Both must come out whole and equal - a fractional result means the column count you guessed is wrong, not that the sheet is broken. Worked example: 128 / 4 = 32 and 256 / 8 = 32, so the sheet is 32x32 cells (the shipped Godot resource confirms it with region = Rect2(0, 0, 32, 32) ... Rect2(96, 224, 32, 32)). Run the numbers through the checker below, or drop the PNG into the free sprite frame counter and read the grid off the file itself.
  2. Keep the facing rows in S, SE, E, NE, N, NW, W, SW order. Row 0 is S (toward the camera) and row 7 is SW, top to bottom. The worked example's exported Godot resource lists exactly that order - walk_down, walk_down_right, walk_right, walk_up_right, walk_up, walk_up_left, walk_left, walk_down_left - and its RPG Maker charset maps the same sheet rows to the engine's 4 rows as down = S, left = W, right = E, up = N. One shared order means one import recipe for every action, and a hand-flipped diagonal never passes as a real facing.
  3. Count the frames per action - do not assume 4. Count the columns in the file you are holding. The worked example ships 4 frames for all 5 sets: walk (a 2-step cycle), idle (a breathing loop that differs from walk), run (a 4-frame sprint with dust), attack (windup / strike / follow-through / guard) and hurt (flinch / flash / recoil). Our other 8-direction pack (the 64x64 trio behind this guide) ships walk 4, run 6, attack 4, idle 2, hurt 2 - same 8 rows, different column count, so the divide check above is what tells them apart.
  4. Import it once per engine. The grid is the same everywhere; only the slicing UI changes - see the table and the engine notes under it.
The 5 sets of the worked example - real sizes, real frame counts, sourced fps
Sheet (one per action)Columns (frames)Rows (facings)CellSheet pxStarting fps (source)
sheets/<char>_8dir.png - walk48 (S..SW)32x32128x2566.0 (shipped Godot resource, "speed": 6.0); the pack's RPG Maker recipe starts at 6-8 fps
idle_sheets/<char>_idle_8dir.png - idle4832x32128x2564 (pack's RPG Maker recipe, idle)
run_sheets/<char>_run_8dir.png - run4832x32128x256not stated in the pack - start at the walk value and tune by feel
attack_sheets/<char>_attack_8dir.png - attack4832x32128x2568-10 one-shot (pack's RPG Maker recipe, attack)
hurt_sheets/<char>_hurt_8dir.png - hurt4832x32128x256not stated in the pack - 4 is what our 64x64 trio uses for hurt

Sizes measured on disk 2026-10-17; frame counts from the sheets themselves and from the pack's own manifest_sample.json ("cell": [32, 32], "layout": "8 rows (S/SE/E/NE/N/NW/W/SW) x 4 walk frames"); fps from assets/exporters/mage_walk_godot.tres and sample/README.md. The pack's ready-made GIFs are 4 frames each, one GIF per action per character.

Row order to engine names (read from the shipped exporter files, not from memory)
RowFacingGodot 4 animation name (shipped .tres)Unity sprite names (shipped .png.meta)
0Swalk_downmage_walk_down_f0 .. _f3
1SEwalk_down_rightmage_walk_down_right_f0 .. _f3
2Ewalk_rightmage_walk_right_f0 .. _f3
3NEwalk_up_rightmage_walk_up_right_f0 .. _f3
4Nwalk_upmage_walk_up_f0 .. _f3
5NWwalk_up_leftmage_walk_up_left_f0 .. _f3
6Wwalk_leftmage_walk_left_f0 .. _f3
7SWwalk_down_leftmage_walk_down_left_f0 .. _f3

Godot names verbatim from assets/exporters/mage_walk_godot.tres (8 animations, 4 frames each, "loop": true, speed 6.0). Unity names and the 32 rects from assets/exporters/mage_8dir.png.meta (spriteMode: 2 = Multiple, filterMode: 0 = Point, pivot: 0.5, 0.5, rect: 32x32). Your own names can differ - keep the row order and your importer will still line up.

Import notes per tool (what each one can and cannot do with the sheet)
ToolWhat to setWhat it will not do
Godot 4AnimatedSprite2D with SpriteFrames: H frames = columns (4), V frames = 8, or attach the shipped .tres (8 animations x 4 frames at 6.0 fps, loop: true, 32x32 regions). Filter: Nearest, then Reimport; scale by whole numbers only.It will not invent diagonal frames - if row 1 and row 7 are copies of each other, the moonwalk stays.
Unity 2DTexture Type Sprite (2D and UI), Sprite Mode Multiple, slice by cell size (32x32) into columns x 8 = 32 sprites, Filter Mode Point, Compression None, pivot center (0.5, 0.5).It will not guess your facing order - the rect order in the slicer is your row order.
RPG Maker MV/MZA $-prefixed single-character charset is 3 columns (step / stand / step) x 4 rows (down / left / right / up) of 32px cells - the worked example ships one at 96x128. Keep the $ prefix in the filename or the engine reads it as a 8-character sheet.It has no diagonal rows at all: RPG Maker's charset grid is 4 directions, so the 4 diagonals are dropped. The shipped json records that mapping (down = S, left = W, right = E, up = N, frames 0, 1, 3).
Tiled 1.10Nothing for characters - Tiled draws the map and tileset layers. If you want a pixel-exact grid preview, add the PNG as an image collection with tile size = cell size (32x32) and step through it.It will not animate a character sheet and it will not export SpriteFrames. Keep the character sheet in the engine.
Symptom to fix (check in this order)
SymptomCauseFix
Sheet slices into half-poses or a diagonal seamWrong column countDivide: width / columns and height / 8 must be whole and equal (128/4 = 32, 256/8 = 32)
Character moonwalks on diagonalsRows 1/3/5/7 are flipped copies of 0/2/4/6Use the real 8-row order (S, SE, E, NE, N, NW, W, SW); check rows 1 and 7 side by side
Animation runs too fast or too slowfps copied from another packStart at 6 fps walk / 4 fps idle / 8-10 fps attack one-shot (the worked example's own numbers), then tune by feel
Blurry pixels in Godot / UnityDefault smoothingGodot: Filter Nearest + Reimport; Unity: Filter Mode Point, Compression None; scale by integers only
RPG Maker shows 8 tiny characters instead of oneMissing $ prefixRename to $name.png - the $ tells the engine the file is a single 3x4 charset
Edge pixels bleed from the next cellNeighbouring cell sampled at the seamSlice on the exact cell size with no margin/spacing, keep the sheet unscaled, and leave 1 transparent pixel at the cell border when you draw

The 30-second self-check before you ship the sheet

  1. Columns x 8 = the sheet's pixel grid: 4 x 8 cells of 32x32 = 128x256. If the sheet is not a whole multiple, stop and recount.
  2. Row 0 faces the camera (S) and row 7 is SW. Scroll the sheet top to bottom once and name each row out loud.
  3. Alpha is preserved: the cell background is transparent, not a matte colour (the worked example's sheets are RGBA).
  4. Each action has its own file - walk, idle, run, attack, hurt - rather than one sheet with rows re-used across actions.
  5. One GIF per action plays the loop you expect (the worked example ships 30 GIFs, 4 frames each, one per character per action).

Free helper: 8-direction grid checker

Type the sheet's pixel size and the number of columns you counted. The checker returns the cell size, tells you whether the grid is possible, prints the 8 facing rows with the engine names and gives you a copy-paste Godot snippet. Prefer to read the numbers off the file? Pick your PNG - the browser reads only its width and height, on your device.