Page 1 of 1

Walking on water

Posted: 17 Dec 2007, 20:10
by paradoxfox93
So I was reading in Wiki about how they would like to see a swamp of some kind. More specifically about ow maybe it could be some kind of marshy area we could walk through. If this were designed, how could we create the effect being in the water without drowning or 'walking on water'? I thought maybe some kind of fixed map ambient effect that overlayed only half the charecter sprite. I this possible in eAthena or would it possible with TMWserv?

I'm asking because I was thinking about the same thing in a cave, some water monsters and such in a walkable water area. Just a thought.

Posted: 17 Dec 2007, 20:43
by Crush
As long as the water areas only affect the graphical representation and not the gameplay in any way it is a purely client-sided thing and as such doesn't affect the server. So it could be done on eAthena.

I already thought a lot about how this could be done, but it is quite difficult from the technical point of view. Mainly because the player character is not one graphic but a collection of graphics which are all animated and drawn separately.

Posted: 17 Dec 2007, 21:03
by Jaxad0127
It could be done with extra-height tiles. The fields north of Hurnscald have that effect.

Posted: 17 Dec 2007, 21:36
by Crush
It would look strange when the sprites move vertically.

Posted: 17 Dec 2007, 22:19
by Jaxad0127
In many engines, a partial transparency is given to the sprites in the appropriate area to create the effect. We'd only need to add a way for the mapper to specify it.

Posted: 17 Dec 2007, 22:22
by Crush
Doesn't work for TMW because a player character consists of multiple sprites that are drawn one after another. When you would make the pants sprite transparent you would see the naked legs under them.

Posted: 17 Dec 2007, 22:52
by Jaxad0127
We'd have to do the transparency for all the sprites. Alternatively, the sprites, once finished, could be compressed into a single image and then the transparency applied. Or the transparency could be done on the map tiles.

Posted: 17 Dec 2007, 23:14
by Modanung
A solution would be to merge all layers the player consists of into one before drawing it. That way we could edit the transparency of the sprite (certain ghost/teleport effects could use this) or partially (for walking through water or grass).

Something that may be a better idea is to add a sprite over the player with either grass blades or water ripples/splashes that animated and moves with the player. A bit like in Zelda: A Link to the Past... like so:
Image
These could be recoloured for different water/grass types.

Posted: 18 Dec 2007, 00:42
by Jaxad0127
That would definitely look better, and would probably be less expensive to produce. It would be good if we could add it to the monsters as well.

Posted: 18 Dec 2007, 17:22
by Jaxad0127
A way to implement this in the maps would be to add a tile set with tiles 0-(number of these allowed per map) that would be placed on a map layer. I think we should use the collision layer for this because this way we don't need more layers and it doesn't make sense for a tile to not be walkable and have one of these effects. Then in the map properties, there would be a property for each number used with the name "walkingEffect#" (or something similar) and the value being the animation file to be used on those tiles.

Posted: 21 Dec 2007, 13:02
by Rotonen
Also some particle effect induced splashing would be nice.

Although I cannot imagine the sprites which to attach to the splash particles and I have been thinking about this a lot.

Any suggestions or examples?

Posted: 22 Dec 2007, 01:46
by Modanung
Well I think the sprite should be there to mainly hide the part of the player that is under water or hidden behind grass or snow. The particles should just make the effect better. Water splashes, a flower once in a while and bits of snow.