Water Trail

Get help using Construct 2

Post » Mon Aug 12, 2013 10:01 am

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!
B
1
Posts: 6
Reputation: 162

Post » Mon Aug 12, 2013 10:07 am

What you want is basically the same as a character-trail. There are many postings on the forum about it.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Aug 12, 2013 10:36 am

Some examples of trail effects HERE.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
129
S
29
G
75
Posts: 5,145
Reputation: 53,195

Post » Mon Aug 12, 2013 7:26 pm

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?CecilDraten2013-08-12 19:30:14
B
1
Posts: 6
Reputation: 162

Post » Tue Aug 13, 2013 1:14 am

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





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. CecilDraten2013-08-13 01:34:02
B
1
Posts: 6
Reputation: 162

Post » Tue Aug 13, 2013 5:31 am

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:)
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
34
S
13
G
8
Posts: 317
Reputation: 7,668

Post » Wed Aug 14, 2013 7:51 pm

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.
B
1
Posts: 6
Reputation: 162

Post » Thu Aug 15, 2013 5:03 am

@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 =)
B
43
S
12
G
6
Posts: 446
Reputation: 6,797

Post » Tue Aug 20, 2013 10:03 pm

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!
B
1
Posts: 6
Reputation: 162


Return to How do I....?

Who is online

Users browsing this forum: repkino and 2 guests