Jump to content

Which API has a complete Spriter implementation?


terinfire

Recommended Posts

Hey folks,

I was planning on writing a C# Spriter implementation, since it seems like there aren't any (aside from a Unity one -- which I may look at). If there are, please direct me so I don't waste my time.

Are there any good, complete API's that have been built already in another language? I've seen a number of incomplete/antiquated ones. I'd prefer if there is a more C#-like language (so Java, C++, etc), but I'm partial to anything. That being said, is there a good implementation out there? I'm considering using Trixt0r's Java version, since it looks used the most, but I wasn't sure if someone else had something that was bug-free, etc. I think it'd be easier to read the logic and implement, rather than attempt to guess the logic/rules.

I think it'd be easier to implement a library based on someone else's code where the logic is complete, rather than try to implement missing features in another. I was hoping to make this mostly platform independent and provide another way to spawn references to animation -- I don't like the idea of pushing a character THROUGH an animation -- but it makes sense to have some kind of factory to create an instance of an animation, or have a lightweight object that someone can hold within a class, which holds a reference to the real animation and can update itself according to that.

Any help is appreciated!

Link to comment
Share on other sites

Hi terinfire,

Yes you could use my Java implementation. With the last major update I managed to remove many bugs and the library works quite well now.

It is almost feature complete, the missings things are:

  • Meta-Data support (which is quite buggy in Spriter itself)
  • Skins, which are object to change and not very stable

.

You could either use IKVM, which will just run the Java bytecode in .NET, as I said in another post, or use sharpen, which converts Java to C# as good as possible (I tried it myself and it works quite well).

If you give me some more time, I will add documentation to the library and it will be easier to understand what is actually goiing on.

- Trixt0r

Link to comment
Share on other sites

I have written a C# Spriter implementation that has direct integration into the FlatRedBall engine:

http://kainazzzo.github.io/flatredball-spriter/

It is currently missing Character Maps, Sound Effects, and only works with Linear Interpolation. I am driven by demand for these features from the community, and so far, the people using it are still learning Spriter. They haven't quite gotten to the point of needing the more advanced stuff, but I do plan on adding it.

Link to comment
Share on other sites

I was hoping to have something that was actually portable, though. It looks like everyone has written something that is bound to a specific technology -- I literally just want something that loads the data and has the correct schema in the format of classes (and that is broken out clearly). I think that it would be something that could ideally be used to subclass from and provide your more specific instances, i.e. derive from it and then override virtual OnPaint() and that kind of thing.

Thoughts?

Link to comment
Share on other sites

that could ideally be used to subclass from and provide your more specific instances, i.e. derive from it and then override virtual OnPaint() and that kind of thing.

That is actually that what the generic Java library does. It is not bound to any game engine or framework. It is plain Java and has no dependencies.

I don't see the problem of using my library with IKVM. If you want to keep things platform independent, you will use Mono, right? So you will have the IKVM anyway.

If you do not wan to use IKVM, you could use Sharpen. I already did one port from plaint Java to plaint C# (which is unfortunatley outdated now) and it was really easy (look at my signature).

Anyway, I would say with IKVM you wouldn't even have to write any code, except the engine specific implementations for a drawer and a loader.

I just pushed a new commit with complete documentation, so you can have a look at it.

-Trixt0r

Link to comment
Share on other sites

Thanks for the assistance -- but I actually *just* (as in two minutes ago) finished my library to load the SCML, for the most part.

My only concern is that this was done against the b6.1 release -- and I know a new version has been released, possibly with new data structures and the like.

Does anyone have any formatted file dumps from b7+ ? I don't care if it's just the SCML, so I can try to validate it and see what I haven't caught yet.

Link to comment
Share on other sites

Just a heads up, everyone. Spriter b8 is well on it's way to completion. After this, I'll be updating the documentation fully to the complete 1.0 spec. The new documentation will also be in an easier to read and understand format.

In the meantime though, any implementation that worked with 6 should work with 7. The only thing that has changed has been additions for the new variable and tag features.

Link to comment
Share on other sites

  • 2 weeks later...

Awesome to know, Lucid!

Also -- I'm implementing Spriter and having some issues with actually rendering it. Was curious if anyone had any good documentation on how we should read it. It looks like (for the most part) you grab the actual Timeline objects and any other data (like width/height of the object) seems to be coming from the actual Folder/File structure. Aside from that, if we just read the Mainline and run through the keys for objects, that should be enough, right? Or is that incorrect?

http://www.brashmonkeygames.com/spriter ... MLGuide(a2).pdf

That was the latest I could grab of the spec sheet...

Thanks!

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...