DefAnimator, visual animator for Defold


As some of you might have read on our public slack, we have had two hack days this week where we had the opportunity to do some fun projects using Defold. I decided to do something I have been thinking about for a while, a tool created in Defold! So without a long introduction, let me introduce my hack result; DefAnimator 0.1 :slight_smile:



DefAnimator is a (super non-official ;)) visual animation tool built as a regular Defold project. The idea is that you can use it to author simple GO animations visually with keyframes, then save the animations as Lua-modules and use in your own game/project.

The output from the save functionality creates a Lua module that returns a function consisting of chained go.animation calls.

Example usage

local my_animation = require "my_animation" -- my_animation.lua was saved using the tool and is located in the project directory

function init(self)
    my_animation("gameobject_id") -- starts the generated animation on GO /gameobject_id

Implementation details

  • GUI was done using dirtylarry, with some modifications and custom “theme”.
  • Some OS native interaction using LuaJit FFI, including:
    • Native “Save/Open File” dialogs using defold-dialogs
    • Native context menus using a lib I’m planning to release soon-ish. :slight_smile:

Future plans

  • Being able to use DefAnimator as a library in your own project. Meaning that you could in theory just depend on DefAnimator to animate your own GOs (create a .collection with your own GO, add the supplied defanimator.gui and it “Should just work ™”.


I want to release it as open source eventually, but for now here is a (a bit buggy :smiley: ) OSX version. (2.3 MB)

Known bugs and limitations

  • The timeline is a bit wonky, you can only select keyframes on the current property you have selected (visualised as lighter gray in the left most column).
  • Playback preview does not loop.
  • Playback preview does not handle different easing options, but the saved file will.
  • Opening/Loading previously saved animations does not work currently.

Can I create tools in Defold?

This is a really brilliant showcase of what can be done with Defold and Lua. Well done Sven!


I am really looking forward to checking this out.


I try to use your program.
When I clicked to “Save As” nothing happens.


Whoops, my bad! Fixed and updated the Zip in the original post, but here is a direct link: