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.

Newcomers DBPro Corner / water effects

Author
Message
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 9th May 2003 20:43
ive created an island in magicworld and loaded it , ive wanted to create water but i dont know how ? , i know the i need to use the command make matrix and texture it but i cant get the right size ,
and i cant position it ,,.. and the other thing is , after i make the water is there a way to make some kind of effect that its gonna seen like they moving ??
sicjoshsic
21
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 9th May 2003 20:52
the way i do it (and im a newbie so there is probably a much better way) is to make a matrix the same size as the first matrix, the SET MATRIX GHOST ON (water matrix number) (i think that that's the command) and in the main loop of your program put RANDOMIZE MATRIX (water matrix number),1 : UPDATE MATRIX (water matrix number)

Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 9th May 2003 21:26
Sorry.. I reallly hunted hard for a code snippit i remember trying in the code snippits forum.. maybe you can find it, i couldnt :/ (we need a board search button!)

Basically, randomize matrix / update matrix is NOT the way to go. I was experimenting with water not to long ago, this makes for very jerky and rather horriable looking movement. You need much smaller variation in the matrix points for a nice smooth water.. like I said, there is a snipit demonstrating it perfectly on these boards somewhere, i just cant find it :/

But there should be more to it than simply moving the points around. What happens if its a calm day and theres next to no waves/ripples in the water? There still has to be some sort of waterflow.. the best thing you can possiably do is probably animate a texture. This is, after all, how water is done in say a 2d tile map - and some of those 2d games have sweeet looking water Zelda - Wind Waker uses an animated texture for its water too as you will find if you sit there and study it for a minute. If you manage to knock up a good texture for this you wont even need to touch the matrix positions really (although we all like too.. everyone likes a nice ripple effect XD)

I wish I could give you the source to do everything im talking about, but whereas I have been programming a while im still relitivly new to dbp. the best I can do is a suggestion

heres some psuedo-type code (ie, this is not real code and wont compile, but it should give you an understanding of what i mean):



that should do it.. this is all based off my experiance working with 2d (i have 2d tile maps coming out of my ears >.> and i know it isnt *extactly* what you were looking for, but if you combine this with some fine matrix manipulation then you could indeed have some of the finest water going

someone suggested ghosting the matrix. its a good idea! i did this when i was messing with water, it allowed you to see like a floor through it, so you could make like a sea bed or something, would look sweet.

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 9th May 2003 21:55
i never made a game with water but you could SIN wave the matrix like this:

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 10th May 2003 00:38
the jetsky demo ( DBC) has that effect..not sure that s exactly what you are looking for..
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 10th May 2003 15:14
ya this is were i saw it ! the binary moon game ,, !

Login to post a reply

Server time is: 2024-09-20 08:03:53
Your offset time is: 2024-09-20 08:03:53