Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Water Effect using a Matrix - dbpro

Author
Message
Bad Monkey
17
Years of Service
User Offline
Joined: 1st Jan 2007
Location:
Posted: 7th Apr 2007 05:13
This is a water effect using a dbpro matrix, and the various commands.



Have fun!
JosephB
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 7th Apr 2007 19:55 Edited at: 7th Apr 2007 20:57
Nice. I tried to optimize the SetMatrix function a bit and provide for greater random starts for the x/y positions in the createMatrix function as follows:



Others can probably do more, but I wanted to try a little.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 8th Apr 2007 00:56
Cool. Here is my attempt. Click to start a wave.


Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 8th Apr 2007 02:29
Andrew, why are you so god-like?

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 8th Apr 2007 16:29
Lol! Well thank you very much! Glad you liked it.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 8th Apr 2007 21:59 Edited at: 9th Apr 2007 01:11
@TEH_CODERER (Andrew): Oooooh fancy! I like the normals you tossed in there. Shiny

Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 9th Apr 2007 00:24
Andrew wins

I am awesome and always right.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 9th Apr 2007 09:23
Quote: "Andrew, why are you so god-like?"


couldn't have phrased it better

He is seriously good at maths and coding...

-- game dev is fun...but taking up too much time --
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 9th Apr 2007 11:32
Lol! Thanks guys but I wasn't going for a competition. I was just hoping someone might find it useful or can possibly learn something from it. There isn't anything complex in there plus I realised I've left some redundant lines in there which I was using whilst messing around. Oops! However, something you can try, which I already have somewhere [*scans HDD without success*] , is to either make it rain and let that start off some ripples or too start off some points at high or low positions and then you can have a nice ocean effect going on.

filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 9th Apr 2007 23:16
tried setting the waves in a resonance (nope...not through coding..I am hopeless with that!)

Just click everytime the wave center reaches a peak. The wave keeps getting bigger and bigger (till I can no longer see it's peak and then I mess up the clicks and it gets chaotic)

-- game dev is fun...but taking up too much time --
TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 10th Apr 2007 14:50
I've Modified TEH_CODERER's example to produce a raindrop effect...
Change the

To the following...

I'm now wondering if it'd be possible to grab the output as an image with shadows etc. to texture a large plain as a false 3D effect...???

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 10th Apr 2007 17:04 Edited at: 10th Apr 2007 17:04
You mean like this?

Clicking:


TinTin's rain version:


TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 10th Apr 2007 17:20
Sorry for double post but just had an idea.
Move the box with the mouse. This is an example of how you culd make the water ripple based on a character or characters wading in it.


Samuel
19
Years of Service
User Offline
Joined: 4th Sep 2005
Location: Pluto
Posted: 27th Apr 2007 01:04
Sorry for "reviving" topic, but... i edited TEH_CODERER new code and i maked it more "cool"



I really, LOVED the original water code =D

Uh....

Login to post a reply

Server time is: 2024-11-22 18:33:25
Your offset time is: 2024-11-22 18:33:25