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.

DarkBASIC Discussion / Water Matrix

Author
Message
Jobyman
21
Years of Service
User Offline
Joined: 17th Mar 2004
Location:
Posted: 5th May 2004 22:29
Anyone know a good way to do this? I looked at the jetski code and its not great and kinda slow. Does anyone know a good way to make water effects?

Thanks

Everyone is a comedian...
Jobyman
21
Years of Service
User Offline
Joined: 17th Mar 2004
Location:
Posted: 7th May 2004 00:26
Guess not then. well i have another qwuestion. If i want to make a sea and some islands. Should i make 2 matrices taht overlap or should i just tile some of the tiles with the earths texture and stop them from moving? I suppose 1 matrix wil probably be better for the FPS but i dunno...

Everyone is a comedian...
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 7th May 2004 00:32 Edited at: 7th May 2004 00:45
hmmm if you want more FPS...I suggest you use only one matrix, but for the water, the code will need to be modified, but if your game is gonna run in fast PC's or you want higher detail, you can use 2 matrixes: one for the land, and other for the water (ghosted if you want), so the earth matrix can be textured (for example) grass above the water and dirt (yeah, some blueish dirt) in the tiles that are below the water to add some realism...it's just thing of FPS and detail...

EDIT: oh, in the codebase and the code snippets forum there are some water codes out there...I've seen one using RND (or RAND, can't remember now) for setting the water height...mmm something is going on my head now...I'll write something here and in some hours perhaps I can do you an example or perhaps someone can make an aexample out of it...

Thing going on my head (IT WILL NOT COMPILE, I don't have DB here right now, but perhaps you'll get the idea...:


well...I hope this let you to do somewhat like I mean...what it does is slowly setting the height of the tiles of the matrix instead of randomizing it each loop.

I hope this'll be useful to you

-DARKGuy

:: Pentium 300 Mhz, old 8Mb video card, 64Mb RAM, 5 gb & 1.6 gb HD's, W98 SE, Sound Blaster AWE 32 ::
Jobyman
21
Years of Service
User Offline
Joined: 17th Mar 2004
Location:
Posted: 7th May 2004 21:58
hmm. kidna confused by that. But i soent some time today working on the water code, trying ot write my own and it works. I tried the stuff on codebase but the DBPro examples i coudlnt use and the BD ones used the ranomize command asyou said and that just made teh sea shudder. But ive got it using sin and stuff. higher maths actually comes in usefull . But yea. thanks for the feedback.

Everyone is a comedian...

Login to post a reply

Server time is: 2025-05-23 14:39:03
Your offset time is: 2025-05-23 14:39:03