SFML community forums

Help => General => Topic started by: pbortler on August 19, 2020, 08:30:02 pm

Title: How do I use these new types of sprite sheets?
Post by: pbortler on August 19, 2020, 08:30:02 pm
I've been playing around with regular sprite sheets for a few days, and I can create animations with them by displaying their frames in sequence. I'm now trying to use some sprites that I bought, but they're in a weird atlas format. Instead of frames to be shown in sequence they contain components that are meant to be connected, like upper and lower arm components meant to be connected by a joint at the elbow.

I can't find any tutorials on how to actually use these types of sprite sheets. There only seem to be examples on how to atlas (as a verb) your sprite sheet to presumably generate the txt/json files I already have.

How do I take txt/json and PNG files of component pieces, and display an animated character with moving arm components that are properly connected at the elbows and shoulders?
Title: Re: How do I use these new types of sprite sheets?
Post by: Paul on August 19, 2020, 08:57:45 pm
It's some 2d skeletal animation system like Spine, they usually have examples - https://github.com/EsotericSoftware/spine-runtimes/tree/3.8/spine-sfml/cpp
Title: Re: How do I use these new types of sprite sheets?
Post by: pbortler on August 20, 2020, 02:02:03 am
So far I've had nothing but bad luck with Spine. None of the examples will load out of the box. Can you recommend an alternative 2d skeletal system for SFML?
Title: Re: How do I use these new types of sprite sheets?
Post by: Paul on August 20, 2020, 01:44:15 pm
Spine seems like chaotic mess but "sfml-example" is working for me.

Problem with Spine and another similar complex libraries (for example 2D physics engines) is that they can be used quite well only if there exists necessary interface for them like in Unity engine, Godot etc. Otherwise it's terrible spaghetti code where it's very difficult to program manually. I doubt anyone uses it that way.