Best Practice for Hero sprites

Posts: 1
Joined: 2012.11
Post: #1
Hello, I develop game where main character will change guns ...

So i wonder what is best practice for sprite ?
I think of somthing like that :
Separate body from arms . So i'll have one sprite sheet for body - animated ( move left and right ) ,
and one for arms whit diffrent wepons. And i'll atach arms to body ...

I'll be glad if u share ideas or expiriance what is the best method to acomplish this .

Quote this message in a reply
⌘-R in Chief
Posts: 1,277
Joined: 2002.05
Post: #2
Sounds reasonable.

Weapons might also change the character's foot pattern. A gigantic rocket launcher might mean the player can't run like they can with a small pistol, and rather than simply slowing down the running animation you might want to have a smaller stride to look more accurate. That would mean having at least having a separate sheet for the body for different movement speeds, but perhaps you simply want to tie it to each weapon for simplicity's sake.

The character could have a different facial expression with each weapon, too...

Simply duplicating the entire sprite sheet and swapping out the weapon is easiest for you as a programmer, but it'll also waste time swapping sprite sheets or VRAM by trying to keep them all in memory.

Keeping each body part separate could be useful (change walking stride, or facial expressions, or the player's clothes etc independent of everything else), but it will require more work up front to group the sprites together at runtime with the necessary movement.

For example, do you have exactly one image for a leg and simply have it pivot and move like it should, or are you going to have 10 leg images each at different point in the stride, so the positioning is all done at the time the images are created? The latter is simpler, but wastes RAM again…

Pick your poison. Smile
Quote this message in a reply
Post Reply