Extension-spine

We’ve released version 2.0.7:

  • Added support for animation start offset
  • Added support for attachment colors
7 Likes

At this point, how reasonable is it to in the future support Spine’s clipping features? It would enable a lot of creativity.

Clipping attachments - Spine User Guide

3 Likes

The component/render api is now added to the dmsdk, so in theory, I think it should work. We use this for the stencils in the Rive extension.

2 Likes

We talked about missing support for clipping in a meeting yesterday as something the community might request soon. And sure enough, here’s the request! :slight_smile:

Now that Spine has been moved to an extension we hope for community contributions to improve Spine support further to free up valuable development time for us.

7 Likes

Now that Defold games can be used in casino games (as all source is available and can be audited / the license no longer prohibits it) it may be possible to get some of those kinds of gaming companies to sponsor Defold / some specific additions. Tools like Spine are currently heavily used in the design of slot machines. Think of the animated reels. So may be worth doing some outreach to the big gambling gaming companies and seeing if they would be interested in sponsoring Defold.

My game uses gui.set_spine_scene(), which seems to have been deprecated. Is there a way to change a gui spine scene at runtime with the new extension?

No, it hasn’t?
Are you experiencing issues with it?

I think initially I had just forgotten to refresh the Spine dependency and the function wasn’t found.

Now this code:
gui.set_spine_scene(node, "lime_blob")

Causes a crash:

Assertion failed: (Capacity() - Size() > 0), function Push, file array.h, line 501.
INFO:CRASH: Successfully wrote Crashdump to file: /Users/niclasaberg/Library/Application Support/Defold/_crash
ERROR:CRASH: CALL STACK:

# 0 pc     0x30bd7d libxpc.dylib _sigtramp+29

I’ve double checked that there is a spine scene with the lime_blob id.

I can’t find the gui.set_spine_scene() in the reference anymore, maybe because of the Spine move?

Update: It seems the crash only happens when the node has been cloned.

This works:

local node = gui.get_node("character")
gui.set_spine_scene(node, "lime_blob")

This crashes:

local node_to_clone = gui.get_node("character")
local node = gui.clone(node_to_clone)
gui.set_spine_scene(node, "lime_blob")
1 Like

It’s because we haven’t come up with a way to present the spine+gui documentation.

The “ground truth” is here, in the code:

2 Likes

For bugs and issues, pleas open a ticket in the extension repo.

2 Likes
3 Likes

There’s now a pull request with a fix awaiting review. Should be in today.

3 Likes

Amazing! :fire:

2 Likes

I understand gui.set_spine_attachment is not implemented?
No way to change attachment on the GUI level?

If anyone has worked on implementing I’m interested for any pointer. thanks.

3 Likes

I added a ticket for this:

3 Likes

We’ve released version 2.1.0 of the extension-spine, with a fix for support of with Defold 1.3.4.

It has to do with how atlas paths are generated by bob nowadays.

EDIT: Sorry, I meant Defold 1.3.4!

10 Likes

We’ve released version 2.3.1 of the extension-spine.

It fixes a compile issue when used with the Defold 1.3.7 beta.
It was an old deprected struct name that was accidentally used within the extension.

5 Likes

Thanks for all your work. Another missing feature is support for additive blending from within spine files. When run in Defold , these colors in the projects get changed to normal blending. I haven’t tried the other blending modes.

We’re happy to take requests in the github repo. Hopefully we can get help from the community in implementing it!

2 Likes

Hi, I’ve done many tests between Defold and other cross-platform engines (Unity, libgdx, Godot).
And the runtime spine speed of defold is fantastic both in web and on desktop.
However if I load 600 spineboy models in defold there is a very large loading time to get them all loaded (over 6 seconds) , during which the screen will be blank.
This does not happen in every other engine I tested.
This delay occurs in debug builds and release builds and bundles for desktop , web and android.
It’s not a graphics bottleneck, I converted the png’s to jpg’s and tried every graphics tickbox in defold and it didn’t help at all.
The bottlneck is spine, I just use factories to load exactly like the BunnyMark project.
Disconnecting internet didn’t help.
Is there a bottleneck when using Defold and external libraries or just spine-defold runtime?
Is there a custom setting in the project file similar to rig_count that can be increased to remove the delay?
Finding the cause of the delay would be important when deciding to make a large project using defold, also that it doesn’t exist in every other engine tested is curious.
Thanks for your help.