Page 2 of 3

Re: Ranger hat flap under armor from back view.

Posted: 17 Jun 2008, 19:27
by Sanga
Consider this: The player is wearing cowboy boots. The top part of them (your "Shoe_Top_Sprite") should be visible if the player is wearing Jeans Shorts or Chaps. But that same part should not be visible if the player is wearing a long skirt or robe.

How can the artist decide which layer to put these on, when the desired priority depends on what other stuff the player is wearing?

Or are you thinking of having something in the XML file that tells the client "If the player is wearing this item, don't draw Shoe_Top_Sprite"?
------------------------------------------------------------
My idea was based on situations like the following: Assume a player has a sword, shield, and cape equipped. If the player is facing towards you (South), the proper draw order would be cape, shield, sword. Now turn the character to face right. In this position, the proper draw order would be shield, cape, sword. Turn the character to face left, and the draw order would be sword, cape, shield. And when facing away (North), the draw order would be sword, shield, cape.

There's no way, with the current client code, to handle this combination of equipment without layering issues, as there's no way for the artist to know whether or not there will be a cape or shield equipped when doing the sword spritesheet.

Having the client change the draw order, based on the direction the character is facing, resolves this. The artist would draw the sword spritesheet without considering any other equipment, and the variable draw order would take care of the rest.
------------------------------------------------------------
In terms of the client code, most of the work of adding new layers looks trivial (a few lines of code in selected places). One issue I *don't* know how to handle yet is redefining the XML files, so that we can have them specify two separate spritesheets to be enabled when a single item is equipped. I'll need to dig around for a while to figure it out, but I don't think it's more than a few days work.

So a question: If I can put together an (eAthena) client patch, that uses your layers, can you put together a few items to make use of them? Ideally, for testing purposes we'd need at least one sword, one shield, and one cape, in addition to existing items. Once we have that, we can actually test out your idea (using the TME server if you don't have a local server to test against), and see whether you can handle everything using that idea, or if my variable draw order idea will be required.

(Note: I am *not* asking for the attack animation to go with that sword. I think that would be too much work for a simple test. I'd just like to see in practice how your idea deals with the sword/shield/cape situation I described above while walking around).

I'd also need some way to map existing items to your layers. For instance, would the current hat sprites be Hat_Top_Sprite or Hat_Bottom_Sprite?

Re: Ranger hat flap under armor from back view.

Posted: 17 Jun 2008, 21:36
by Saphy
I do agree that having multiple layers would give much more flexibility. I don't think that is too complicated, we can use only one layer if we want (the front layer), and people who did something fancy (such as having truly long hair) can utilize such methodology.

Re: Ranger hat flap under armor from back view.

Posted: 18 Jun 2008, 00:24
by Black Don
Sanga wrote:Consider this: The player is wearing cowboy boots. The top part of them (your "Shoe_Top_Sprite") should be visible if the player is wearing Jeans Shorts or Chaps. But that same part should not be visible if the player is wearing a long skirt or robe.

How can the artist decide which layer to put these on, when the desired priority depends on what other stuff the player is wearing?

Or are you thinking of having something in the XML file that tells the client "If the player is wearing this item, don't draw Shoe_Top_Sprite"?
------------------------------------------------------------
You have a point there.
Sanga wrote: My idea was based on situations like the following: Assume a player has a sword, shield, and cape equipped. If the player is facing towards you (South), the proper draw order would be cape, shield, sword. Now turn the character to face right. In this position, the proper draw order would be shield, cape, sword. Turn the character to face left, and the draw order would be sword, cape, shield. And when facing away (North), the draw order would be sword, shield, cape.

There's no way, with the current client code, to handle this combination of equipment without layering issues, as there's no way for the artist to know whether or not there will be a cape or shield equipped when doing the sword spritesheet.

Having the client change the draw order, based on the direction the character is facing, resolves this. The artist would draw the sword spritesheet without considering any other equipment, and the variable draw order would take care of the rest.
------------------------------------------------------------
This is close to my idea the only difference is that instead of making the draw order dynamically change (like in your idea) I just have enough layers in the static draw code so you just have to make a call in the xml to which layer you want the sprite to draw on.
Sanga wrote: In terms of the client code, most of the work of adding new layers looks trivial (a few lines of code in selected places). One issue I *don't* know how to handle yet is redefining the XML files, so that we can have them specify two separate spritesheets to be enabled when a single item is equipped. I'll need to dig around for a while to figure it out, but I don't think it's more than a few days work.

So a question: If I can put together an (eAthena) client patch, that uses your layers, can you put together a few items to make use of them? Ideally, for testing purposes we'd need at least one sword, one shield, and one cape, in addition to existing items. Once we have that, we can actually test out your idea (using the TME server if you don't have a local server to test against), and see whether you can handle everything using that idea, or if my variable draw order idea will be required.

