Spine plugin update

5 favourites
From the Asset Store
[C2] [C3] support C3 build service | support Banner ads, Interstitial ads, Rewared video ads.
  • The big thing to understand with this plugin is that everything is rendered by Spine to a Sprite texture with a fixed resolution. C3 then renders that Sprite texture to the layout. Spine is not rendering to the full layout. So any changes for bone control are relative to the Sprite texture space (think of it as a small local layout.) To translate that we need to figure out where the mouse is relative to the rendered sprite in the C3 layout and that's what the equations in the project do.

  • Thank you, got it! I was overcomplicating the translation a lot for whatever reason.

  • Hey Mikal,

    i am still working with your Plugin, newest version. Its working fine so far, however with 2 exports i got the problem that the grafics dont show up. The console shows the following error:

    All other animations working as intended and i have no idea what went wrong here :(

    Maybe you have an idea? Meanwhile i will recheck the spine project and reexport those...

  • Hi, nice to hear that you are still using it, it would be great if you could show some of your work at some point!

    This looks like either the *.json file or the *.png file is unable to be read for some reason. Are the files located on the same server? Are they on another server? Check the 'network' tab (perhaps after a reload so you capture the requests.) This may show you the request that failed and a little more information about what is going on.

    Check the atlas file first line is there anything interesting about the path to the *.png file?

    Did the export include more than _one_ png file?

    Recently I got cdn style loading of png, atlas, json working (using a different server for these files vs the the server where the game loads from.) The one change I had to do was update the first line of the atlas file to use the same cdn path. Though if you are not doing cdn, this will not be the issue.

    If you can't fix it, you can find me on the Construct Discord server and send me the project via DM and I can take a look.

  • Thank you. You're doing great, I used it in my project: https://fb.gg/play/stick-clash

    Looks pretty good, but I don't know is there a way to get smooth and not stall when switching from one animation to another?

  • Nice work!

    What do you mean by stall, can you share a video and point it out? There is the animation mix property (and ACE) which will control mix time between animations, the larger this is the longer it will take to switch animations (but it will be done smoothly.)

  • Nice work!

    What do you mean by stall, can you share a video and point it out? There is the animation mix property (and ACE) which will control mix time between animations, the larger this is the longer it will take to switch animations (but it will be done smoothly.)

    is it possible to update json path, atlas path and png path in event?

  • I've noticed games on instant games will fail to load these path.

  • It is not currently possible to update them at runtime/events. Do you know why the files cannot be loaded on instant games? What type of issues are reported on console?

  • Hi Mikal,

    Stumbled upon this, looks very promising. I've had Spine for quite some time now but never really had the chance to use it yet. I've also just recently started messing around with Construct as well, so apologies if my questions seem uninformed.

    In this particular post regarding SpineBBoxGetPoly with mesh for collisions, am I correct in assuming that you can have multiple bounding boxes?

    In my one of my experiments, I have a platformer that has a sprite pinned on it. The sprite has image points that dictate the position of the hitboxes, while the Collision polys act as the hurtbox. This works, but is quite tedious for bigger projects given that there's no way to import points. Also, there seems to be no way to display collision polygons. I could make use again of the image points, but again, that's quite tedious.

    So now with your Spine plugin, I was wondering if:

    (1) I could use multiple bounding boxes, one for hit, one for hurt

    (2) It appears I can also key and animate bounding boxes in Spine. If so, then perhaps I can skip using the Sprite object altogether even when doing frame by frame animations, and have it use the same system for hit and hurt (instead of the Sprite + Image Points). If this is possible, would it have performance issues?

    Add SpineBBoxGetPoly expression returns poly points in JSON format of named slot/bounding box attachment. Use with C3 Spine Mesh to create a very accurate Bounding Box in C3.

    SpineBBoxGetPoly expression returns poly points in JSON format array of named slot/bounding box attachment. Use C3 JSON object to parse and use points. The points are returned in top level JSON array [x0,y0, x1, y1,…]

  • Some answers:

    1) You can have multiple bound boxes in the Spine project and C3 can differentiate between multiple bounding boxes at runtime. (The expression for the bounding box center and for the poly points use slot and bounding box name.)

    2) The bounding boxes in Spine just provide position and poly data in C3, for hit box and collision, you would still need to align some other sprites with either the center position or use a mesh to have it follow the poly points. I don't think you can get away without having _some_ sprite along with the Spine object. It has to do how the Spine object is rendered, it's basically rendered into a texture which is then used as texture for a rectangular C3 drawing object, so C3 is not aware of all the pieces being rendered. Check out the example project on github for the image you showed below, it shows how to use the poly point of a bounding box to deform a C3 sprite.

    Performance wise, using just the bbox center and a C3 sprite will be faster, because you can just set the position of the sprite in one action. To match a changing bbox (e.g. deform) with a sprite w/ mesh points will require more perf due to C3 calculations of bbox, etc. when mesh points change.

  • Hi, thank you for making us awesome add on.

    Btw, unfortunately I tried so many times to import the file that be exported by Spine version 4.0.16 didnt work.

    Then I tried to import 3.8 it was ok.

    Please update the addon.

    Thank you so much!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, this is only for 3.8 right now. I will start working on a 4.0 update after summer. Thanks for checking it out.

    I have not used Spine 4.0+ that much, so I'm interested in what are the nice new features that you like to use?

  • Yes, this is only for 3.8 right now. I will start working on a 4.0 update after summer. Thanks for checking it out.

    I have not used Spine 4.0+ that much, so I'm interested in what are the nice new features that you like to use?

    No worry :). My wife made animation for my game, it's small issue when I Export, so I just want to notice you. :)

    Have a great weekend!

  • Hi Mikal, thank you for your efforts in maintaining this plugin!

    I'm struggling with something which I thought would be dead simple, and I'm hoping you can help. I'm trying to pin a Construct-based sprite (or any object, really), to a Spine bone. Like putting a hat on the head bone and ensuring it matches its X, Y, and Rotation.

    Is this possible? I'm trying to avoid setting up all of the sprites within Spine itself, as I need to be able to use any object in Construct as a pinned object.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)