Sprite layers (again!)

All development of pixel art and graphics
Post Reply
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Sprite layers (again!)

Post by Jaxad0127 » 16 Oct 2009, 16:56

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.
Image
User avatar
bcs86
Novice
Novice
Posts: 259
Joined: 27 Feb 2009, 18:14
Contact:

Re: Sprite layers (again!)

Post by bcs86 » 16 Oct 2009, 17:38

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.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Sprite layers (again!)

Post by Jaxad0127 » 16 Oct 2009, 17:40

This is for players. NPCs can be a single flat layer that has everything.
Image
User avatar
SpamMaster
Peon
Peon
Posts: 79
Joined: 18 Sep 2009, 23:29
Location: Spammiland

Re: Sprite layers (again!)

Post by SpamMaster » 17 Oct 2009, 02:46

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.
Have a spamful evening, sir.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Sprite layers (again!)

Post by Jaxad0127 » 17 Oct 2009, 04:35

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.
Image
User avatar
SpamMaster
Peon
Peon
Posts: 79
Joined: 18 Sep 2009, 23:29
Location: Spammiland

Re: Sprite layers (again!)

Post by SpamMaster » 18 Oct 2009, 05:46

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
Have a spamful evening, sir.
Post Reply