Water Splash on Screen

For questions about using Classic.

Post » Fri Mar 12, 2010 7:08 pm

I'm trying to make a cool effect where water can be splashed onto the screen and look like it is evaporating or sliding down the glass (the glass of your screen like you are looking through a camera). You could also make it red to look like blood. I've tried a whole bunch of things with effects but they seem to slow things down and don't even look quite right. I'm not ever sure how to go about figuring out how to make it and I'm a novice to this sort of fancy stuff. If anyone wants to try to come up with a method or just give me some direction, I'd appreciate it. I know quazi did something similar with his Whine engine blood splatter if that helps.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Fri Mar 12, 2010 9:45 pm

It can probably be done by making a raindop object and have a lot of them and add a bunch of behaviors to make the raindrops unpredictable. I did a background full of stars which change sizes just doing the approach of many multiples of an object.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Fri Mar 12, 2010 11:41 pm

Lots of sprites = slow. I went with a particles thing.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Fri Mar 12, 2010 11:49 pm

[quote="Mr Wolf":2xwz1tef]Lots of sprites = slow.[/quote:2xwz1tef]
I won't argue with that... but a mid-range computer is fast enough to run 4,000 stars at 60 frames per second on Construct, without much sweat.

*According to my experience.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Sat Mar 13, 2010 12:05 am

Hehe, I wrote the same thing for the railway simulator Trainz about 5 years ago now.

Sprites are the way to go, because you don't need more than a couple dozen of them hitting the screen at once to get a realistic effect.

http://img10.imageshack.us/img10/1536/weatherwe.jpg

I simply took the resolution of the screen that the user was running the game in, took a random position from that width and height, and placed a nice semi-transparent blob of rain on the screen, making it slide down the screen and fade out as it went.

The timing between each initial creation is up to you (can't remember exactly how I decided to do it, but it was probably every half second), and once you have your maximum number of raindrops, just keep checking the number of objects every half second, and create a new one every time the number drops below your maximum.
The old drops are destroyed when they've completely faded out, which makes room for each new one to be created.

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Sat Mar 13, 2010 12:41 am

What graphics card and CPU do you have?

Edit: Sorry, Krush's post wasn't there at first. I mean True.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Sat Mar 13, 2010 1:10 am

[quote="Mr Wolf":9k0qu23z]What graphics card and CPU do you have?
[/quote:9k0qu23z]
This game which I made uses 4000 star objects in one room: http://gamejolt.com/freeware/games/arca ... pace/1733/

If it runs smoothly for you, your computer is fast enough.

My computer is above mid-range, but it can run the game hundreds of frames per second.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Sat Mar 13, 2010 6:29 am

[quote="thetrue":1hsc3flu][quote="Mr Wolf":1hsc3flu]What graphics card and CPU do you have?
[/quote:1hsc3flu]
This game which I made uses 4000 star objects in one room: http://gamejolt.com/freeware/games/arca ... pace/1733/

If it runs smoothly for you, your computer is fast enough.

My computer is above mid-range, but it can run the game hundreds of frames per second.[/quote:1hsc3flu]
Yes, I can easily run that, but that doesn't necessarily mean throwing thousands of sprites on the screen to make an effect is always a good idea. Especially things more complex than expanding circles while there's all sorts of other game stuff going on at the same time. Also, when you use that technique, you can't really use shaders because it can slow things down a lot. I also need things to be semi-transparent. So, um, the lesson is that it depends HOW you are using the objects too, not just that you can have X number in X scenario. What I'm doing is much fancier and therefore tougher to do without slowdown.

Anyway, I have something working now without tons of sprites. Thanks for the help guys. Nice picture Krush. What I'm doing requires a LOT more drops on the screen as a one time splash and then all of them fade pretty quickly, but your method looks perfect for when I need not as many but hitting the screen continuously. I'll probably use that in another effect I want.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Sat Mar 13, 2010 11:46 pm

http://dl.dropbox.com/u/529356/TempPics ... latter.cap
v0.99.84

Just posting my take on it. It's not perfectly how I envisioned it, but it's close. And yeah I could probably optimize it a lot but this was just a rough draft proof-of-concept type thing.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Mar 14, 2010 3:07 am

Cool effect, Deadeye! It actually let me open it in 99.82 for some odd reason. The frame rate was always about 30 (even when the effect was not on screen) but that could be because I ran it in the wrong version of Construct. I'll have to get the newest version and try it out again.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests