Phaser with spine

hello friends,
I have one question about phaser and spine atlas packing together.
Generally, I am using one atlas image for all photos in phaser, but now I want to add spine animations and as we know, when we export spine animation, it generates its image atlas with more seperated parts of it. I want to have all of these seperated parts of the photos in one atlas image and in one json file
hope everything is clear.

to be more clear: I want to to achieve something like that - phaser3-examples/public/assets/spine/demos at master · photonstorm/phaser3-examples · GitHub

if you see heroes.png file, you see that every heroes are integrated, but how this can be achieved if spine application exports each one seperately?

Thanks for your time! :smiling_face_with_three_hearts:

Spine Exporting docs by Esoteric states that in order to gain control over the packing you need to use the texture packer separately to further optimize the way you have shown as an example.

I’ve been working with Spine extensively for about 2 years across two projects and we have almost never seen Spine pack our art into one sheet just out the of the gate with Spine on default settings.

You can read about the texture packer and how to do this here.

Thanks for the response :smiling_face_with_three_hearts:
I know how to use texture packer, maybe my question wasn’t so clear.
okay lets see this image :arrow_down: here is many heroes.

imagine I have one hero in spine app and exporting it, I have one atlas of one hero, but I want to have all the heroes on one atlas image and I don’t know how to do this as I have to export each hero seperately

Ah, gotcha. That sounds like an interesting problem to solve. I wish I could help you with that. You might try a sprite sheet packer and see if you can pack the spine textures together onto one. Otherwise you may need to make the tool yourself.

yeah I thought about using sprite sheet packer after exporting all of the animations, but a better solution should exist
thanks for your attention :smiling_face_with_three_hearts:

1 Like

Maybe you could fill that niche! Best of luck :+1: