1
\$\begingroup\$

I was painting pixel sprites of a goblin (the enemies in the game). I first thought of making sprites of it for each different scenario:

facing camera, moving toward camera 1, moving toward camera 2, facing camera with sword, moving toward camera with sword 1, moving toward camera with sword 2, facing left, going left 1, going left 2 facing left with sword etc. (for a total of 18 sprites)

facing camera with sword enter image description here

Then I wondered, how will I make the sword hit the player ? What if I want the goblin to have a different type of sword ? Do I have to make different sprites of it holding different weapon ?

I realised doing sprites for every scenario wasn't ideal. So my question is, how do I make this ? Should I keep the sprites I have but remove the sword from them and then add a sword sprite attached to the player sprite and animating it so it matches the players movement ? Is that the way to go ?

\$\endgroup\$
1
\$\begingroup\$

You can do this with the rather new 2d animation package.

It allows you to create a skeleton for a sprite and animate that skeleton. Although that usually doesn't work too well with low-resolution pixel-art. It works better with large, painted sprites. It also doesn't work very well with turning a sprite around the y-axis, so if you need sprites facing towards and away from the camera, you might want to represent them with separate 2d sprite animations.

It also allows you to swap out sub-sprites of an animated sprite, which can be used for retargeting your animations for different weapons or other parts of a character.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.