nfoboy

Ok, am learning the usage of the Spine program itself, and now want to start testing the basics of incorporating into LibGDX.

So far, the only tutorial I see is this one:
http://software-workshop.eu/content/spine-binaries-libgdx-how-get-started

This looks like a good start, but...

When I go to look in my /runtimes/libgdx directory, and there is no spine-libgdx-1.0.jar there. (it does have a read me to go to the github sources)

So,
In looking at this page http://esotericsoftware.com/spine-using-runtimes/#source-code it talks about the GitHub sources. Two pages, talking about getting the sources, go for that...

So I download and install the spine-libgdx source files project, but wait, there's a problem... needs the gdx-backend-lwjgl project source... so go get that, and wait.. not one, but two more projects needed.... this is getting ridiculous, so full-stop... come to this board and scour for more installation help, can't find it.

So now, after paying for a full license, and trying to follow various guides (not from esoteric per se that I can see), I use the LibGDX automated project from aurelion, and don't see how I'm supposed to incorporate the .jar file for Spine, simply and easily. Which is what I was expecting when I paid for Spine.

Nate, where is the simple, documented way to get up and running with incorporating JSON/binary files into our various build environments (for me, Windows Based Eclipse LibGDX, but I'm sure I'm not the only one looking for the documentation that gets us up and running).

Ross
nfoboy
  • 記事: 3

Nate

spine-libgdx is a simple Java project. A JAR is not provided because it is intended that you run it from source. This doesn't mean you need to run libgdx from source.

Follow the libgdx instructions to configure your development environment for libgdx. Next, in Eclipse click File -> Import -> Existing projects and point it at the spine-libgdx folder you got from github (you can download a ZIP of the github repo from the github webpage, so you don't have to mess with git). Now in your Eclipse project properties -> Java Build Path -> Projects you just need to check that your project depends on spine-libgdx as well as the libgdx projects.

Another option is to copy the spine-libgdx source into the source directory of your libgdx project.

If you really want a JAR you can import the project into Eclipse as described above and click File -> Export -> JAR file. Or you can run scar on the spine-libgdx folder. Or you can use Ant or Maven if you prefer those tools. But you might as well run from source, it makes it easier for you to dig into it to see how it works as well as to stay up to date.
アバター
Nate

Nate
  • 記事: 9730

Nate

Note spine-libgdx depends on the gdx-backend-lwjgl project, which I see now is probably what is tripping you up. If you aren't running libgdx from source then you can edit the spine-libgdx project, remove the gdx-backend-lwjgl project dependency and have the project use the following libgdx JARs:
gdx.jar
gdx-natives.jar
gdx-backend-lwjgl.jar
gdx-backend-lwjgl-natives.jar
The spine-libgdx project is not configured this way in git because committing JARs bloats the repo.

Note spine-libgdx only needs gdx-backend-lwjgl.jar and gdx-backend-lwjgl-natives.jar to run the examples in the "test" source directory. You can delete this directory and omit these LWJGL JARs if you like.
アバター
Nate

Nate
  • 記事: 9730

nfoboy

Nate,

thanks for the very (and I do mean very) quick reply.

First, a simple java project? I don't want to see complex! :)

Second, I went with your way (using as source), but ended up bringing in:

spine-libgdx
gdx
gdx-backend-lwgjl
gdx-jnigen
gdx-openal

I will try the other method some time in the future.

Third, the tutorial mentions some outdated code, which is why I went with the source. I see now that Spine builds the .skel file, and it now contains all of the animations within that SkeletonData file. Also, in looking thru, the draw function has been taken out from the SkeletonData, and is now its own SkeletonRenderer class. As I was able to follow along with the tutorial to at least get started, it wasn't too painful after getting the exclamation points to disappear in Eclipse.

Is there any way to still have animation files separate? (I'm thinking, updates as expansion packs, that include more animations, based on the same SkeletonData/Atlas, but as I see it now, need to send the entire SkeletonData)

Again, thanks for the quick response!

Ross
nfoboy
  • 記事: 3

Nate

Nope, the animations are always inside the skeleton file. The file is unlikely to get so big it needs to be separated.
アバター
Nate

Nate
  • 記事: 9730


Return to Runtimes