Jump to content

Spriter Java OpenGL (libGDX) import


Recommended Posts

Summary:

This package imports the spriter format scml into a dom-like java model and provides a basic drawer for drawing it with openGL on the screen.

Currently it supports basic tweening by linearly interpolate the attributes of the sprites between key frames. That needs to be reimplemented later.

Quick Start:

Import the Spriter-File:

spriterObjectHero = SpriterImporter.importFile(
Gdx.files.internal("data/hero/BetaFormatHero.SCML"), new TextureProvider());
spriterObjectHero.getAllTextures();

Note: The Spriter-object itself doesnt handle the textures, as they will probably handled outside. Instead it demands a texture provider, which gives back the needed Textures for the given image paths.

Draw the Spriter object:

SpriterDrawer.draw(spriteBatch, spriterObjectHero, "walk", 99,
150, 50, true, true);

Note: this draws the spriter object with the animation "walk" at keyframe 99 at position 150:50.

The last parameters defines, if the animation should be displayed repeating or not and if the animations should be tweened.

Download:

libGDX-Forum: http://www.badlogicgames.com/forum/viewtopic.php?f=17&t=3863

Source-code: http://www.badlogicgames.com/forum/download/file.php?id=717

demo-video: http://www.badlogicgames.com/forum/download/file.php?id=675

Feedback:

Feedback is welcome. The source is maily java core, sou it should be portable in any other language. I will implement the other features of spriter as they come and if they are interesting for my developments. So others are invited to enhance the java driver, too.

Please contact me at chris.f.news@gmx.de

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Hello, I exchanged emails with Christian and he is too busy right now to upgrade his Importer to format 1.0.

I also got response from Mike at BrashMonkey, that he has no info about somebody else to start implementation.

Is there anybody already start on implementation?

If not, maybe I will try, with no promises :)

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Hi, I finished some basic implementation of new SCML format based on cyberchris SCMLImporter. Some additional functions added (scaling, encapsulating in Actor object). There are still missing some features of SCML format and bone structure is not implementated yet. But examples from actual version of Spriter a4 can be loaded and drawed/animated.

Right now I'm testing it in one project. We will start with cyberchris a public project on Github soon (January).

Link to comment
Share on other sites

  • 4 months later...

Hi everyone,

I successfuly run the cyberchris' importer but it only work with older verions of SCML files. (Good work anyway !)

Do you know if new version of this importer are scheduled ?

In fact, I hesitate to buy Spriter only due to this...

Thank you in advance for the information.

Birmania.

Link to comment
Share on other sites

Hi Birmania,

here you have a generic java implementation for importing scml files + some additional functions.

I was testing everything with LibGDX and it runs quite well on PC and Android. HTML5 and iOS was not tested, but it should run fine, since LibGDX is meant to run similar on all supported platforms.

- Trixt0r

Link to comment
Share on other sites

Oh damn... Sorry Trixt0r but I completely forgot to mention that I tried your importer too !

But in fact, I didn't success to make it works. At the moment, I just retry to use it and it was a success ! Your library seems to work perfectly.

My problem was that I tried to use the code in folder "spriter-test" instead of "Spriter" and "Spriter-desktop". (Due to the commentaries in your GitHub repository, speaking about LibGDX tests in this folder)

To conclude : Great thanks for your Spriter Importer, it works like a charm, I hope that you will maintain it in the future.

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