character/race idea ...

Got something on your mind about the project? This is the correct place for that.


Forum rules

This forum is for feature requests, content changes additions, anything not a Bug in the software.
Please report all bugs on the Support Forums

Post Reply
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

character/race idea ...

Post by zick »

it appears that you are using a base character and composting graphics on top of the base, whenever they equip new stuff ...
from a programmer's p.o.v. is this faster/less resource intensive than using a guid system, where the guid represents a specific character, a specific race, with specific clothing/weapon, color options, etc? this guid system means more graphics but may allow for options like recoloring weapons/armor without needing to programatically recolor a greyscale image on the fly. also once you start dealing with graphics that have an alpha layer as well as blended colors (where edges of colors are blended and not separated by solid pixels), programatically recoloring gets harder.

in the guid system, each sprite has a long string name that represents all the options of a character. like the first character of the guid (0-9 or A-F ... 16 options) could represent the race/sex of the character. the next character could stand for skin color, the next for hair, and so on. included options could be weapon selected, optional colors of that weapon, hair style, eye color, etc.

is this a better idea, i mean i think it is ... but you're the programmers.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

I am not sure if I understood you correctly, but do you suggest to have a single graphic for each possible combination of race, gender, hair and equipment?

Let me show you why this is a bad idea.

Let's say we have approximately:
10 races
2 genders
10 hairstyles
7 haircolors
about 20 chest armors
about 20 leg armors
about 20 headgears
about 10 weapons

That means 10x2x10x7x20x20x20x10 = 112.000.000 possible combinations. And this doesn't even take color variants for equipment into account. Doing so would add even more powers of ten.

When each spriteset is approximately 50 kb in size that would mean we would need 5,2 TERAbyte of disk storage to save them all.
Last edited by Crush on 18 Jun 2007, 20:26, edited 2 times in total.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

gotcha ...
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

what about a game like maple story ... they've got billions of options it seems like, yet the install is around 600 meg. how do they get around this?
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

I guess they are doing it like we do: combining the player sprites out of multiple images at runtime.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

without looking at the source, cause i'll get lost, could you tell me are you sorta lining up all the layers of clothing in a particular order and then making a snapshot in memory of that, using that snapshot ... or are you actually lining up all the layers with a different z-index for each layer and moving each layer as the character moves?

i am possibly going somewhere with this and that why i am wondering.
User avatar
BadMrBox
Warrior
Warrior
Posts: 281
Joined: 10 Mar 2005, 15:05
Location: Sweden
Contact:

Post by BadMrBox »

Without ever seeing the sourcecode I would say Z-Index. Wouldn't be too smart with snapshot's would it? A lot of data to transmit between the players.
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

@zick: We are drawing all pieces of equipment over another each frame. Combining all the spritesheets first, caching the result and using the resulting spriteset would be faster as we would only need to blit one image per character instead of up to seven. But doing so would have one major drawback: We would lose the flexibility to animate every single piece of equipment individualy.

The headgears we are using currently have only five frames, for example (front, back, left, right, dead). The reason is that they don't need an animation sequence for walking, attacking and so on. It is sufficient to change the offset a bit.

Another posibility would be equipment with more or less animation phases than the player set. Our walking cycle got 6 animation phases. A lazy artist could create equipment with only 4 or even less animation phases. In case of baggy equipment where nothing "sticks out" he would have good chances that noone would even notice. On the other hand a more diligent artist could create even more animation phases to make the animation of his equipment sprites look even smoother.

It is also possible to have equipment pieces with an own idle animation. I could imagine magic equipment with a pulsating glow even when the player is just standing around.


@BadMrBox: All this works client-sided. There are no graphics that are transfered between server and client besides the updates. The server tells the client how to draw a character by sending it some numbers. How to interprete these numbers graphically is up to the client.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
BadMrBox
Warrior
Warrior
Posts: 281
Joined: 10 Mar 2005, 15:05
Location: Sweden
Contact:

Post by BadMrBox »

@BadMrBox: All this works client-sided. There are no graphics that are transfered between server and client besides the updates.
Yeah, I know. I was just reflecting on the snapshot thingy.
Image
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

ok, well this is why i'm asking:

i was thinking that right now you can get away with it because the graphics are rather low key (snes style) which is what you at the mana world are going for. but you are making this so that other people can create there own games too at some point in the future, so right now it seems a little near sighted (no offense) to limit graphics that way. even though there is support for alpha channels no one seems to use them. maybe that's just the artist's fault, maybe they don't know about those.

now take a look at this:
Image

it's a simple sword with 4 colored regions, but note how colors blend between regions of opposing colors. you can't programatically change the colors of this image as easily as a pixelated sword (any of the stock artwork used now). but i would propose some kind of standard for how artwork is separated and "stacks" and then all artwork be changed to stock black with an alpha channel and then be recolored programmatically.

like think of hair, hair will be a base color and maybe a hilight and lowlight color. separate that into 3 images and color on the fly. i do this frequently in photoshop using a shape layer and a layer effect, it's sorta the same thing.

or is this too much to think about right now.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

Recoloring automatically is on the todo list for quite a long time. Just noone got around doing it yet: http://mantis.themanaworld.org/view.php?id=41

It isn't as difficult as one might think. It isn't even necessary to change anything at the current graphics. To change the colors take the RGB value, convert it to HSV color space, change the hue (to convert only specific colors of the image only change the hue when the original hue is in a specific range) and convert it back into RGB. During all this you can leave the alpha channel as it is.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

okay i tried messing with this in photoshop ... i took my sword and messed with HSL values and could only alter the hilt and darken/lighten the blade to a darker/lighter grey. but what if i want a blue blade or a red one. i'm not sure if your method will allow that. i know my method would work but is it feasible from a programmers point of view. it means a little more work for the artists (which i'd like to become at some time possibly) but i think in the end it will yield a powerful result.

also, i added all the layers so you can see the separation:
Image
Image
Image
Image
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

zick wrote:okay i tried messing with this in photoshop ... i took my sword and messed with HSL values and could only alter the hilt and darken/lighten the blade to a darker/lighter grey. but what if i want a blue blade or a red one. i'm not sure if your method will allow that.
Changing the hue of grey has no effect because grey has zero saturation. Please read up about our plans on this forum or the wiki. A prototype testing application has also been developed at some point. (start with that link Crush gave you).

Anyway I think stacking and recoloring are different techniques that may even be used in parallel.
Post Reply