- Editado
Stuff management
Hi !
I'm currently develloping an RPG using spine. (In html5, so i'm using phaser + spine)
But i dont want to have a bad start or some conception issues, so i ask my main question here :
What do you think is the best way to manage stuff on characters?
The stuff will be: boots, head, weapons and armor. Very basic.
I though use the skin feature, but with this way, i have to redefine all the animations each time, because of the attachements changes. (For example, frame 1: the sword is view by the side, frame 2, the sword is view by the face).
And maybe it will be strange to have only one Spine model which contain all the stuffs (with x images per stuff) in the game :/
Thank you!
There are a few distinct pieces that make up a skeleton: bones, animations, attachments. If you have a skeleton that has the same bones and animations but different attachments, it makes sense to put all the attachments in that skeleton so the bones and animations can be reused.
If your items (eg hat, armor, etc) have multiple attachments (eg a single armor item could be made up of chest, left arm, right arm, pants, left leg, right leg) then you probably want to use a skin for each item. At runtime you find the skin for each equipped item and combine them into a single skin that you set on the skeleton.
I don't understand why you say you would need to "redefine all the animations each time, because of the attachements changes". Skins should prevent this problem.
Thank you!
So i think i will do a skin for each item.
What i am trying to say is that for each item (composed by different images for differents views), i will do manualy the switch of image (view) in the animation each time is it necessary, no? I think it's the only way, and anyways, i will manualy do them because i want to make some effects over them.
With spine, is there a way to have differents bones for differents skins? For example, if i have a sword, i will have only one bone. But if i have some exotics weapons, like scissors i would like to have 2 bones.
Ty
You can have skin placeholders weapon-side
and weapon-face
. In your animations you only key the visibility of those two placeholders. Now you can have a sword
skin, an axe
skin, and any number of additional weapon skins. Each weapon skin has a "side" and "face" attachment and all your animations work with any of the weapons.
You'll need to come up with what skin placeholders you need for all your different items.
Skins don't involve bones. Eventually we'll have attaching one skeleton to another to solve this.
Hi!
You have Spine and Phaser actually working together alright? We are looking into working with the same combo and all advice on integrating these together would be very helpful. Thanks!