Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How do I use these new types of sprite sheets?  (Read 1630 times)

0 Members and 1 Guest are viewing this topic.

pbortler

  • Newbie
  • *
  • Posts: 8
    • View Profile
How do I use these new types of sprite sheets?
« 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?

Paul

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: How do I use these new types of sprite sheets?
« Reply #1 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

pbortler

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: How do I use these new types of sprite sheets?
« Reply #2 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?

Paul

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: How do I use these new types of sprite sheets?
« Reply #3 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.