The Daily Click ::. Forums ::. Klik Coding Help ::. Flowing Water
 

Post Reply  Post Oekaki 
 

Posted By Message

Jarzka



Registered
  26/12/2003
Points
  270

VIP Member
29th July, 2006 at 15:48:28 -

I have seen many interesting things made with Clickteam products. But there is still one thing I have wanted to see for years; Flowing Water.

I think it would be easy to make Flowing water where every pixel is one drop (like in old caveflying-games). But that engine would be very slow.

So I'm asking you: does anyone have flowing water engine or is there any way to make some?

 
n/a

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
29th July, 2006 at 15:53:06 -

Phizzy made an interesting water effect the other week I do believe.

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
29th July, 2006 at 16:19:44 -

Visit both DailyClick and Clickteam's forum, and you'll find much more as far as tutorials, examples, and support.

http://clickteam.com/center/showflat.php/Cat/0/Number/7319/page/0/fpart/1/vc/1

PS: You need MMF2 to do it, because it uses Lua.

Image Edited by the Author.

 
http://www.facebook.com/truediamondgame

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
29th July, 2006 at 22:28:52 -

Image
Not sure if this is what you ment, but if so, here.

 
http://www.facebook.com/truediamondgame

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
30th July, 2006 at 10:30:01 -

i suppose it's entirely possible if every droplet was quite blocky. like an 8x8 block or something.
maybe pinball movement (MMF2) could help you there?

 
.

Jarzka



Registered
  26/12/2003
Points
  270

VIP Member
30th July, 2006 at 10:56:58 -

Hmm, I didn't really meant the water like that. I can't descipte that very well, but here is the screenshot:
http://fi.wikipedia.org/wiki/Kuva:Wings_screenshot.png
I mean the water like this. As you can see it can flood/flow/what ever

Image Edited by the Author.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
30th July, 2006 at 14:18:15 -

Thats what i thought you meant,

i'm sure there are programming tricks to get this kind of effect, however i don't know it or how to port that into MMF.

 
.

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
30th July, 2006 at 14:26:51 -

Um... it almost looks like you could just use one active object...

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Werbad



Registered
  18/09/2002
Points
  235
30th July, 2006 at 15:37:25 -

Not really... The water must act like water no matter what kind of surface it colides with... But if you just want that waterfall and nothing more a single active works, but i don't think thats what he wants

 
n/a

Jarzka



Registered
  26/12/2003
Points
  270

VIP Member
31st July, 2006 at 13:50:29 -

Single active would be good, but, as I said, very slow in MMF 1.5 engine (don't know about 2.0).

Anyway 1000> actives in one frame is never advisable.

Image Edited by the Author.

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
1st August, 2006 at 09:08:33 -

Think.

Your level design, in general, is not going to change at runtime. At least, not drastically.

Since this is the case, you don't need to make a waterfall act like running water. Just make it *look* that way.

A nicely convincing system I've used before is just to have a single blue circle (32x32). Give it a path movement, and trace out the path of the water. Use nodes sparingly, so only use a node when the water is coliding with something (e.g. a node at the top and bottom of a waterfall, but NONE in between).

In the events, create a copy of this object every 0.10 seconds or so. The result will be a stream of large watery blobs. These define the basic body of the water. Make sure that when the water reaches a certain position (e.g. a pool at the bottom of the level), it is destroyed. This way you can keep object count down to about 37.

When the player is overlapping a blob of water, you set its semitransparency ratio to 64 (50%). When the blob reaches a node in its path, you set semitrans back to 0 (0%) so that it's totally opaque again.

This has the effect of making the water look thinner when it collides with the player, as if it's parting.

Then, make some smaller water droplets. These will be sprayed as particles (use pingpong movement) when the player colides with the water. You can also spray them at specific places, like when the water is splashing into a pool, for example.

Make sure that the particles die on colision with one of the large water blobs. Also give them an age limit (always add 1 to Alt Val A. If val A > 100, destroy). This keeps numbers down.

Then if you have MMF2, make sure the water is on a layer behind everything else. This will let you put it behind backdrop objects.

 
191 / 9999 * 7 + 191 * 7

Jarzka



Registered
  26/12/2003
Points
  270

VIP Member
1st August, 2006 at 10:12:46 -

But what if my terrain is desctructable like in many caveflying games :/?

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
1st August, 2006 at 10:54:12 -

Then u've got more of a problem. U may be able to build alternative paths, but that's hard. My suggestion would be to make sure that any waterfalls are always in areas where the ground CAN'T be destroyed (e.g. pouring onto the hardest kind of rock there is).

 
191 / 9999 * 7 + 191 * 7

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
1st August, 2006 at 10:57:39 -

Those falling water algorithms are pretty CPU intensive... I suggest you try looking around on http://fallingsandgame.com/ .

EDIT: there's no MMF or anything there, but plenty of people whi know the physics behind pixels falling like water.

Image Edited by the Author.

 
Old member (~2004-2007).

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
21st August, 2006 at 18:31:23 -

a more simple option would be to have a bank of hidden objects and have them all " shoot a droplet in a random direction from say.....three. then when the droplets hit the surface have them change direction with regards to the slope of gradient of the surface. i know it's primitive but it will give you a similar result to that which you are trying to get

 
n/a
   

Post Reply



 



Advertisement

Worth A Click