(Note: I am *not* asking for the attack animation to go with that sword. I think that would be too much work for a simple test. I'd just like to see in practice how your idea deals with the sword/shield/cape situation I described above while walking around).

I'd also need some way to map existing items to your layers. For instance, would the current hat sprites be Hat_Top_Sprite or Hat_Bottom_Sprite?
I can do walking animations for the scythe since there are attacking for it all ready(save me some work). A cape and shield walking animations shound not take to long if I only do the walking animation.

Re: Ranger hat flap under armor from back view.

Posted: 18 Jun 2008, 09:15
by Sanga
Black Don wrote:This is close to my idea the only difference is that instead of making the draw order dynamically change (like in your idea) I just have enough layers in the static draw code so you just have to make a call in the xml to which layer you want the sprite to draw on.
My hope was to offload the work of deciding which layer something should be on from the artist onto the client code. But we'd need extra layers anyway, for certain types of equipment (your cape example, with a front part and back part, is a good example). I'll leave the decision of what's easiest for the artists to you, since I'm not qualified to judge that.
Black Don wrote:I can do walking animations for the scythe since there are attacking for it all ready(save me some work). A cape and shield walking animations shound not take to long if I only do the walking animation
A test with scythe/shield/cape along with regular gear should be more than sufficient. I'll go ahead and work on that client patch (with any luck, I can have a working patch ready by this weekend).

Re: Ranger hat flap under armor from back view.

Posted: 19 Jun 2008, 00:09
by Sanga
Any chance of a basic spritesheet for gloves as well? To get this all working, I had to do some tweaking in the eAthena server, so while I was at it I set it up to handle shoes, gloves, capes, and two as-yet-undefined items I'm calling misc1 and misc2. I've found a spritesheet to use with boots for testing, but I haven't been able to find one for gloves.

Edit: Never mind. I found a basic spritesheet for a set of gloves on the Evol-Online forums. Personally I don't think they look all that great, but it's good enough for testing.

And another edit: Getting this to work required some changes to the server (for instance, it didn't know to send a "changelooks" packet for the slot I designated as "capes"). I have the server patch complete and tested - it'll be applied to the TME server probably next week. I also have the client patch ready and tested as far as I can (I know that the basic spritesheets I found for gloves and boots work correctly).

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 00:28
by Black Don
Sanga wrote:
Black Don wrote:This is close to my idea the only difference is that instead of making the draw order dynamically change (like in your idea) I just have enough layers in the static draw code so you just have to make a call in the xml to which layer you want the sprite to draw on.
My hope was to offload the work of deciding which layer something should be on from the artist onto the client code. But we'd need extra layers anyway, for certain types of equipment (your cape example, with a front part and back part, is a good example). I'll leave the decision of what's easiest for the artists to you, since I'm not qualified to judge that.
I'm not exactly sure what you are saying. But you have to have a good understanding of how layers inter act just to be able to make stuff like armor and definitely for the tile sets. Mappers need that understanding as well just to make good maps too.
Sanga wrote:
Black Don wrote:I can do walking animations for the scythe since there are attacking for it all ready(save me some work). A cape and shield walking animations shound not take to long if I only do the walking animation
A test with scythe/shield/cape along with regular gear should be more than sufficient. I'll go ahead and work on that client patch (with any luck, I can have a working patch ready by this weekend).
Well here is a cape I ripped from Slave's Savior armor. I have it hugging as tight as I can to the base sprite. Here is as one layer:

Image

and the split version you can play with as well :
Top
Image
Bottom
Image

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 04:56
by Jaxad0127
I think it would be easier for artists if some layers were drawn before the base sprite. In this setup, the back of the cape would always be full. This also makes it easier for other games using this engine. For TMW, all players will have the same shape and size, in other games, maybe not.

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 06:17
by Sanga
jaxad0127 wrote:I think it would be easier for artists if some layers were drawn before the base sprite. In this setup, the back of the cape would always be full. This also makes it easier for other games using this engine. For TMW, all players will have the same shape and size, in other games, maybe not.
For most things that would help (hair is an exception, because it's basically both behind *and* in front of the player sprite, but separate front and back layers would deal with that (have the base sprite layer in between). But the extra layers Don has specified can accomplish the same thing - he didn't *have* to have the base sprite's outline in the back of the cape, but he used an existing spritesheet that already had that in there...

But I'm not sure the "different races" argument is really valid. Unless the races are very closely matched in terms of the base sprites, you'll need race-specific variants of the equipment spritesheets anyway (imagine a gnome wearing a troll's helmet...).

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 10:49
by Crush
Races WILL be very closely matched in terms of the base sprite. And we won't have gnomes, trolls, elvens, dwarfes or any other overused cliché fantasy races. http://wiki.themanaworld.org/index.php/Man

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 11:19
by Sanga
Black Don wrote:Well here is a cape I ripped from Slave's Savior armor. I have it hugging as tight as I can to the base sprite. Here is as one layer:
jaxad0127 wrote:I think it would be easier for artists if some layers were drawn before the base sprite. In this setup, the back of the cape would always be full.
Don - can you see a reason for not having the "CAPE_BOTTOM_SPRITE" layer drawn before the base sprite? It *would* make sense, since that layer should *always* be below the base sprite. I also think that the weapon and shield bottom layers should also be drawn before the base sprite (though the glove and shoe bottom layers are an entirely different matter).

P.S. Like my new avatar? :D

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 11:40
by Crush
How about the easy solution and just drawing the back sprites in the opposite order of the front sprites, then the base sprite, and then the front sprites?

P.S. Like my new avatar?
It would look better when you would have used either a better or no interpolation method at all when resizing, because it looks very blurred.

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 13:13
by Black Don
Crush wrote:How about the easy solution and just drawing the back sprites in the opposite order of the front sprites, then the base sprite, and then the front sprites?
After some thought I believe that would work fine.

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 15:19
by Jaxad0127
Crush wrote:Races WILL be very closely matched in terms of the base sprite. And we won't have gnomes, trolls, elvens, dwarfes or any other overused cliché fantasy races. http://wiki.themanaworld.org/index.php/Man
Right. Content for TMW work that way. Others using this engine might not have it that way.
Crush wrote:How about the easy solution and just drawing the back sprites in the opposite order of the front sprites, then the base sprite, and then the front sprites?
I support this as well. I almost proposed it myself.

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 15:45
by Sanga
Black Don wrote:
Crush wrote:How about the easy solution and just drawing the back sprites in the opposite order of the front sprites, then the base sprite, and then the front sprites?
After some thought I believe that would work fine.
Here's the ordering I'm using now (I moved the shield, weapon, and cape bottoms to the "lowest" positions after jaxad0127's post, just to test the idea):

SHIELD_BOTTOM_SPRITE
WEAPON_BOTTOM_SPRITE
CAPE_BOTTOM_SPRITE
BASE_SPRITE
SHOES_BOTTOM_SPRITE
BOTTOMCLOTHES_SPRITE
SHOES_SPRITE
GLOVES_BOTTOM_SPRITE
TOPCLOTHES_SPRITE
MISC1_SPRITE
MISC2_SPRITE
GLOVES_SPRITE
CAPE_SPRITE
HAT_BOTTOM_SPRITE
HAIR_SPRITE
HAT_SPRITE
WEAPON_SPRITE
SHIELD_SPRITE

Note the MISC1 and MISC2 - these represent the sprites to be used with the two remaining "unclaimed" equipment slots. I thought I might as well put them in now, even if we don't have an immediate use for them (Belt and Amulet, maybe?).

Can you give me the a new ordering, based on this "symmetrical layers" idea? Shield and weapon are the obvious "outermost" layers. After that, I haven't a clue (I was thinking about gloves passing in front of the cape "top" during attack animations). But come to think of it, there's a possiblity of the bare arm of the *base sprite* passing in front of things during attack animations - see Pauan's slash animation for a good example.

To pull off Pauan's slash with armor equipped, will we need to chop the base sprite into 3 layers - arms top, body, and arms bottom, and do the same with the torso equipment?

I'll let you artist types sort it out. With what I've done so far, adding or rearranging layers in the client is a pretty simple business, and I don't see any reason we *can't* have 3 layers for a given "item", if necessary.

Re: Ranger hat flap under armor from back view.

Posted: 20 Jun 2008, 16:50
by Jaxad0127
Sanga wrote:Can you give me the a new ordering, based on this "symmetrical layers" idea?
SHIELD_BOTTOM_SPRITE
WEAPON_BOTTOM_SPRITE
HAT_BOTTOM_SPRITE
HAIR_BOTTOM_SPRITE
CAPE_BOTTOM_SPRITE
GLOVES_BOTTOM_SPRITE
MISC2_BOTTOM_SPRITE
MISC1_BOTTOM_SPRITE
TOPCLOTHES_BOTTOM_SPRITE
SHOES_BOTTOM_SPRITE
BOTTOMCLOTHES_BOTTOM_SPRITE
BASE_SPRITE
BOTTOMCLOTHES_SPRITE
SHOES_SPRITE
TOPCLOTHES_SPRITE
MISC1_SPRITE
MISC2_SPRITE
GLOVES_SPRITE
CAPE_SPRITE
HAIR_SPRITE
HAT_SPRITE
WEAPON_SPRITE
SHIELD_SPRITE