Alternative method to using containers?

I have a player that I would like to build out of multiple sprites, which moves around by tweens to make the motion of walking. I was thinking back to when Phaser 2 had child sprites, and this implementation was easier. I’ve been thinking about using containers, but the disclaimer of performance cost was discouraging, as I believe I might need to give limbs containers as well to hold weapons and wear armor.

Is there a workaround or alternative to containers for my purpose, or do I just have to swallow the costs? I believe an average player would make around six child sprites with each limb having their own children. Perhaps around seven containers per player in general, in what I hope might be a multiplayer game.

Have you looked at the Inverse Kinematic Example of using containers?
https://labs.phaser.io/edit.html?src=src\game%20objects\container\container%20ik.js

It seems like something that might have elements of what you want to accomplish.

1 Like