ChzBoi

  • 23 июл 2022
  • Регистрация: 28 авг 2018

    Hi! Very excited about this however, I am having issues with the examples. After getting the Git, when I try to load "spine-runtimes/spine-godot/example/project.godot" I get an error box with "Error loading: helloworld.tscn Load failed due to missing dependencies: [url=res://assets/spineboy/spineboy-data-res.tres]res://assets/spineboy/spineboy-data-res.tres[/url]".

    I can see that file in the FileSystem folders and if I choose "Fix Dependencies", I get the 'Dependencies For: helloworld.tscn" pop-up box with 2 entries: spineboy-helloworld.gd and spineboy-data-res.tres in the Resource section and [url=res://examples/01-helloworld/spineboy-helloworld.gd]res://examples/01-helloworld/spineboy-helloworld.gd[/url] and [url=res://assets/spineboy/spineboy-data-res.tres]res://assets/spineboy/spineboy-data-res.tres[/url] in the Path section.

    Not sure what to do next as the "Fix Broken" button remains grayed out.

    If I ignore the dependencies and press "Open Anyways", I get a "Load Errors" pop-up box with "Scene'res://assets/spineboy-data-res.tres has broken dependencies: [url=res://assets/spineboy/spineboy-pro.json::SpineSkeletonFileResource]res://assets/spineboy/spineboy-pro.json::SpineSkeletonFileResource[/url] [url=res://assets/spineboy/spineboy.atlas::SpineAtlasResource]res://assets/spineboy/spineboy.atlas::SpineAtlasResource[/url]"

    I'm probably missing something simple, but if anyone has an idea, I am open to suggestions! Thanks - ChzBoi

    EDIT - Found it...I was logged into the wrong machine with the old Godot build! Easy fix!

    @ davarrcal - that was it! Thank you for the reply and pointing me in the correct direction; much appreciated!

    @badlogic - that's it! I did as suggested: extended the SkeletonAnimation class, added a boolean, and start/stopped the character animation as required. The FPS then went up to acceptable levels on the target machine. ('mistergreen' over on the Starling forums also replied with the same suggestion and an example of some C# code!)

    As I mentioned on the Starling forum : Using a machine with a good processor and a GPU, the FPS issues with minimal. However my target machine has neither - so this is a great solution I can work around.

    Responding to your "FWIW" - management has requested a possible "100 to 150" characters on the screen animating at one time. It's my habit to always double their requests (because they will eventually do that!). For most of the time, a max of 25 to 50 characters would be the norm - but must plan for worst case.

    Again, thank you for your help/advice!

    Hi Nate - thanks for at least looking! I've not heard from Godot Q&A yet.
    (Might just have to wait for the official Spine runtime for Godot!)

    • Изменено

    I've complied the Godot source with the Spine runtime (https://github.com/GodotExplorer/spine) and it all works fine in the Godot IDE. I can press F5 and it will play my project just fine with my Spine character.

    However, when I export the project for "Windows Desktop (Runnable)" it will provide me with an '.exe' and '.pck' files, which when I run, will halt on errors. (show below - I've looked at these Godot code files, but most of this is beyond my knowledge.)

    Is there an issue with this Spine runtime when exporting to Windows Desktop in GODOT 3.0.6?

    I am thinking there may be an export template I am missing.(?)

    Any advice/help is most welcome!
    (I've also asked this at Godot.org as well)


    Launch Errors


    I get 25 of these errors in a row:

    ERROR: get_parent_class: Condition '!ti' is true. returned: StringName() at core/class_db.cpp:331

    Then I get:

    ERROR: No loader found for resource: res://_graphics/Character.json at core/io/resource_loader.cpp:186
    ERROR: poll: res://Character.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://_graphics/Character.json  at scene/resources/scene_format_text.cpp:439

    Followed by:

    ERROR: load: Condition 'err != OK' is true. returned: RES() at core/io/resource_loader.cpp:149
    ERROR: Failed loading resource: res://Character.tscn at core/io/resource_loader.cpp:186

    I doing some tests between game engines, I've been working on a test in AS3/Starling using the Starling runtime. On a stage of 1920x2160/FrameRate = 60, I've got 3 static graphics (1920 x 1080), a test button, and 2 Spine characters, which I place on the stage. One of the Spine characters I duplicate 288 times and place across the stage.

    I've have the std memory/gpu memory low and the draw calls down to 6. However, the FPS is not as good as it could be. I started out between 7 and 15 FPS. With some help of the fine folks over at the Starling forums, I've achieved up to the mid 20's.

    An excellent 'WiseOwl' over there mentioned "...in Unity I can disable the spine animator component. That stops the Update (AS3- OnEnterFrame).. I don't know if that's available in the AS3 spine runtime. That helps with the FPS quite a bit.".

    My question : is there something similar in the AS3/Starling runtime? If so, where would be a good place to look?

    UPDATE : I saw an old post http://esotericsoftware.com/forum/Starling-AS3-Performance-Question-8706 where BadLogic had opened an issue https://github.com/EsotericSoftware/spine-runtimes/issues/918 however BadLogic mentions

    Decided against this. It can be easily handled in user code without any downsides.

    This seems like my issue above, so may I ask what the user code is to handle this? All advice/help is much appreciated!

    • Изменено

    Morning badlogic - again, thanks for looking into this. I created the same project using Starling here https://www.dropbox.com/s/awlg5v1tu569hyf/STARLING_Speed_Stutter_TEST.zip?dl=0 which uses the exact same Spine json/atlas/etc. It is smoother so there much be a native AS3 setting I am missing.

    And again, if ya need me to test something, feel free to ask! 🙂

    Morning badlogic - good to know I am not losing my mind! Thanks for looking into this.

    If you need me to test anything, please feel free to ask. I've tested in FlashDevelop changing the

    tmpTE.timeScale

    value to extreme high and low values - it seems to interpolate abruptly regardless of that setting.

    Thanks badlogic for the info - I did make a few simple tests. Any slow animation has this issue, debug or release. My entire code is 45 lines long, which I have copied below.

    I am thinking this has gotta be a FlashDevelop publish setting I am missing.

    UPDATE : Tried this same code in the Animate IDE - still stutters.


    package
    {
       import spine.animation.TrackEntry;
       import flash.display.Sprite;
       import spine.flash.SkeletonAnimation;
    
       import spine.*;
       import spine.animation.AnimationStateData;
       import spine.atlas.Atlas;
       import spine.attachments.AtlasAttachmentLoader;
       import spine.flash.FlashTextureLoader;
    
       [SWF(width = "1000", height = "500", frameRate = "60", backgroundColor = "#dddddd")]
       public class Main extends Sprite {
          
    [Embed(source = "/AS3_Speed_Stutter_TEST.atlas", mimeType = "application/octet-stream")] static public const AS3_Speed_Stutter_TESTAtlas : Class; [Embed(source = "/AS3_Speed_Stutter_TEST.png")] static public const AS3_Speed_Stutter_TESTAtlasTexture : Class; [Embed(source = "/AS3_Speed_Stutter_TEST.json", mimeType = "application/octet-stream")] static public const AS3_Speed_Stutter_TESTJson : Class; private var SK_AS3_Speed_Stutter_TEST:SkeletonAnimation public function Main() { var Atlas_AS3_Speed_Stutter_TEST : Atlas = new Atlas(new AS3_Speed_Stutter_TESTAtlas(), new FlashTextureLoader(new AS3_Speed_Stutter_TESTAtlasTexture())); var JSON_AS3_Speed_Stutter_TEST : SkeletonJson = new SkeletonJson(new AtlasAttachmentLoader(Atlas_AS3_Speed_Stutter_TEST)); JSON_AS3_Speed_Stutter_TEST.scale = 1; var SkeletonData_:SkeletonData = JSON_AS3_Speed_Stutter_TEST.readSkeletonData(new AS3_Speed_Stutter_TESTJson()); var StateData_AS3_Speed_Stutter_TEST : AnimationStateData = new AnimationStateData(SkeletonData_); SK_AS3_Speed_Stutter_TEST = new SkeletonAnimation(SkeletonData_, StateData_AS3_Speed_Stutter_TEST); SK_AS3_Speed_Stutter_TEST.x = 500; SK_AS3_Speed_Stutter_TEST.y = 225; var tmpTE:TrackEntry; tmpTE = SK_AS3_Speed_Stutter_TEST.state.setAnimationByName(0, "IDLE1", true); addChild(SK_AS3_Speed_Stutter_TEST); } } }

    Hi badlogic - correct, just plain old AS3. My understanding is that there are only 2 AS3 Runtimes : normal and Starling. I've been using the Starling without issues, but this current project needs to be done in normal AS3.

    I've double checked all I can think of, yet, the slow (15 sec idle animation) stutters, jerks, lags when I call for the animation to play:

    var tmpTE:TrackEntry = SK_VTop_Fauna.state.setAnimationByName(0, "IDLE1", true);

    I've also set the quick animations (2 seconds or less) with

    tmpTE.timeScale

    value set to some small value - they also will do the stutter/jerky movement.

    Very perplexing. :wonder:

    • Изменено

    I am having an issue with very jerky animations once it is published. I am using Flash Develop for a non-Starling target.

    When I publish, the resulting .swf plays all the slow animations with jerky movement, as if it is missing frames or it's trying to catch-up.

    However, when publish my Starling files, it works fine. I must have a setting I am missing on the Spine EXPORT or something.

    Any help is much appreciated! ChzBoi

    Thanks again Nate - totally missed that paragraph! Playing with Preview now - very cool!!
    (now, add easing formulas to the graph and I'll be good!) :p

    Just to clarify (as I swear I read that you can not have 2 'setAnimationByName' back to back, as the second removes the first) - as long as the TrackIndex of the setAnimation calls are different, it's all good to play at the same time. Most excellent!

    If so, any conflicts between bone/slot animations would be resolved how? The threshold value?

    Much thanks Nate!

    (Apologies if this is explained in a tutorial - I swear I went through them all!)

    Hi Nate - as a novice Spinerator, I may be missing a fundamental here.

    Ok, in AS3 - I load my json,atlas, and png. Then set up my SkeletonAnimation, SkeletonData, and AnimationStateData. After all this is done, I set the state:

    MySkeletonAnimation.state.setAnimationByName(0, "Animation1", true);

    In that animation is both the blink and the whip.

    What I've been doing (correct me if I am wrong!) is when I change animations, I set up a temp TrackEntry var and set the
    state, timeScale, eventThreshold, etc. :

    var tmpTE:TrackEntry;
    tmpTE = MySkeletonAnimation.state.setAnimationByName(0, "Animation2", false);
    tmpTE.timeScale = 1.5;
    tmpTE.eventThreshold = 1;
    tmpTE = MySkeletonAnimation.state.addAnimationByName(0, "Animation1", true, 1);
    tmpTE.timeScale = 1;
    tmpTE.eventThreshold = .75;
    

    Are you saying I should make an animation named "Blink" and another named "Whip". The "Blink" will be a looping 2 second animation of the whole skeleton, but only the 'eye' bone/slot animates. Then in the "Whip" it will be 10 seconds long, of the whole skeleton but only the 'whipping' action bones/slots are animated. And then play them at the same time. Is this correct? Something like this:

    var tmpTE:TrackEntry;
    tmpTE = MySkeletonAnimation.state.setAnimationByName(0, "Blink", false);
    tmpTE.timeScale = 1;
    tmpTE = MySkeletonAnimation.state.setAnimationByName(1, "Whip", false);
    tmpTE.timeScale = .5;
    

    I feel like I must have totally skipped something in the tutorials vids! :-)

    • Изменено

    Hello SpineFolk - Question : is there a way to force certain animation bones/changes to stay at a constant speed while
    others can be adjusted via code?

    Example 1: say I have an animation of a person who is blinking and swinging a whip around their head. All looks good
    but now it has been decided that the whip swinging goes too slow at one spot of a game and too fast in another. In
    code I change the speed, but now the eye blinks happen too slow/too fast.

    Example #2: say I have an animated logo made up with a sign marque which has a border of 80 flashing lights. The sign
    flies around the screen and zooms in/out. Now I need to change the speed on the fly but doing so changes the flashing
    speed of the lights - which are timed to a musical beat.

    Example #3: say I have the RoadRunner running down the road. The leg animation is just a quick spinning blur effect while
    the head and neck animations gently move back and forth. Changing the playback speed to make the leg animation look correct makes the rest of the animations look wrong.

    Thanks - ChzBoi