jslaugh

Hey I'm pretty new to Spine, but I've gone through a bunch of tutorials and I am starting to get ready to jump into adding it to my projects. I'm currently familiar with Python, but I recently found Godot and seems to have similar syntax to Python, and am thinking of transferring over.

Does anyone have any feelings on how 4.0 or 4.1 Spine works with Godot?
jslaugh
  • Mesajlar: 4

Mario

We've started work on an official Godot plugin but that's still a bit away from release. There's a 3rd party spine-godot plugin, which ours is based on, as the author has generously donated it to us. You could give that a try in the meantime. But note that we are changing quite a few things around.

The original plugin: https://github.com/rayxuln/spine-runtime-for-godot
Ours can be found in the spine-godot branch (based on spine-runtimes 4.0) on GitHub: https://github.com/EsotericSoftware/spine-runtimes/tree/spine-godot
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

jslaugh

Thanks for the response! Before jumping into Godot, I realize there isn't much tutorials about Godot and Spine 2D runtimes. I think for now, I will continue to play with the trial version until I feel comfortable using it with Python. But I will check the forum once in a while to see what the progress is on an official Godot runtime release. Thanks!
jslaugh
  • Mesajlar: 4

T.Fly()

Looking forward to the official Godot support.
T.Fly()
  • Mesajlar: 15

Nate

We are making good progress with the Godot runtime lately. It's turning out very nice!
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 11939

jslaugh

That's great to hear! I ended up purchasing Spine Pro and have been using rayxuln's runtime. Is there a difference if I were to switch over to Esoteric's runtime?
jslaugh
  • Mesajlar: 4

Mario

Yes, they won't be compatible. You can follow the changes in the 4.2-beta branch. It's not ready for use in projects yet, but ready enough to play around with it and give feedback. V1 will try to cover all the basics as well as possible. V2 will the focus on things like AnimationPlayer support, possibly spatial support (currently it's only for canvas), and more.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

jslaugh

Sounds great! Keep me updated! I check in once in a while. I'm open to switching everything over once there is a stable official release, but I still love hearing about progress. Thank you for your dedication to this project.
jslaugh
  • Mesajlar: 4

Mario

I'll likely not post individual progress updates here. For that, have a look at the commits in the 4.2-beta branch. All commits related to Godot are prefixed with [godot]: https://github.com/EsotericSoftware/spine-runtimes/commits/4.2-beta. Alternatively, you can follow my ramblings on Twitter, but we aware that I do not post exclusively about Spine stuff :)
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

tasco

Hey. I'm also following progress on Spine runtime for Godot. I just want to report that I can't build Web version. Emscripten throws some errors and warnings when compiling Spine runtime.
tasco
  • Mesajlar: 1

Ryusui

If it helps, Rayxuln's spine-module-for-godot (linked above) compiles for web with no issues (on my end, at least). I'll be using that while the official support spends some more time in the oven.

If there's one thing I really hope the official Godot support adds, it's an easier way to attach arbitrary Godot objects to Spine attachment slots. I mean, it works, I can use it, but it's really clumsy and unintuitive. (And undocumented, IIRC - I only figured out how it worked by looking at the code itself!)
Ryusui
  • Mesajlar: 18

Mario

@tasco exports to non-desktop platforms, that's a big item on my todo list. I want to make sure everything else is good first.

@ryusui that's actually what I spent most of my time on :) They way attaching other nodes is planned to work is like like this:
1. In the inspector for SpineSprite, you have a dedicated section where you can specify which node should be rendered before/after which slot. It's not using the standard array or dictionary inspector UI, but a custom UI with drop downs for slots and node paths.
2. In code, you will have setters to add/remove nodes from slots.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

Mario

Actually, I just gave the WASM build a quick try, fixed the compilation error, build the export tempalte, and tada:

Screenshot 2022-04-19 at 13.54.12.png
Bu mesaja eklenen dosyaları görüntülemek için gerekli yetkilere sahip değilsiniz.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

Mario

Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

mightymochigames

I noticed the spine-godot directory on github is gone. Is there still a way to try spine in godot?
mightymochigames
  • Mesajlar: 2

Nate

Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 11939

deezaster

It works almost perfectly. I am eagerly waiting for the "Export Templates".
Kullanıcı avatarı
deezaster
  • Mesajlar: 4

Mario

Can you elaborate on the "almost" part?
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

deezaster

- In AnimationPlayer Node I click on "Add Track > Property Track", choose the SpineAnimationTrack, but i can't see the properties "animation_name" or "loop" (like used in example 08-animation-player)
- When I click on "Search Help" (Reference documentation in Script Tab), Godot crashes.
- The External Editor (Visual Studio code with godot-tools extension) cannot connect to the GDScript Language Server.

I build on my Mac with "./setup.sh 3.4".
Kullanıcı avatarı
deezaster
  • Mesajlar: 4

Mario

Cheers! Issues 2 and 3 are likely due to the fact, that the build generated by setup.bat/.sh is a minimal editor buildmwith many modules disabled. I do this so iteratiom times on recompiles while working on the code are minimal. When we publish editor builds, they'll have all the default modules that come with Godot. You can fix this locally if you remove all lines from custom.py and recompile the engine/editor via setup.sh/.bat (build.sh/.bat will not work, as setup.sh/.bat configures the build).

Issue 1 is a documentation problem :) You don't want to create a track the SpineAnimatiomTrack in the animatiom editor, but the AnimationPlayer child of the track. Sadly, Godot's AnimationPlayer and editor don't allow custom track types, so this is a workaround. As a bonus you see the animation durations and names tho, which is MUCH better then only seeing a little diamond for a key.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

deezaster

Mario yazdı:Cheers! Issues 2 and 3 are likely due to the fact, that the build generated by setup.bat/.sh is a minimal editor buildmwith many modules disabled. I do this so iteratiom times on recompiles while working on the code are minimal. When we publish editor builds, they'll have all the default modules that come with Godot. You can fix this locally if you remove all lines from custom.py and recompile the engine/editor via setup.sh/.bat (build.sh/.bat will not work, as setup.sh/.bat configures the build).
Issue 3 "GDScript Language Server" solved! :yes:

Issue 2 "Search Help" NOT solved. Godot still crashes :no:

CleanShot 2022-05-11 at <removed>


---

Mario yazdı:Issue 1 is a documentation problem :) You don't want to create a track the SpineAnimatiomTrack in the animatiom editor, but the AnimationPlayer child of the track. Sadly, Godot's AnimationPlayer and editor don't allow custom track types, so this is a workaround. As a bonus you see the animation durations and names tho, which is MUCH better then only seeing a little diamond for a key.
Unfortunately, your explanation did not help me. Perhaps I have expressed myself unclearly.

How did you manage the following? animation_name and loop do not appear in the selection. I tried to enter the entries manually, but of course it doesn't work.
CleanShot 2022-05-11 at <removed>


Finally, in another AnimationPlayer, I want to put together the individual animations:
CleanShot 2022-05-11 at <removed>
Bu mesaja eklenen dosyaları görüntülemek için gerekli yetkilere sahip değilsiniz.
Kullanıcı avatarı
deezaster
  • Mesajlar: 4

Mario

Look what objects are keyed in your second screenshot. It's the AnimationPlayers beneath the SpineAnimationTracks, not the SpineAnimationTracks.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082

deezaster

Mario yazdı:Look what objects are keyed in your second screenshot. It's the AnimationPlayers beneath the SpineAnimationTracks, not the SpineAnimationTracks.
Yabadabadoooh. I know what the problem is.
When I add an AnimationPlayer for a SpineAnimationTrack, the display in the Animation Editor remains empty:

CleanShot 2022-05-12 at <removed>


I have to close the scene and open it again.
I discovered this by accident this morning. After I opened the project, all the entries I wanted were there.
CleanShot 2022-05-12 at <removed>


Is this a Godot problem?
Bu mesaja eklenen dosyaları görüntülemek için gerekli yetkilere sahip değilsiniz.
Kullanıcı avatarı
deezaster
  • Mesajlar: 4

Ryusui

deezaster yazdı:I have to close the scene and open it again.

Is this a Godot problem?
Not sure, but it is worth noting that Rayxuln's module has a similar problem where certain changes don't appear unless you close and reopen the scene.
Ryusui
  • Mesajlar: 18

Mario

Depends on the Godot version. 3.4 has a bunch such issues (unrelated to the module). Imtried to work around some of them. 4.0 is a bit better in that regard, but not quite stable.

@deezaster, I should get to writing docs next week, so I can better illustrate how this is supposed to work.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3082


Dön Runtimes