godot-animation-tree-mastery
AnimationTree Mastery
Expert guidance for Godot's advanced animation blending and state machines.
NEVER Do
- NEVER call
play()on AnimationPlayer when using AnimationTree — AnimationTree controls the player. Directly callingplay()causes conflicts and jitter. Useset("parameters/transition_request")ortravel()instead [12]. - NEVER forget to set
active = true— AnimationTree is inactive by default. Animations won't play until$AnimationTree.active = true[13]. - NEVER use absolute paths for parameter access — Use relative paths like
"parameters/StateMachine/transition_request". This ensures compatibility when nodes move in the hierarchy [14]. - NEVER leave
auto_advanceenabled for interactive states — It causes immediate transitions. Use it only for automated sequences like combo chains or death-to-respawn [15, 121]. - NEVER use
BlendSpace2Dfor 1D blending — Blending only speed? UseBlendSpace1D. Blending only two states? UseBlend2.BlendSpace2Dis specifically for X+Y directional inputs (strafe) [16, 142]. - NEVER update
AnimationTreeparameters every frame without a guard — Setting parameters viaset()every frame regardless of change causes cache invalidation and potential stutter. Check equality first. - NEVER use deep, nested
BlendTreesfor simple logic — Every layer adds CPU overhead. If logic can be handled in aStateMachineor a simple script-drivenBlend2, do it there. - NEVER forget to handle
await get_tree().process_framewhen updating parameters synchronously — Sometimes the tree needs one frame to reconcile state before the next parameter change takes effect. - NEVER rely on
auto_advancefor long cutscenes — If an animation is interrupted,auto_advancecan put the character in a broken state. UseMethod Tracksto signal state completion instead. - NEVER use
Syncgroups for animations with wildly different lengths — It forces one animation to play at an extreme speed. UseTimeScaleor separate layers for mismatching cycles.
More from thedivergentai/gd-agentic-skills
godot-master
Consolidated expert library for professional Godot 4.x game and application development. Orchestrates 94 specialized blueprints through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms. Primary entry point for ALL Godot development tasks.
584godot-shaders-basics
Expert blueprint for shader programming (visual effects, post-processing, material customization) using Godot's GLSL-like shader language. Covers canvas_item (2D), spatial (3D), uniforms, built-in variables, and performance. Use when implementing custom effects OR stylized rendering. Keywords shader, GLSL, fragment, vertex, canvas_item, spatial, uniform, UV, COLOR, ALBEDO, post-processing.
217godot-2d-animation
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animation_finished, animation_looped, frame_changed, frame_progress, set_frame_and_progress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).
194godot-particles
Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emission_shape, color_ramp, sub_emitter, one_shot.
176godot-ui-theming
Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, add_theme_override, font, theme inheritance, dark mode.
172godot-save-load-systems
Expert blueprint for save/load systems using JSON/binary serialization, PERSIST group pattern, versioning, and migration. Covers player progress, settings, game state persistence, and error recovery. Use when implementing save systems OR data persistence. Keywords save, load, JSON, FileAccess, user://, serialization, version migration, PERSIST group.
160