Jump to content

several doubts about SCML specification


Dredok

Recommended Posts

I'm implementing a c++ importer for my engine, have had a modest success but found several issues.

For example, there are some animations from "AdveturePack" "Goblin_enemy.scml" which I can not play correctly and have weird things inside like "abs_x", "abs_y", "abs_pivot... etc.

Of course I can figure what they could mean, but I have no found any reference in documentation :

http://www.brashmonkeygames.com/spriter ... atspec.pdf

http://www.brashmonkeygames.com/spriter ... cation.pdf

http://www.brashmonkey.com/ScmlDocs/ScmlReference.html

I have also an issue with the curve_type="instant". Sometimes I have found this tag in Mainline... shouldn't they be in Timeline ? at least is what I did understand from reading the doc above.

help please :(

Link to comment
Share on other sites

Hello Dredok.

abs_x, etc is additional information Spriter can record for game engines that have a separate level editor, like GameMaker or Construct 2. Some of these level editors are written in a separate scripting language and it's useful to be able to assemble a still frame of the character without having to program in the entire Spriter format. These abs_ values give you the sprite positions for the first frame of each animation as if they had no bone data. If you do not need or want this data, you can safely ignore it, and ensuring you don't have those options selected in File|Other File Actions...|Custom Save Options...

If you don't have these options set, it will resave without that additional data.

Finally curveTypes can apply to mainline keys if you want to have a curve apply to all individual timelines below that mainline key.

I'll explain how to do it in broad high level terms, and if you need more specifics, I can provide a code example:

normally you take two timeline keys and find the t value between them according to the time in the animation

t=reverseLinear(timelineKeyA.time, timelineKeyB.time, timeInAnimation)

then you interpolate values using that t value

currentX=linear(timelineKeyA.x,timelineKeyB.x,t)

the way that mainline key curves work is that you first transform the current time before passing it on.

For instance if the mainline key had an cubic curve

t=reverseLinear(mainKeyA.time, mainKeyB.time, timeInAnimation);

transformedTime=cubic(mainKeyA.time,mainKeyB.time,t);

and now when you calculate the timeline keys below, use the transformed time to find t:

t=reverseLinear(timelineKeyA.time, timelineKeyB.time, transformedTime)

in the case of instant

transformedTime=mainKeyA.time

then you find t using that.

If none of that makes sense I can provide code, or if you prefer to share your code, I can look through it and show an example of how to use the mainKey information.

On an important side note, we know the current documentation is lacking, and we are currently working on very thorough and up to date developer documentation, in an easier to follow format.

Link to comment
Share on other sites

  • 7 months later...

I'm implementing a c++ importer for my engine, have had a modest success but found several issues.

For example, there are some animations from "AdveturePack" "Goblin_enemy.scml" which I can not play correctly and have weird things inside like "abs_x", "abs_y", "abs_pivot... etc.

Of course I can figure what they could mean, but I have no found any reference in documentation :

{C}http://www.brashmonkeygames.com/spriter ... atspec.pdf{C}

{C}http://www.brashmonkeygames.com/spriter ... cation.pdf{C}

{C}http://www.brashmonkey.com/ScmlDocs/ScmlReference.html{C}

I have also an issue with the curve_type="instant". Sometimes I have found this tag in Mainline... shouldn't they be in Timeline ? at least is what I did understand from reading the doc above.

help please :(

That top link is down ( http://www.brashmonkeygames.com/spriter/8-17-2012/compactformatspec.pdf). It generates a http 404 error , page not found.

Link to comment
Share on other sites

Hi Bioz,

 

That link was for a very old and now obsolete  implementation, the document would just be misleading and cause confusion. 

 

If you have any specific questions that the other links or other open source implementations cant answer feel free to contact Edgar by emailing him directly at lucid@brashmonkey.com

 

cheers,
Mike@brashmonkey.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...