Jump to content

Spriter for Game Maker: Studio


Recommended Posts

Hello everyone,

I'm am aspiring game developer that loves the interface provided by Spriter. However, it seems there is no up-to-date model for Game Maker: Studio support. I know there are a few outdated APIs out there (notably icuurd's implementation seen here), but I am aiming to provide a current model. I am aware that Edgar is hard at work with the reference implementation, but I simply can't wait! I'm going to try and release a program for use until the update is pushed.

 

So I'm creating this thread as a sort of devlog. I've yet to break any serious ground (most of my efforts have been researching what needs to be done), so I'll begin by asking the community:

 

Has anyone done this already?

 

Any amount of work done would be largely appreciated.

 

As of now my goal is to simply transcribe Spriter's JSON output (along with an atlas file) into a form that GMS will recognize as a Spine file. This will allow access to the valuable skeleton_ family of functions provided in GMS.

 

As I'm writing this, it's already fast approaching 4:10am. I'll be out of town tomorrow evening but I plan to have my first chunk of work/programming done by the end of this weekend. Expect another post by then.

 

In the meantime, please offer any ideas, crticisms, or questions you have.

 

Thanks.

Link to comment
Share on other sites

  • 1 month later...

This was my idea years earlier. And there is one problem with that. The Spine Licence. The Spine-API in GameMaker allows you only to use the API if you have bought Spine. I bought Spine and Spriter. But I think, it's much faster to re-animate any Spriter-Animation in Spine, instead of creating a converter. The next big problem are the bones or no bones. And such a converter will also only work for simpler animations. You have to create slots and bone from nothing if you want to be able to load a unboned Spriter-file into the right json-data structure.

 

But, I would be very glad, if you do so. Maybe you could open a GameMaker forum thread and give access to a prototype.

Link to comment
Share on other sites

  • 1 month later...

I'm really interested in this thread, because I'm currently developing a game in Game Maker Studio ad I'd really like to use Spriter for animations. Some time ago I've contacted the Spriter guys via e-mail and they told me that even though there's not a direct support for implementing Spriter animations in GMS, it is possibile to export the animations as single image files and use them in the game. My question is: if the direct support is not ready yet, where can i Find a good tutorial on how to export animations as image files and then import them and get them working inside GMS?

Link to comment
Share on other sites

Hey everyone,

 

I started this thread at the beginning of the summer with intentions to develop some sort of pipeline for Spriter -> Game Maker: Studio. As SkyWalker_lordLucas

 mentioned, there is an export to .png option which may work for some. However, I had intended to implement an in-game rig I could use for things like IK, animations, and such. This is where the issue arises, because bone data cannot be imported to GM:S.

 

Unfortunately, I lacked the experience I needed to implement even the most basic prototype of animation. I've since moved on to a new project.

 

My first obstacle was obtaining a data structure that I could then parse for information on the bone structure. This solution was simple enough thanks to Spriters .scon format and GM:S' json_decode and json_encode functions. Using a bit of file I/O magic you can easily convert the .scon file into a ds_list/ds_map hierarchy.

 

Unfortunately this is where my progress quickly came to a halt. After experimenting with a few design ideas, I was unable to make any major progress with any of the methods I tried. 

 

My apologies for the massively late follow-up. I'm going back to University soon, but perhaps I will find the free time to revisit this. I understand Edgar is hard at work with updating the interface, and perhaps a new foundation will offer new insight to a successful GM:S implementation. 

 

Until then, I encourage you all to try where I have failed. I'll try and monitor this thread more closely. Feel free to ask me any questions you may have. I tried out a lot of different things so perhaps the solution lies in combining my partial knowledge with someone elses.

 

Cheers,

 

Silpheed

Link to comment
Share on other sites

Hi Silpheed,

 

Thanks very much for the update.  While we, unfortunately, can't estimate development time accurately, we're "rounding third base" on the fully featured and future-proof reference implementation. When that's finally finished, we'll be dedicating as much manpower and time as possible to make sure full Spriter support is finally ported to as many authoring systems as possible. GameMakerStudio is near the top of that list.

 

So, basically, it's definitely going to happen, and it's near the top of our priority list after the reference implementation is finished. The only problem is: we cant say with any certainty whatsoever if that will be in weeks or months.

 

Sorry again, everyone, for the large delay in the reference implementation and, subsequently, in update builds.  We're doing our best to catch up, and, after the reference implementation, momentum should pick up dramatically.

 

Cheers

Link to comment
Share on other sites

