mythgarr Posted January 17, 2014 Report Share Posted January 17, 2014 Unfortunately the SCML documentation is still not finished. I have a few questions about the current implementation and spec: * Since transient objects and bones are no longer part of the standard, can the mainline be ignored entirely when importing the data? It looks like the mainline simply serves as a quick key-by-key reference of the latest key for each object - information that is duplicated in the individual timelines. Is that correct? EDIT: I realized after posting that parenting information is stored in the mainline - NOT the timeline. * There are some undocumented fields in mainline object_ref objects. I'm looking at the platformer pack in player.scml and seeing name, file, folder, abs_x, abs_y, abs_pivot_x, abs_pivot_y, abs_angle, abs_scale_x, abs_scale_y and abs_a. It looks like these might be override settings for the base object data? What does abs_* mean? * Is there a list somewhere of what SCML features are currently implemented, what version of Spriter implemented various features or something along those lines? I'm working from http://www.brashmonkeygames.com/spriter ... cation.pdf and the current source code right now. I'm sure I'll think of more as I work on this. I'm hesitant to use any of the existing implementations as a reference point since it's difficult to tell what version of Spriter they were written against, and consequently how relevant they currently are. Quote Link to comment Share on other sites More sharing options...
Domenic Posted January 17, 2014 Report Share Posted January 17, 2014 I believe they are maintaining the SCML documentation at this url now: http://www.brashmonkey.com/ScmlDocs/ScmlReference.html Quote Link to comment Share on other sites More sharing options...
lucid Posted January 17, 2014 Report Share Posted January 17, 2014 * Since transient objects and bones are no longer part of the standard, can the mainline be ignored entirely when importing the data? It looks like the mainline simply serves as a quick key-by-key reference of the latest key for each object - information that is duplicated in the individual timelines. Is that correct? EDIT: I realized after posting that parenting information is stored in the mainline - NOT the timeline. Hello mythgarr. I will be updating the documentation comprehensively after 1.0, but we're running a bit behind schedule. You are correct about the mainline storing the hierarchy, but it also stored the draw(z) order for the objects. Lastly, it also directs you to the key, without having to search through each timeline to find the current time. * There are some undocumented fields in mainline object_ref objects. I'm looking at the platformer pack in player.scml and seeing name, file, folder, abs_x, abs_y, abs_pivot_x, abs_pivot_y, abs_angle, abs_scale_x, abs_scale_y and abs_a. It looks like these might be override settings for the base object data? What does abs_* mean?In the latest version, these abs_ values are optional to the save, and you set that in File/Save Options. This data is available as an option so authoring tools that have separate code for a level or layout editor, than the runtime game code. These systems won't have to have an entire bone system, etc. The absolute values here are how to display the first frame of each animation without using bones. * Is there a list somewhere of what SCML features are currently implemented, what version of Spriter implemented various features or something along those lines? I'm working from http://www.brashmonkeygames.com/spriter ... cation.pdf and the current source code right now.This will be updated with deeper explanations of why each thing works the way it does, and to support the latest features, but Domenic is right, this is the newer version of the documentation. It hasn't been updated with the latest pro features. Feel free to ask specific questions about how something is implemented though in the meantime.cheers. Quote Link to comment Share on other sites More sharing options...
mythgarr Posted January 18, 2014 Author Report Share Posted January 18, 2014 Thanks, lucid! I was having a tough time figuring out which source was most current. Only one question for now - what do the scale_x and scale_y properties mean on a bone? Treating it as a traditional hierarchy where the scale is multiplied down causes some serious problems - looks like this is expected to be 1? EDIT: I think I figured it out - it DOES multiply down the hierarchy, but the scale is only applied on the leaf node objects. This makes sense - otherwise a rotated child scaled in the x direction would be squished into a diamond shape instead of a smaller rectangle. Quote Link to comment Share on other sites More sharing options...
mythgarr Posted January 23, 2014 Author Report Share Posted January 23, 2014 Are folder and file IDs guaranteed to be in consecutive order starting at 0? It would greatly simplify my life if the id was a simple index into an array rather than a full dictionary. And on a similar note, is there a better way to determine which files are part of the animation and which are part of a character map than looping through animations, then timelines, then sprite keys? Quote Link to comment Share on other sites More sharing options...
lucid Posted January 24, 2014 Report Share Posted January 24, 2014 @mythgarr yes, the folders and files (for scml/scon generated by Spriter) will always be consecutive. To your second question. Right now there is no simple way to determine, but that's something I can definitely add in a future build as an option for the save. There are already an option or two for saves that are based on specific requests like this. Quote Link to comment Share on other sites More sharing options...
mythgarr Posted January 25, 2014 Author Report Share Posted January 25, 2014 I can definitely add in a future build as an option for the save. There are already an option or two for saves that are based on specific requests like this. It wouldn't be terribly helpful in this case, since I'll still have to allow for those SCML files that weren't exported with that option. It's not a big deal - I was able to just crawl all animations after parsing in order to determine which are used. I'm trying to provide a reasonably straightforward way (in Unity) to allow remapping sprites as needed. I've got the importer functioning reasonably well but I'm running into some issues with how I was intending to swap sprites - I'll let you know as I run into more issues! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.