Water Trail

0 favourites
  • 9 posts
From the Asset Store
Water surface simulation. Easy to use and realistic.
  • Hi,

    I would like for the player (a water drop character) to be able to make a water trail as they move around the layout and have that water trail start to slowly evaporate after 5 seconds from one end to the other, but I don't know how to go about it.

    The trail would need to be seamless as it evaporates from one end to the other. The player will be able to move in all 4 directions and the trail can overlap if the player crosses over the same water trail. I'm thinking the trail can be 12 tiles long? There will be a flame character too, but I'm thinking it'll be handled the same way.

    Anyone have any good ideas on how to execute this? I did a quick search in the forum for an answer, but I couldn't find anything that solved my problem.

    Thanks in advance!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What you want is basically the same as a character-trail. There are many postings on the forum about it.

  • Some examples of trail effects HERE.

  • Thank you for your replies, LittleStain and zenox98. The examples are great, but I'm new to Construct 2 and I'm not really sure how to modify the examples zenox98 was nice enough to link to.

    My game is a grid based puzzle game and the water trail needs to be present at all times under the player, and be transparent enough to see and interact with other sprites the player walks over or next to, so overlapping sprites used for the trail in the examples won't work, because of the transparency. I don't think a particle trail would work either, because I think the objects used overlap too? Not sure about that.

    What I'm asking for really is ideas or theory about how it can be done. I'm thinking the player comes in contact with a new floor sprite on a grid, it creates a new water sprite on it. As the player moves along, the created water sprite starts a timer for 5 seconds, then changes to a sprite with an evaporation animation, then deletes itself once the animation ends. The water sprite also detects if it's next to another created water sprite and switches to a version of the sprite that makes the water trail look like it seamlessly flows together.

    Sorry if my explanation is hard to understand. I can see it clearly in my mind, but it's hard to put into words, and even harder for me to implement. I would be very grateful if I could receive some additional help with this matter.

    I'll experiment more with this on my own, but I feel like I hit a wall.

    Edit: Is there a decent image file hosting site I can use to post images on this forum? Maybe some sketches would help?

  • Here's the basic idea I had for the water trail. A friend drew these up for me.

    <img src="https://www.dropbox.com/s/6v2byg4bzhaiohh/flower-growth.png" border="0" />

    <img src="https://www.dropbox.com/s/0qrt0dop4w5jwmy/drop-grid.png" border="0" />

    <img src="https://www.dropbox.com/s/z9gxcliet8j728e/water-sprite-sheet.png" border="0" />

    I plan to use transparent PNG sprites for the water so you can see what is under it. The problem is that water needs to start to evaporate from one end to the other, but the sprites can't overlap because of the transparency and each sprite can't fade away at different intervals because it ruins the effect. I think each section of the trail needs to occupy one grid of space because it has to interact with other objects for the puzzle to work. Sorry if I'm repeating myself. I'm having a hard time explaining it.

    So I think what I'm trying to express, I need help finding a way to convincingly evaporate the water trail, while keeping in mind the current limitations.

    Edit: Hmmmm... The images are not showing up. If you right click on the broken image icon, copy the url and paste it into a new window, it should work.

  • It may not be what you want but

    The Simplest way I use is to..

    Assign a FADE Behaviour to the 'Water Trail' Object..so that when each one is created/spawned.. it has a small delay and then fades out.

    You should also put a "Destroy after fade out" check on it or you will eventually have thousands of spawned water trail objects all invisible taking up memory:)

  • Thank you, mystazsea. I've experimented with that method, but I'd like to have a gradual fading of transparent water trail, instead of large sections of the trail fading at different times. I'm hoping there is a better way, but I can't think of it on my own. If you have any other solutions, I'd love to hear them.

  • CecilDraten In my experience the absolute best you'll get with construct on this matter is like they've already told you to:

    make the player spawn the "water trail object" "every x seconds" on self(x,y) with a fade behavior. Remember to use dt time for better performance.

    play with it, with enough water trails per cycle it will look pretty neat.

    Understand in advance that games use graphic resources to represent reality. Specially with a game engine like construct, that is better suited for casual games =)

  • Thanks, Sargas. I've been playing around with it, and it's functional, but not what I'm looking for. The sprites are 64x64 and I either have to make the evaporation fade too fast in order to make your solution look good or make the fade too slow for the pace of gameplay I want. I'll probably just end up animating it by hand. That's a lot of frames of animation, but looks like my best option.

    Thanks again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)