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.
More from coding & agent
- A 3-Layer AI Memory Architecture: Obsidian Vault + Master Context File + Hub-and-Spoke — AiJohnAllen · 2026-11-16
- Survey of 40 major C projects: only 8 rely solely on malloc/free — blaizedsouza · 2026-11-16
- SoduWork open-sources its multi-agent enterprise workflow engine with built-in governance — LearnWithBishal · 2026-11-16
- Uninstalled Orca left zombie hooks slowing 11 coding agents; Multica audited clean — jiayuan_jy · 2026-11-16
- Unreal Engine 5.9 demo runs in browser at 21MB, slimmed down by Claude and Codex — jradoff · 2026-11-16
- Pragma Research's Cadence agent project demoed via a talking parrot — harrydong · 2026-11-16