Getting Started with Godot and Dragonbones
Hey there, and thanks for your interest in the Godot + Dragonbones project. I personally think that Dragonbones Pro is a very good, yet undocumented tool that can be utilized for very impressive things within the Godot engine.
With that in mind, the goal is to be able to create and integrate 2D animations within your Godot game projects with as little frustration as possible. The best part? It's absolutely free.
However, websites and servers aren't free. Considerable time is also being put into these efforts. Therefore, consider donating if you like what we're doing here. It will ensure we can keep doing it. If you're looking at alternatives, they will all cost a non-negligible amount once you start getting into studio licensing fees; which is the opposite of what Godot stands for.
Please, support this open source project :)
What you'll need
You'll need to download 2 things to follow along this guide:
Dragonbones Pro 5.6.3 -- Free 2D Skeletal Animation software. Download Here
(I heard that Blender COATools can also be used, maybe if it's requested in the right way we can look at support this)
Godot Dragonbones -- Latest stable build. Download Here
This is what we do here. We maintain and distribute engine binaries for official point upgrades with the Godot Dragonbones plugin.
As of this writing, I've only exported the Win64 engine binaries as that is the only platform Dragonbones supports. I will be uploading linux binaries ASAP. Additionally, I will try to get as many platforms in the export-templates bundle when that gets published.
If you absolutely need certain platform support -- reach out and we'll see what we can do.
And that's it! You've got everything you need. Install dragonbones and plop that exe file wherever you'd like to work from.
What you need to know already (psst... Not alot)
Now, I am not a good animator; and I will not pretend to be. However, if you are an animator; the things I can't show you will be easy enough to figure out for yourself.
Therefore, the first step of this guide; is to ensure you're familiarized with Dragonbones enough to create a single animation of any kind. Name this animation Run
With that taken care of, I'll also be assuming you have a basic understanding of the Godot game engine. If you know how to create a sprite, and how to use the _ready() function, you know enough.
And just incase you're feeling lazy, here's a base file with Run animation in it
So I get it, you're lazy and don't want to create your own animation. Well here's the ZIP:
(zip this into its own folder, open the .dbproj in Dragonbones)
(Oh yeah, GuyGirl is mine, you can't have her)
(I'm too good to you, giving you files like this)
Export the animation for Godot
Now that you have your very own animation ready for your game, let's export the animation in the Dragonbones format for consumption within the Godot Dragonbones engine.
So from within Dragonbones Pro, click File->Export in the menu. From here choose these settings:
Type: Dragonbones JSON
Data Version: 5.5
Image Type: Texture Atlas (you can play with settings if you feel like)
BG Color: Transparent
Export To: Specific Folder
Output Path: desired asset directory within Godot project
Project Name: Whatever you want
Text too hard? Here's a screenshot:
Add animation to Godot project
Let's get our newly exported animation into Godot. So open your project within Godot Dragonbones.
Create a new scene
Add GDDragonbones Node to it (Ctrl + A)
Drop the _ske.json from file explorer into the `Resource` property on GDDragonbones
And you're done!
Where to go from here?
And there you have it, you can now create animations in Dragonbones 2D and get them running in the Godot Dragonbones engine.
"But that's not very useful! How do I make it do things?!"
I'm happy for your enthusiasm! This is still very early days for this project.
Visit our GITHUB REPO to view the current documentation on playing animations and blending them in code.
Other than simply playing animations, the engine can also:
Generate events on specific frames which can be caught in engine (audio for example)
Catch various animation states
Update textures in specific slots (think character customization)
And much more...
I will be documenting all these features as I have time and as I verify they're all functioning as intended.
If you want to be updated when new documentation is available, subscribe below.
If you'd like to have certain features / documentation prioritized -- get in touch and we'll see what we can do :)
Oh and please share this!