Godot Animation Frame Duration — Milliseconds to SpriteFrames
In Godot 4 an AnimatedSprite2D frame has no time of its own: its duration is a multiplier of the animation's speed in frames per second. So 250 ms at 12 fps is 3.0, and a GIF with uneven delays needs a different number on almost every frame. The Studio keeps your timing in milliseconds and does that division for each frame when it writes the SpriteFrames resource.

- Godot 4Verified· Godot 4.7.2
- Unity 6Verified· Unity 6000.5.3f1
- Phaser 3 / 4Verified· Phaser 3.90 + 4.2
- PixiJS 8Verified· PixiJS 8.21
- Aseprite JSONVerified· Phaser load.aseprite · PixiJS 8.21
- .asepriteVerified· Aseprite 1.3.18
- Spine / libGDXVerified· spine-canvas 4.2
- Starling / Sparrow XMLVerified· Phaser 4.2
- LÖVEVerified· LÖVE 11.5
- DefoldBuilt· Defold bob.jar 1.13.1
- GameMakerUNVERIFIED
- CSS spritesVerified· Chromium
- GIF / APNGDecoded· Pillow
What it does
- Timing in milliseconds from wherever it comes: GIF and APNG delays, Aseprite per-frame durations, or values you type on the Timeline, one frame at a time or in bulk.
- Each animation's speed is its tag's fps, and each frame's duration = its ms ÷ (1000 ÷ fps), written with up to six decimals.
- Reverse and ping-pong are baked into the frame order, so Godot plays them forward exactly as the preview did; a ping-pong does not show its end frames twice.
- Repeat 0 (loop forever) sets loop on. A tag with a finite repeat count is written with loop off, because SpriteFrames has no repeat count.
- Checked in Godot 4.7.2: every animation's speed, loop flag and per-frame duration read back from the loaded resource matched what was written.
How to do it
- Drop a GIF, an .aseprite file or a sprite sheet.
- Open the Timeline and check each frame's ms; select several frames to set them together.
- Play the tag with Enter, honouring its direction and repeat, and fix what feels off.
- Open Pack & Export and choose Godot 4.
- Put the .tres on an AnimatedSprite2D's Sprite Frames, or open the .tscn that comes with it.
Milliseconds at a given fps → Godot duration
| Frame time | Animation speed (fps) | One unit lasts | duration in the .tres |
|---|---|---|---|
| 100 ms | 10 | 100 ms | 1.0 |
| 250 ms | 12 | 83.33 ms | 3.0 |
| 120 ms | 10 | 100 ms | 1.2 |
| 50 ms | 20 | 50 ms | 1.0 |
| 500 ms | 12 | 83.33 ms | 6.0 |
Rule: duration = ms ÷ (1000 ÷ speed). The Studio writes speed = the tag's fps and converts every frame, so you never type these numbers yourself.
Engine exports and how each was checked
"Verified" means the exported files were loaded by the real engine or tool on real CC0 assets and the result was compared with the source. Anything that was not loaded is labelled as such.
| Target | Files | Check |
|---|---|---|
| Godot 4 | .tres SpriteFrames · .tscn AnimatedSprite2D · .png.import | Verified Godot 4.7.2Loaded by Godot; every animation frame drawn and compared with the source file. The scene uses Nearest filtering; rotation is never used. |
| Unity 6 | .unity.json · Editor/NerulioSpriteImporter.cs · AnimationClip | Verified Unity 6000.5.3f1Batch mode: sprite rects, pivots, pixels, clip keys and durations checked. |
| Phaser 3 / 4 | atlas JSON (multiatlas) · .anims.json | Verified Phaser 3.90 + 4.2Frames and animations drawn by both versions. |
| PixiJS 8 | spritesheet JSON · animations · anchor · meta.scale | Verified PixiJS 8.21Rotated and multi-page atlases included. |
| Aseprite JSON | hash / array · frameTags · slices | Verified Phaser load.aseprite · PixiJS 8.21Tags keep their direction and repeat count. |
| .aseprite | layers · tags · durations · slices | Verified Aseprite 1.3.18Opened and rendered by the Aseprite command line. |
| Spine / libGDX | .atlas | Verified spine-canvas 4.2Every region drawn by the Spine runtime, rotated and trimmed; libGDX itself was not run. |
| Starling / Sparrow XML | XML per page | Verified Phaser 4.2Phaser 3.90 draws trimmed XML frames wrongly (its own bug); the "Sparrow XML (Phaser 3)" preset turns trim off and passes in 3.90 and 4.2. |
| LÖVE | Lua quads · nerulio_atlas.lua · main.lua | Verified LÖVE 11.5Every frame drawn and every animation stepped through the shipped helper. |
| Defold | .atlas · .tilesource | Built Defold bob.jar 1.13.1Built by Defold's command-line builder; the built texture's UVs were read back. |
| GameMaker | spr_<name>_stripN.png · gamemaker.json | UNVERIFIEDNot loaded in GameMaker (no headless GameMaker). The strips are cut the way its strip importer cuts them. |
| CSS sprites | .css · preview .html | Verified ChromiumEvery class drawn from the shipped stylesheet. |
| GIF / APNG | one file per animation | Decoded PillowEvery frame and delay decoded again after export; APNG is exact. |
Evidence
GIF decoder: 408 of 408 frames identical to Pillow on 29 real GIFs; APNG 132 of 132 on 16 files. .aseprite: 231 corpus files imported, re-written and reopened in Aseprite 1.3.18 with the same tags, durations and pixels (231/231). Exports: 49 runs in the real engines on real CC0 assets, 47 pass — the 2 failures are Phaser 3.90's trimmed-XML bug, which the Phaser 3 preset avoids.
Limits
- A grid or island guess is a preview with a confidence; nothing is cut until you press Apply, and every choice has one-click alternatives.
- .aseprite files whose layers do not compose exactly (e.g. group opacity) are imported flattened, and the Import panel says why.
- Rotated frames in an imported atlas stay rotated; their export is UNVERIFIED.
- Images up to 32,768 px per side (268 million pixels), subject to your browser's memory.
Questions
Why is my frame duration 3.0 and not 0.25?
Godot 4 measures a frame's duration relative to the animation speed. At 12 fps one unit lasts 1000 ÷ 12 ≈ 83.3 ms, so a 250 ms frame is 3.0 units. If you change the speed later, every frame scales with it and the ratios stay.
Can Godot 3 read these timings?
No. Godot 3's SpriteFrames has no per-frame duration and uses a different resource format. Only Godot 4 was checked (4.7.2).
Does speed_scale on the node change anything?
speed_scale on the AnimatedSprite2D multiplies the whole animation. Leave it at 1 and the frames last the milliseconds you set in the Studio.
A GIF says some frames last 0 or 1 hundredths of a second. What does Godot get?
Browsers stretch such frames, so the GIF import asks how to read them: as browsers play them, or the file's own values. It shows that as a decision you can switch, and whichever you keep is what the SpriteFrames receives.
Is it free, and do I need an account?
Everything on these pages is free and works without an account. There is no watermark and no export that is held back.
Are my sprites uploaded?
No. The Studio decodes, packs and exports in this browser tab. Projects are autosaved in the browser (IndexedDB) and can be saved as a .nerulio file.
Does it need Aseprite or an engine plugin installed?
No. .aseprite files are read and written in the browser, and each engine bundle carries what that engine needs (for Godot, the import settings and scene; for Unity and the Godot TileSet, a small editor script).