Skip to content
Back to skills

Sprite Anim

ASecurity

Build a frame-based sprite animation system driven by a texture atlas

  • 3 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 3, 2026
ai-agentsgo

Works with

  • cli

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill sprite-anim --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sprite Anim?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sprite Anim
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-sprite-anim/badge)](https://www.skillsdirectory.com/skills/black141312-sprite-anim)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sprite-anim
description: Build a frame-based sprite animation system driven by a texture atlas
category: gamedev
---

# Sprite Animation

Use to play named animation clips (idle, run, attack) from a sprite sheet with correct timing and state transitions.

1. Pack frames into an atlas and record each frame's source rect (x, y, w, h) plus pivot/origin.
2. Define clips as ordered frame lists with per-clip frame duration (or per-frame durations) and a loop flag.
3. Track playback state per entity: current clip, elapsed time, current frame index, playing/paused.
4. Each update, advance elapsed by `dt`; while it exceeds the frame duration, subtract and step the frame index.
5. At clip end, loop back to frame 0 or hold the last frame and fire an "animation finished" event.
6. On render, draw the current frame's source rect to the destination, honoring the pivot for flips and rotation.

## Rules
- Drive timing by accumulated `dt`, never by frame count, so speed is constant across frame rates.
- Keep animation state separate from gameplay state; a state machine decides which clip, the player just plays it.
- Use the pivot/origin for horizontal flips so the sprite does not visually jump on direction change.
- Disable texture filtering (use nearest) for pixel art to avoid bleeding between atlas frames; add padding/extrusion.
- Make non-looping clips emit a completion signal so transitions (attack→idle) are event-driven, not polled.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.