Spriter/C2 - (9-16-2019 - bug fix)

From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • After the amazing job you did with the scml objects pausing off screen i have to ask for one more performance optimization.

    I just noticed that every time i add another instance of the same scml object it adds to the Layout object count all the png's that it already has from the first one.

    What i mean:

    Lets say i have one coin and i has 10 png's inside the scml object for it to tween.

    Every time i add another coin the system adds another 10 png's to the layout object count!

    so if i have 100 coins in my level i have 1000 objects out of nowhere and it is killing performance on weaker machines.

    imagine now what happens when i add many more complex scml animations that have up to 40 png's each and try to make some instances from them.

    Since spriter uses one set of images for all animations why does the plugin has to add them again and again for every new instance?

    i find this tremendously inefficient and it defies the whole purpose of tilemaps since whatever we gain from there we loose it here.

    Before ashley figured out a way to make seamless tiles i had to use sprites as tilemaps and for a 25000x5000 pixels layout i couldn't stay below 3000 objects.

    On pc not a biggie(with an i3 and above that is).

    But on mobile? forget about it!

    With the new tilemap i rebuild my level and i dropped down to 400 objects.

    Now imagine my shock when after adding just a few scml instances i saw that number skyrocket again.

    Of course i may be doing something wrong so any advice would be welcome.

    I have faith in you lucid!

    please find the solution!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Roccinio

    I asked for this one before. That Spriter should try to use less Sprite objects by using frames and Sprite.Animations.

    That way you can have 1 single Sprite. How this would work is by

    Sprite.Animation would be the an object in the Spriter software.

    And the Character Map can continue to Frames.

    Right now my character mapped Spriter animations don't make use of Sprite.Animations. So it's a waste to creating so many parts when just putting the parts into a Sprite.Animation would be soooooo much more effecient.

    Otherwise it's a few pages back. but the current model of handling Sprite object is a mobile killer. And not just for weaker devices. But also any game that want use Spriter as a major component for most animations of anykind of robustly animated game.

    It's ok for a few sprites, but not as your suggestion. And it's unfortunate because the Coin example is in the default sample pack. Wher the idea of using Sprites for all animated objects is the idea of getting Spriter to do a lot of grunt gaming work.

    Anyways. This change would probably be a large change for both Lucid and Ashley. But personally I think it needs to be a mandatory change. And Rocc you have a good point why. But it's certainly not just for weaker devices.

  • jayderyu

    I am on the same boat with you.

    My biggest surprise when i entered the gaming creation process was the way software devs create new and amazing features without pausing for a minute and think about the future of these features and how they will work and perform when users start to use them extensively and on a larger scale.

    when i first started using spriter and saw all that quality and amazing tweening in game i was literally blown away.

    But here comes the sad part.

    As i improved my skills and my project started to become a real game i started to stumble across huge setbacks that i thought they wouldn't exist.

    Of course i am not naive to think that anything that has to do with technology is easy and especially creating games but not in a million years i could have guessed that i would spend almost 3 months conducting experiments ,destroying and rebuilding my game because the tilemap object had seams.

    I thought that if it is build inside the software ,then it should work!

    now i have the same problem with spriter.

    up until yesterday i hadn't noticed that the spriter plugin adds objects for every scml instance.

    if this is something that can be fixed ,not a problem.

    if not then my whole planning and months of hard work go down the drain.

    and this is exactly my point.

    I love new features .who wouldn't want to see C2 have 3d volumetricparticlelightningtressfx(lol) and spriter support for 3d max?

    But i don't want these, until basic game breaking stuff are working as intended.

    I am not complaining since both ashley and lucid rock!

    they are pioneers on their field and work hard to give us what we want but sometimes i feel that there is no planning ahead.

    I don't mind to be a beta tester (since that's what we are) since this is cutting edge tech the way it is implemented and with our contribution things move forward ,but sometimes i become frustrated when

    i encounter problems where in my mind there shouldn't exist.

    Love you all,just had to take these things out of my chest

  • I'm having a problem where the pixel art mode spriter file works fine on Node Webkit but there is some weird resampling and resizing on CocoonJS

    Edit: Nvm seems to be a more general problem after updating C2 to 170 the preview works fine but the actual exported things are broken.

  • Roccinio

    jayderyu

    The reason we chose to go with separate objects is so you could call events and actions on individual body parts. You can change opacity or add shaders to any object. You could make a giant boss who has 'solid' behavior platforms for arms you can run on top of as it moves and rearranges the 'level'.

    For small items like coins if they're becoming an issue on mobile, you can use Spriter to bake out to individual pngs a smooth number of frames to the desired size. For small coins, a smooth number of frames shouldn't be too costly, and you can use the Spriter animations specifically for characters and other larger animations.

    Also, just to clarify Roccinio, it makes a C2 object for each Spriter object, not each png. So if your arm sprite swaps between 20 pngs in Spriter, it will still only create one arm sprite for each instance in C2.

    In any case, I'll see what else I can do to optimize, and thanks for the feedback.

  • Thank you for taking the time to answer all of our questions.

    For me this situation is a very rare case of raising the bar so high that you fall victim of your own success!

    Once i've seen the quality of my animations running real time by using your plugin i just cant go back to PNG'S!

    For my coins to even remotely show that same silky smooth animation using png's i need to export about 160 of them.

    you have spoiled us so bad that for me personally i just cant go back!

    So take this as a huge compliment : once you go Spriter you never go back

    The idea of using separate objects is really smart and i use it for my main character to block or to attack.

    But on the same time adding so many objects if you only want to use scml files is troubling since there are quite few systems... that cannot handle the extra object load ,

    and as i explained earlier you lose so much quality using the traditional system that it is just heart breaking to see this happening.

    Is there a possibility to create 2 versions of scml files on import?

    one to include all the bells and whistles and one that just tweens and you only have control over its animations without it having the object overhead?

    Just an idea.i don't know if it makes any sense but i had to try!

    cheers

  • ludic

    That is a good idea and glad that was thought of. As a possible thought solution might you consider.

    Instance variable the C2Sprite with SpriterName which values to the SpriterObjectName. That way we can use

    Compare Instance Variable = SpriterObjectName.

    Then that way we can still independently move the parts while still getting some nice benefits of fewer individual Spriter/SpriteObjects.

  • Roccinio

    jayderyu

    The reason we chose to go with separate objects is so you could call events and actions on individual body parts. You can change opacity or add shaders to any object. You could make a giant boss who has 'solid' behavior platforms for arms you can run on top of as it moves and rearranges the 'level'.

    For small items like coins if they're becoming an issue on mobile, you can use Spriter to bake out to individual pngs a smooth number of frames to the desired size. For small coins, a smooth number of frames shouldn't be too costly, and you can use the Spriter animations specifically for characters and other larger animations.

    Also, just to clarify Roccinio, it makes a C2 object for each Spriter object, not each png. So if your arm sprite swaps between 20 pngs in Spriter, it will still only create one arm sprite for each instance in C2.

    In any case, I'll see what else I can do to optimize, and thanks for the feedback.

    the smcl demo2 zip not woring walking for me (just moving and no animation ) ??

  • Can't use plugin. When I want to test my layout, I see error.

    I use example of grey guy from head-message of this thread.

    browser internet explorer 11. In firefox I see the same problem.

  • n06rin , please make sure you're using the latest version of the plugin.

    istavang , where is this demo linked from? Also, if you're not already, please make sure you're using the latest version (beta) of c2 and the plugin.

    Roccinio and jayderyu . I thought of a way we can have the best of both worlds without Ashley having to change the importer. I understand both of you are using scml/c2 in current projects, so I want to preface this by saying I don't have any ETA on this as there's quite a bit on my plate at the moment, but it's definitely doable.

    I won't go into details until they're relevant and I have something for you to test, but basically there could be another 'Advanced' action, and it would make the plugin go into a drawing mode where it stops creating and moving instances, and the importer would use an alternate type of save that would pack all images into a single sprite, and then all of the scml instances could get the necessary images from that sprite's type, or a single instance of that sprite if needed.

  • lucid

    Sounds really interesting. Almost like some form of image library. Looking forward to seeing. You have been doing an amazing job on the project.

  • n06rin , please make sure you're using the latest version of the plugin.

    istavang , where is this demo linked from? Also, if you're not already, please make sure you're using the latest version (beta) of c2 and the plugin.

    Roccinio and jayderyu . I thought of a way we can have the best of both worlds without Ashley having to change the importer. I understand both of you are using scml/c2 in current projects, so I want to preface this by saying I don't have any ETA on this as there's quite a bit on my plate at the moment, but it's definitely doable.

    I won't go into details until they're relevant and I have something for you to test, but basically there could be another 'Advanced' action, and it would make the plugin go into a drawing mode where it stops creating and moving instances, and the importer would use an alternate type of save that would pack all images into a single sprite, and then all of the scml instances could get the necessary images from that sprite's type, or a single instance of that sprite if needed.

    downloaded from c2 tut and have the latest plugin , cool if u name plugin update version somehow

    i got it working animating , but not with your capx code , I dont know ? i just noticed it when running it.

  • thanks

    and thanks istavang - we forgot to update the tut capx with the new save information. Will fix that soon.

  • plugin changelog 6/4/14

    • Fixed a bug where setting the animation every tick to the current time ratio would cause the animation to pause while the Set Animation actions were active.
    • By popular demand - added 'version.txt' file which contains plugin version release date.
  • i am trying to disable collisions for some or for all png's that are included on each scml instance with no success.

    Even if i say "pick arm UID 100------ arm set collisions disabled " in the debugger the collision is still activated.

    is this a "bug" or i am doing something wrong?

    with the exception of my main character that i need some body parts collisions , i have made all the rest in game collisions to interact with the "dummy" background box of the scml characters.

    The scml animations are just eye candy so there is no need for me to have the png's collisions enabled but i cant seem to find a way to disable them.

    any suggestions?

    p.s i have tried with family's,on created,on initialized etc nothing seems to work.

    Now i have the object overhead with every instance AND collisions enabled for all those extra objects!

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