I have a characterbody2d and I want to display the equipment being worn. So this equipment would need to be swapped around during game play.

I currently am using several sprites layered. How is best to handle this situation?

  • Pennomi@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    17 days ago

    Yep, multiple sprites layered is the right way to do this, one sprite per equipment item. That’s the normal way to approach this problem.

    Unless you are rendering literally thousands of characters at the same time, you should not reach any performance bottlenecks from this approach. If you are rendering that many characters at once, you might need to build a custom shader to handle it.

    But the important thing in gamedev is to keep things as simple as possible. Implement everything in the most obvious way you can. I think the solution you described is very good.