1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

OFFICIAL GMS2 Spine Runtime Update 2.2.2

Discussion in 'GameMaker Studio 2 Community Tech Support' started by rmanthorp, Jan 30, 2019.

  1. rmanthorp

    rmanthorp YoYo Games Staff Admin YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    214
    Beta IDE Release Notes
    Beta Runtime Release Notes
    Beta Opt-In FAQ
     (How to get on the Beta Channel)

    This topic is for the discussion of issues relating to Spine Runtime Update. However, this does not replace our normal bug reporting system and you should report all bugs as normal using https://www.yoyogames.com/bug


    Goal: Send us feedback and sample projects for when things do not work as expected. Any critical additions we should be considering at this time?

    • The IDE now imports sprites exported using Spine 3.7 - see this guide for more info
    • Fixed issues where importing new Spine sprites to replace existing data didn't clear the old files from your project folder
    • Added support for several spine features and you can find the detail for these in the manual:
    • Clipping attachments - These are attachments assigned to Spine slots which clip away parts of the sprite.
    • Per-attachment colours - We now support tinting attachments based on their assigned colours.
    • Per-slot blend modes - We now support per-slot blend modes as specified in the Spine IDE.
    • Partial tint-black support - Note that this requires the use of a custom shader (see our manual).
    • Multiple texture page support - We now support Spine sprites which use atlases referencing multiple image files (see this guide)
    • Floating point frame indexes - so you get super-smooth animations, especially noticeable for slow-mo or speed-up effects

    We have used a public fork of the spine runtimes (see https://github.com/YoYoGames/spine-runtimes/tree/3.7-beta). We plan to use this repository going forward, so if you are interested in seeing which changes, we have had to make, or which changes/fixes we have taken from the original Esoteric repository, you can.
     
    kagamma likes this.
  2. BPOutlaws_Jeff

    BPOutlaws_Jeff Member

    Joined:
    Jul 26, 2016
    Posts:
    35
    Looks like us Spine users get ourselves a second Christmas! Thanks to the staff for giving Spine some love, the new features sound great.

    Quick question for per-slot blend modes: how does this work out in terms of vertex batches etc? Say I have a bunch of sprites for I don't know like a checkerboard, and every other square is its own bone and the blend mode down the list is like:

    square 1, 1 - normal
    square 1, 2 - additive
    square 1, 3 - normal
    square 1, 4 - additive
    ...etc

    1) Is that going to make the code go through the list of bones in their draw order running gpu_set_blendmode() over and over?

    2) For optimization would we want to make sure all the stuff at the top of our draw order in Spine uses additive so there's just one switch? Like:

    square 1, 4 - additive
    square 1, 2 - additive
    square 1, 3 - normal
    square 1, 1 - normal
    ...etc

    3) If I have a Spine sprite that just has one gpu_set_blendmode switch because I've followed question 2 above, and I have to draw 100 of them, if I do a with (obj_spinething) to draw them all at the same time (so it's just one texture page swap), would that still end up being 100 different gpu_set_blendmode switches (unless the entire spine sprite was additive blending of course)?

    Just curious, this will be a huge time saver that's worth a slowdown hit if I have to take it, just for the ease of not having to make separate skeletons with additive stuff on them to work around this limitation lol

    Thanks again for the hard work!
     
    rmanthorp likes this.
  3. JeffJ

    JeffJ Member

    Joined:
    Jun 20, 2016
    Posts:
    278
    First issue I've noticed is that the example snippet in the docs on how to make a Spine character's head aim at the mouse no longer seems to work:
    Code:
    var map = ds_map_create();
    skeleton_bone_state_get("head", map);
    var xx = ds_map_find_value(map, "worldX");
    var yy = ds_map_find_value(map, "worldY");
    var deltax = mouse_x - (x + xx);
    var deltay = mouse_y - (y + yy);
    var angle = -radtodeg(arctan2(deltay, deltax));
    ds_map_replace(map, "angle", angle);
    skeleton_bone_state_set("head", map);
    ds_map_destroy(map);

    It just does absolutely nothing. I wonder if maybe some of the internal values, such as worldX and worldY has changed names - tried a few different ones (like "x" and "X"), but to no avail.

    EDIT:

    My mistake! Turns out it was because the Spine sprite hadn't been updated. Works like a charm.
     
    Last edited: Jan 31, 2019
  4. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    186
    Hah, that's good to hear! ;)
     
    JeffJ likes this.
  5. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    186
    There is an updated beta release out now, so please update when you can - https://forum.yoyogames.com/index.php?threads/gms2-version-2-2-2-beta-release.58932/ for further info.

    It doesn't contain any specific fixes for Spine functionality, as (amazingly) none have been reported so far, but it does contain very important stability fixes to stop code editor crashes which might be impacting on your use of the beta version, so we would strongly advise you update.

    If you do have any Spine issues with this 2.2.2 update, let us know asap, please!
     
    rIKmAN and JeffJ like this.
  6. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,610
    I can't speak for anyone else, but I haven't been able to test much of the Spine stuff too in depth due to the crashing / freezing issues of the previous beta.
    You might get a few reports now that the new beta update is out which seems to have fixed things in that regard.

    Will test over the weekend, thanks for getting the update out so soon.
     
  7. BPOutlaws_Jeff

    BPOutlaws_Jeff Member

    Joined:
    Jul 26, 2016
    Posts:
    35
    Any advice from the YoYo staff on my questions above? Anyone using Spine for heavy duty art-heavy games is going to need to focus on optimization with Spine sprites requiring individual texture page swapping so I'd imagine other users will eventually ask the same questions when they get that far.

    I'm doing a lot of glow effects with my Spine sprites in a SHMUP that I've had to separately store bone x/y positions for and trigger spawning my own separate objects on an Additive layer because Additive Spine layers weren't supported before and it would be a lot faster to do that all in Spine but I want to make sure I've got the least blend_mode switches possible 'cause obviously with a SHMUP every bit of optimization counts lol



    Aside from that the only weirdness I've run into and I'm only mentioning it for anyone else who's coming from the last Full Release to this Beta like I just did: "worldX" and "worldY" must have been giving the wrong coordinates in the last Full Release because in that one I had to add the object's X to the Spine sprite bone's worldX to get the position right before, but after updating to this Beta I had to remove all those object X pluses and just use the worldX that skeleton_bone_state_get() returns...which is exactly what I would EXPECT to have to use, so that's great lol I didn't see "worldX" and "worldY" changing mentioned anywhere in the Release Notes so I'm guessing it happened in a much earlier Beta or something...I'm only mentioning it here because other Spine users lured into trying the beta for the Spine upgrades might run into this lol

    I was already exporting Spine sprites from the latest version of Spine even with the last Full Release of GMS2 and it was all working fine (I just don't use any of the fancy Spine effects) so I don't think it was anything to do with having to re-export JSONs with the newest Spine release but I have no idea and don't care enough to figure out why it was different, I have too much cool Spine stuff to get making now! :D

    About to test out slot blendmode stuff, if it isn't a big memory hog and I can finally do my Additive blending inside Spine instead of all this separate skeleton and tricky "spawn an Additive sprite when this Event triggers" juggling, I'm going to be one mighty happy camper lol

    Thanks for getting the update out!
     
  8. BPOutlaws_Jeff

    BPOutlaws_Jeff Member

    Joined:
    Jul 26, 2016
    Posts:
    35
    Sorry I must be totally misunderstanding what this means...I just set some Slots to Additive/Screen for some fx in my Spine file but they just come out drawn solid opaque when I draw the sprite in-game, just like before. What exactly DOES this line in the release notes mean??? lol
     
  9. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,298
    The blend mode stuff is possibly badly worded... it means the ability to set the colour and alpha on a slot, NOT the actual pixel blendmode. See skeleton_slot_colour_set() in the Beta manual.
     
  10. BPOutlaws_Jeff

    BPOutlaws_Jeff Member

    Joined:
    Jul 26, 2016
    Posts:
    35
    ohhhh...disregard my questions above then lol it should probably be reworded or the difference explained somewhere because GML using gpu_set_blendmode(bm_add) to do cool Additive glow effects combined with Spine's IDE calling the Additive/etc settings "Blending" is ripe for this type of confusion especially for a newbie lol

    Thanks for the quick reply! I couldn't figure out how it would even work tbh lol but at least I've got my workarounds for doing glowy stuff already figured out so it's all good
     
  11. FlameRooster

    FlameRooster Member

    Joined:
    Feb 14, 2017
    Posts:
    77
    Do all the Spine Pro features work? I know clipping was just supported. But Free-Form Deformation, Meshes, Weighted Meshes, IK Constraints, Transform Constraints, and Path Constraints? Are these supported?

    From this page, it seems like just weighted meshes and audio aren't supported. https://www.reddit.com/r/gamemaker/...an_spine_do_in_game_maker_studio_2_right_now/

    (Also, I don't know where else to ask this.)

    I am asking before I buy the Pro version. Thanks!
     
    Last edited: Feb 10, 2019 at 3:41 AM
  12. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    186
    After speaking with the dev who did the Spine update, I have the following answers (in his words, not mine):

    Okay, to answer BPOutlaws_Jeff questions first:

    A1) Yes.

    A2) Yeah, it won't set blend mode redundantly so attachments drawn one after another with the same texture and blend mode will be in the same batch. The basic idea is that each part of a Spine sprite is drawn in a specific order. In that order, if the blendmodes alternate: e.g. normal, additive, normal, additive, then it'll have to switch four times, whereas if the blendmodes are grouped together: e.g. additive, additive, normal, normal, then it'll only have to switch twice. However, if you draw 100 of these sprites then it won't draw the additive bits of all the sprites all together as it draws each sprite individually, so it'll have to change blendmode 200 times (twice for each sprite).

    A3) Unless every part of the Spine sprite uses the same blend mode then it'll have to switch for each one (to maintain the drawing order of the attachments) so you'll end up with 100s of blendmode switches. Basically each Spine sprite is drawn as a single thing (otherwise the sorting will potentially be wrong) so it'll switch blend modes for each one.

    Bonus answer) What Mark says isn't correct - it is actually the pixel blendmode. But in order to maintain the previous behaviour it's off by default and needs to be enabled. Probably the reason it isn't working is because you have to call "draw_enable_skeleton_blendmodes(true);" to enable it.


    To answer FlameRooster's question about supported features: I couldn't answer specifically for each feature, but since we've upgraded to the latest runtime we should support everything that does - apart from audio. We may not provide runtime (GML-level) control of all features, but anything setup in the Spine editor should work.
     
    rIKmAN and JeffJ like this.
  13. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    186
    So there you go - anything which contradicts the above, send us a sample project ;)
     
  14. JeffJ

    JeffJ Member

    Joined:
    Jun 20, 2016
    Posts:
    278
    Greatly appreciate the in depth reply in regards to how things are handled behind the curtain. If you guys haven't already, remember to include information like this in the docs - this is crucial to document for performance. It will also avoid dozens of topics asking these questions in the future.
     
    rIKmAN likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice