Page 1 of 1

Sprite layers (again!)

Posted: 16 Oct 2009, 15:56
by Jaxad0127
I've been thinking about the best way to have separate heads and still have body parts go in front of and behind them and have mirrored sprite layers. I've come to the conclusion that the the head will need to be the center sprite (not duplicated) and have hair and hats with it (mirrored) before the body sprite. So:
  • ...
  • Boots (back)
  • Body (back)
  • Hat (back)
  • Hair (back)
  • Head
  • Hair
  • Hat
  • Body
  • Boots
  • ...
This allows body parts to be infront of and behind the head while allowing the head to be separate. It also means we don't need to crop equipment sprites for the head, just adjust front/back layer for them (cropping is allowed, of course, to save artist time). We can also add more hat/hair layers to allow them to be infront of other things too.

Re: Sprite layers (again!)

Posted: 16 Oct 2009, 16:38
by bcs86
Would a (base) player sprite contributor still be able to submit a flat PNG file without chopping parts up? If not I'd want some sort of wiki entry to reference.

Re: Sprite layers (again!)

Posted: 16 Oct 2009, 16:40
by Jaxad0127
This is for players. NPCs can be a single flat layer that has everything.

Re: Sprite layers (again!)

Posted: 17 Oct 2009, 01:46
by SpamMaster
What if each item of clothing had a value?

-10 = behind player sprite
0 = player sprite (clothes can't be 0)
10 = in front of player sprite

Clothes can be anything from 1 to 100. The higher the value, the further forward it is. Boots could be 90, legs 80, shirt 70 and so on. Clothes could still be anything in between if needed, though.

Re: Sprite layers (again!)

Posted: 17 Oct 2009, 03:35
by Jaxad0127
And if two items have the same layer? What about items having parts to draw both in front of and behind the player sprite (like a chest plate with a cape)? I don't want to hard code this, the stuff I proposed is for our use (others can of course use it too), but having layer information on with the items doesn't work too well.

Re: Sprite layers (again!)

Posted: 18 Oct 2009, 04:46
by SpamMaster
I meant that if two items have the same value, the first item is unequipped.


Anyway, I suppose it wouldn't work too well. Just an idea that shoved its way into my head.


What would happen if each item was reworked to have two layers...

Boots = 90 front layer, -90 back layer.
Shorts = 80 front layer, -80 back layer...



Spammy