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.
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:
- Open Project → Project Settings → Rendering → Textures → Canvas Textures.
- Change Default Texture Filter from
LineartoNearest. - (Per-node fallback): On your
AnimatedSprite2D, set CanvasItem → Texture → Filter toNearest.
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
- Select your
AnimatedSprite2D, click Sprite Frames → New SpriteFrames in the Inspector, and click the resource to open the bottom SpriteFrames dock. - Rename
defaulttowalk_down, click the waffle/grid icon (Add frames from a Sprite Sheet), and picksprite-sheet-96-transparent.png. - Set Horizontal:
4and Vertical:4. Click the 4 frames of the top row (left to right) and press Add 4 Frame(s). - Set Speed to
8 FPSand keep the Loop arrows enabled. Repeat forwalk_left(row 2),walk_right(row 3), andwalk_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)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
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.
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.
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.
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