Thank you both for this update! I think I'm going to use the .png image export to put my animations inside GMS and get them working. However, I really hope that a full and easy implementation for Spriter animations will arrive soon :-/ This is really very important and I recommend that you let us now as soon as possibile. Is there the possibility that we see the implmentation system to Game Maker Studio before the end of the year?

Link to comment
Share on other sites

  • 1 month later...

I hope I'm not oversimplifying what a bone is, but using GMS terms wouldn't it be the equivalent of a fixed point with lengthdir_x/y being applied?

 

It's certainly possible to recreate what spriter does in GMS code, the only problem when using Studio itself is that it is very poor at sprite rotation - whether it's a textured primitive or a sprite it will have a lot of pixel distortion. Spriter is a lot more efficient in this regard!

 

To my mind (as an inexperienced programmer) you'd need to have an object with an x/y point to "build" your skeleton from: say you're doing an arm, then  the object would be the "shoulder", and the arm would be -

 

shoulder.x + lengthdir_x (length,angle);

 

repeat for lengthdir_y etc.

 

That's if you're using using textured primitives, and are rotating the end around the "shoulder": if you were rotating a sprite then it's even simpler - set the x/y of the sprite to the x/y of "shoulder" and it will rotate around that point, that's your upper arm - the lower arm would be a point defined from the shoulder with lengthdir etc. 'Length' would simply be sprite_get_height (current sprite)

 

I know that this is possible as I have made my own equivalent in GML code, but as I said the end result isn't worth pursuing because GMS seems rubbish when using it's own sprite transformation code (or other) - you get an ugly pixelated mess!

Link to comment
Share on other sites

I hope I'm not oversimplifying what a bone is, but using GMS terms wouldn't it be the equivalent of a fixed point with lengthdir_x/y being applied?

 

It's certainly possible to recreate what spriter does in GMS code, the only problem when using Studio itself is that it is very poor at sprite rotation - whether it's a textured primitive or a sprite it will have a lot of pixel distortion. Spriter is a lot more efficient in this regard!

 

To my mind (as an inexperienced programmer) you'd need to have an object with an x/y point to "build" your skeleton from: say you're doing an arm, then  the object would be the "shoulder", and the arm would be -

 

shoulder.x + lengthdir_x (length,angle);

 

repeat for lengthdir_y etc.

 

That's if you're using using textured primitives, and are rotating the end around the "shoulder": if you were rotating a sprite then it's even simpler - set the x/y of the sprite to the x/y of "shoulder" and it will rotate around that point, that's your upper arm - the lower arm would be a point defined from the shoulder with lengthdir etc. 'Length' would simply be sprite_get_height (current sprite)

 

I know that this is possible as I have made my own equivalent in GML code, but as I said the end result isn't worth pursuing because GMS seems rubbish when using it's own sprite transformation code (or other) - you get an ugly pixelated mess!

 

Exactly. One way to interpret it is as each bone representing a vector with a magnitude given by the length of the bone and the direction determined by the rotation stored in the frame information. The sprite is then simply tethered to the bone at an arbitrary point and rotated along with its "sibling" bone. I don't remember much from GameMaker: Studio in regard to the transforming of sprites but I vaguely remember there being some sort of filtering mode option for sprites. 

 

Additionally, for "simplicity" (this implementation may arguably be more complicated), you could make the entire skeleton one object and simply track all the bones that are part of that object.

Link to comment
Share on other sites

  • 3 weeks later...
On 10/11/2015, 1:50:32, johnboy said:

I know that this is possible as I have made my own equivalent in GML code, but as I said the end result isn't worth pursuing because GMS seems rubbish when using it's own sprite transformation code (or other) - you get an ugly pixelated mess!

 

I also wrote my own "Skeletal Animation" code in Game Maker with lengdir_x, lengthdir_y and yeah, the end result is technically correct but very pixelated no matter the beauty of the original sprite.  Is this a problem with GMS in general?  What do you use instead?  I've been oggling at Unity but it's $1,500 price point is far higher than whatever I spent on GMS.  I was wondering if Spline would help make the animations look better in GMS.

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Sorry, If you need Game Maker support ASAP then by all means use whatever tools can do what you need. We had been discussing Spriter support with the developers of GM, and it seems they want to focus all efforts on releasing GMS2. My best guess is the won't touch plug-ins until the release of the new GMS... so an ETA for that and subsequent Spriter support is definitely impossible, but certainly not soon.

We had explored the idea of having a plug-in made without the help of the GMS developers, but too many compromises for performance and integration would likely have to be made.

best of luck with your projects, and hopefully Spriter will have the support you need for a future project.

 

cheers,
Mike at BrashMonkey

 

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