Pixel art trees swaying in wind without animation frames: full traveling-wave technique

CatAstro_Piyush · x · 2026-11-16

A SpriteCook deep-dive explains making 2D pixel art trees sway naturally without extra animation frames: keep the trunk still, split the canopy into leaf-clump sprites that step in whole-pixel loops (rest→up→up-right→right→back), phase-offset each clump by its world position along the wind so a traveling wave crosses the canopy and between trees. Gusts are patches moving across the map that widen the loop from 1px to 2-3px and lean trees via a damped spring; offsets are zero outside gusts. Pines bend by sliding rows proportionally to height squared. Includes tested Python and Godot code, concrete parameters (poses at 10Hz, 1.54s loop at 320×180), and a copy-paste prompt for coding agents like Claude Code and Cursor to integrate the system into an existing project.

Original post →

More from coding & agent

coding & agent channel →