Home › Use cases › Godot 4 sprite sheet tutorial · Updated Nov 11, 2026
Godot 4.x Guide · Free Test Sheet + Copy-Paste GDScript

Import a 4×4 sprite sheet into Godot 4 (AnimatedSprite2D).

Everything you need to slice a 4-direction RPG walk sheet in Godot 4 without blurry pixels, seam artifacts, or bobbing feet — including a free 384×384 test PNG you can drop into res:// right now and a complete CharacterBody2D script.

Make a sprite — $5Download free starter ZIP
No account · 96px + 48px + RPG Maker $character.png · 3 free retries + money-back QA guarantee
Step 0 — Need a clean 4×4 sheet to follow along right now?
Grab our free 384×384 RGBA test sheet (download sheet-96.png) or the full starter-pack.zip (CC0 / commercial safe). Rows 0–3 are down, left, right, up; columns 0–3 are neutral, left_step, neutral, right_step.

1. Fix Blurry Pixel Art & Edge Artifacts First

In Godot 4.0–4.x, textures default to Linear filtering, which smears crisp pixel art into a blurry halo and can bleed neighboring cells across grid borders. Fix it project-wide once:

  1. Open Project → Project Settings → Rendering → Textures → Canvas Textures.
  2. Change Default Texture Filter from Linear to Nearest.
  3. (Per-node fallback): On your AnimatedSprite2D, set CanvasItem → Texture → Filter to Nearest.

Seeing 1px fringe lines from adjacent cells when your camera uses sub-pixel smoothing? Enable 2D Pixel Snap under Project Settings → Rendering → 2D → Snap 2D Transforms to Pixel, or check our Godot/Unity/Phaser pixel artifact guide.

2. Slice the 4×4 Grid in AnimatedSprite2D

Node treeCharacterBody2D → AnimatedSprite2D + CollisionShape2D
SpriteFrames gridHorizontal: 4 · Vertical: 4 (96×96 or 48×48 cells)
Animationswalk_down (0–3), walk_left (4–7), walk_right (8–11), walk_up (12–15)
Speed & Loop8 FPS (~135ms/frame) · Loop ON
Recommended collider (96px)RectangleShape2D 48×46 at offset (0, 19) — feet sit at y=90
  1. Select your AnimatedSprite2D, click Sprite Frames → New SpriteFrames in the Inspector, and click the resource to open the bottom SpriteFrames dock.
  2. Rename default to walk_down, click the waffle/grid icon (Add frames from a Sprite Sheet), and pick sprite-sheet-96-transparent.png.
  3. Set Horizontal: 4 and Vertical: 4. Click the 4 frames of the top row (left to right) and press Add 4 Frame(s).
  4. Set Speed to 8 FPS and keep the Loop arrows enabled. Repeat for walk_left (row 2), walk_right (row 3), and walk_up (row 4).

3. Complete Godot 4 CharacterBody2D GDScript (Walk + Free Idle)

Because column 0 of every PixelForge row is the neutral standing pose, you don't need four extra idle animations — just pause on frame = 0 when velocity stops:

extends CharacterBody2D

@export var speed: float = 140.0
@onready var anim: AnimatedSprite2D = $AnimatedSprite2D
var facing: String = "down"

func _physics_process(_delta: float) -> void:
	var dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
	velocity = dir * speed
	move_and_slide()

	if dir == Vector2.ZERO:
		anim.stop()
		anim.animation = "walk_" + facing
		anim.frame = 0  # column 0 = neutral standing pose
		return

	if absf(dir.x) >= absf(dir.y):
		facing = "right" if dir.x > 0.0 else "left"
	else:
		facing = "down" if dir.y > 0.0 else "up"
	anim.play("walk_" + facing)
Do not set anim.flip_h = true: PixelForge packs include a dedicated walk_left row (row 1) and walk_right row (row 2) with feet centered at x=48, so flipping in code is unnecessary.

4. Alternative: Sprite2D + AnimationPlayer (For Footstep Callbacks)

Need audio or hitbox triggers on exact step frames (columns 1 and 3)? Put sprite-sheet-96-transparent.png onto a Sprite2D, set Animation → Hframes = 4, Vframes = 4, and keyframe Sprite2D:frame inside an AnimationPlayer alongside a Call Method track.

Want your Godot hero to look like you or your friends? Forge a custom $5 pack from any portrait photo — every ZIP ships 96px + 48px sheets, 32 pre-sliced PNG frames, 8 strips, AGENT.md, and schema-v2 manifest.json.

Frequently asked questions

Why is my sprite sheet blurry when imported into Godot 4?

Godot 4 defaults to Linear texture filtering. Go to Project → Project Settings → Rendering → Textures → Canvas Textures and set Default Texture Filter to Nearest for crisp pixel edges.

Why do thin lines or artifacts flicker at the edge of my Godot sprite cells?

Sub-pixel camera positions combined with linear filtering sample 0.5px into the neighboring cell. Switching Texture Filter to Nearest and enabling Snap 2D Transforms to Pixel eliminates cell-border bleeding.

Should I use AnimatedSprite2D or Sprite2D + AnimationPlayer in Godot 4?

Use AnimatedSprite2D for fast 4-direction top-down movement; use Sprite2D + AnimationPlayer (Hframes=4, Vframes=4) when you want Call Method tracks for footsteps or frame-synced hitboxes.

Where do I place the CollisionShape2D for a 96×96 top-down RPG sprite?

For y-sorted RPG movement, place a lower-body RectangleShape2D (~48×46 px) near the feet (feet sit at y=90 in every 96px PixelForge frame) so the character's head can overlap walls behind them naturally.

Put anyone into your game.

$5 · one photo · 4-direction walk pack (96px, 48px, RPG Maker & Phaser atlas) · 3 free retries · no subscription

Make a sprite — $5