Beta: Spriter Object Extension

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi all,

    I have edited this post to keep all up-to-date binaries and info on this first page.

    Compatibility

    Only Clickteam Fusion 2.5

    Platform

    Windows (implemented)
    Android (in development, planned for 2017)

    Description

    For those who are wondering what is the Spriter Object, this extension aims to have an alternative to the active object where animations are edited in an external tool called Spriter and procedurally rendered in CF2.5.
    It has many advantages: light weighted object, fluid animation, advanced animation features and reusability of the same object. In order to have a good idea of what is behind, I suggest you to take a look on the Spriter website: Please login to see this link.

    Please login to see this link.

    Please login to see this link.Download Link
    Please login to see this link.

    Version v1.3 Features

    The Spriter object for CF2.5 should include the following:
    1) Standard ACEs like for the Active Object
    2) Actions:

    • Entity: Change Entity by name, Change Entity by number
    • Animation: Stop Animation, Start Animation, Change Animation by name, Change Animation by name with blending, Chane Animation Time, Change Animation Time, Change horizontal flipping, Set speed ratio, Change key frame, Jump to next key frame, Jump to previous key frame
    • Character Map: Apply Character Map, Remove Character Map, Remove All Character Maps
    • Sprites: Load 1 Sprite from Active, Load Ordered Sprites from active per animation, Load Ordered Sprites from active per direction, Load Sprites from external source, Set external source path
    • Boxes: Bound Box to Object, Unbound Box from Object
    • Debug: set debug display
    • File: Load Scml file
    • Clear Last Error


    3) Expressions:

    • Entity: Current entity name
    • Scale / Angle: Scale, Angle
    • Last Error
    • Animation: Current Time, Current Speed Ratio, Current Animation Name, Delta Time, Current Key Frame
    • Variable: Real Value, Object Real Value, Integer Value, Object Integer Value, String Value, Object String Value
    • Point: Position X, Position Y, Angle


    4) Conditions

    • Animation: Is animation playing (by name)?, Has animation finished?, Is tag active?, Is object tag active?, Is animation flipped?, Compare current key frame to value?
    • Events: On Sound Event, On Trigger Event

    Change Log

    Version 1.3:
    ADDED: added support of effects (transparency, shaders, RGB)

    Version 1.2:
    FIXED: fixed bug with Change Entity action (per id or per name)
    FIXED: fixed property to get angle of a point
    FIXED: fixed reload crash at editime if selecting


    Version 1.1:
    ADDED: added expression and condition for the current key frame
    FIXED: fixed bug with Change Entity action

    Version 1.0:
    ADDED: added the actions to load external files (instead of active object)
    FIXED: fixed a bug with easing curve
    ADDED: added the "Follow the Frame" option at edit time


    Design/Architecture

    Loading Sprites:
    There are 2 ways to load sprites, one with an active object used as a library and one with external files.
    In order to load from an active object, use the following actions: Load 1 Sprite from Active, Load Ordered Sprites from active per animation, Load Ordered Sprites from active per direction. The first one is for one single sprite. The 2 other ones load all sprites, respectively from one animation and one direction or from one animation and several directions (in this case, one direction stands for one subfolder of the Spriter structure).

    Help/Examples

    Example: a basic example with most of the essential functions is provided with the extension files (see Download Link)

    For any Questions related to Spriter itself, please post on the dedicated forum on their website.

    Old versions

    Version 0.5: Please login to see this link.Version 0.6: Please login to see this link.
    Version 0.7: Please login to see this link.
    Version 0.8: Please login to see this link.
    Version 0.9: Please login to see this link.Version 1.0: Please login to see this link.Version 1.1: Please login to see this link.
    Version 1.2: Please login to see this link.Please login to see this link.

    Please login to see this link.

    Please login to see this link.

    Please login to see this link.

    Please login to see this link.

    Damien

    Edited 7 times, last by conceptgame: Version 1.2 (May 20, 2017 at 8:19 AM).

  • I already saw 2 bugs:
    - The condition "Is animation X playing?" will start the corresponding animation. It is fixed in v0.6.
    - At the end of some looping animation, the sprites are going through a strange angular position. I will fix this in v0.6.

    EDIT:

    and a small video of current status:

    Please login to see this link.

    Damien

    Edited 2 times, last by conceptgame (April 13, 2015 at 3:39 PM).

  • Hi again conceptgame. How do we manually import the required images so the Spriter object will work properly in game and show the animations?

    I installed the plug in, have in in my frame, and told it to set to the proper entity and animation at the start of frame, and I set its file path to the scml file. Nothing is showing up when I run the frame.. I assume because it needs the images. Are there instructions somewhere for doing this?

    Thanks,
    Mike at BrashMonkey

  • At the moment, the mfa should be in the same folder as the scml since the relative path written in scml are directly taken into account. I will add a "Set relative path" action to allow to change the folder structure above sprite folders. For example, if you have arms/left_arm.png, the extension is looking in its folder if it exists. With the relative path action, you can set something like sprites/hero and it will look for sprites/hero/arms/left_arm.png

    Damien

  • Brilliant Brilliant stuff concept game. Its working perfectly now that I saved the MFA into the same folder as the scml file.

    EVERYONE, Don't forget there's a totally free version of Spriter (not trial-ware and not severely crippled) that you can get from Please login to see this link.

    Also, Please notice that even if you don't want to create modular animations with cut up images and bones, This plug-in and Spriter solve the ancient problem of Fusion not allowing us to flip a character at run=time! Just set up your right facing animations in Spriter and use this Spriter object to flip your character at run-time while facing to the left! (or vice versa)

    really exciting stuff. I look forward to using this in several of my own personal projects. Thanks again conceptgame.

    PS. I see the standard collision and overlapping conditions exist, but assume they don't work. is that the case, or does it work for full frame collision detection? (a assume that support for Spriter's built in collision rectangles feature is not implemented at this time...)

    cheers,
    Mike at BrashMonkey

    EDIT: I just tested and "overlap" and "on collision" DO work for full frame collisions! (tested between Spriter object and standard active object) Awesome stuff indeed.

  • Good Job i will downloaded when i get home. Good job both to concept game and Brashmonkey.

    The soul of the sluggard craves and gets nothing, while the soul of the diligent is richly supplied -Pro 13:4

  • Neat! I made a simple test animation with Spriter and it seems to display correctly. However, this only works with Direct3D 9 enabled (the software runtime doesn't display anything), but I only get 12 fps for that. Any idea what's going on?

    Please login to see this link.

  • This is something one of my projects needs. Thank you for making it!

    I tried using the grey guy example file and it works just fine but I encountered a problem while trying to scroll the screen. When the spriter object is set to always be at the position of another object, it only works until the screen scrolls. The farther the screen has scrolled, the farther away the sprite is from the object. It can be fixed by setting the X position to (X pos of target object - X Left Frame) and the y position to (Y pos of target object - Y Top Frame), but this only works for a while. When I scroll too far, the spriter object disappears. Is there a way to get the extension's position to behave like an active object following the frame?

    Edited once, last by electroNik: I mixed up x and y somewhere in there. (April 14, 2015 at 4:16 AM).

  • Looki: oh yes I forgot to say that it is only HWA. I do not know if it is worth the effort implementing the Software mode. Do you see any reason to get it compatible with software mode? In any case I will release it opensource so you will be able to add this like in Surface Object if you want.
    Regarding the 12fps, I am surprised. Can you send me the example file? I will see if it is configuration dependent.

    Damien

  • Looki: oh yes I forgot to say that it is only HWA. I do not know if it is worth the effort implementing the Software mode. Do you see any reason to get it compatible with software mode? In any case I will release it opensource so you will be able to add this like in Surface Object if you want.
    Regarding the 12fps, I am surprised. Can you send me the example file? I will see if it is configuration dependent.


    Oh no, not really. All those textures being rotated at runtime etc., that wouldn't work well in software mode. That said, I don't think it would be very difficult to add support for that, assuming you use the CSurface API.

    I figured out the source of the slowdown: For testing, I chose the first picture that I could find, which was a wallpaper, i.e. 1920x1200. I scaled it down within the program. However, this definitely should not slow down the program that much, since the GPU can easily scale a texture. If you want, I can take a look at your code to find the source of the error since I have made a couple of HWA extensions before (It's unfortunately not well documented and all my knowledge comes from private conversations with Yves :pacman: )

    Please login to see this link.

  • Thanks everyone!

    Looki: ok, I understand better now. I think the main problem is that I minimize a clone of each texture to get the minimal rectangle without transparency. This is to get the whole rectangle of the object. It means that I make the following for each texture: 1x Clone, 1x Minimize, 1x BlitEx. Not optimized but it works for a first step. I think I can spare ressources on the 2 first steps.

    I would be glad if you can take a look and tell me what you think about the rendering (or everything else). I will sent you a link in a PM once I have time. Most of the knowledge I got about cSurface is through Yves, the Surface extension and some of Anders extension. It seems that it is going back full circle.

    Damien

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!