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 & Terrain

Author
Message
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 9th Jun 2003 09:11
I thought I would just ask a quick question. Water, how do I make water where I can swim in it & do things like water will allow?

I want to make a few games, with some islands in it, but I want it so the players will have to swim across the water to get to islands & stuff.

I also want the water to be as detailed as possible, so I can have multiple water depths. I belive if you look at a tropical island, you will know what I mean. Near the sand, its just like water that poors into a glass, then down from the sand a bit, its teal, then down from the teal, its light blue, then down from the blue, its dark blue.

Is this even doable in DBPro or DBClassic? I have DBPro & I want as much detailed scenery as possible, without much undetailed scenery, for all of the game. Dont worry about having a huge world, as I plan to make multiple little worlds & connect them either via wall, or some kind of teleporters (possibly a gate warper for my levels.)

I think it is now time to cue levels from0 Phantasy Star Online(PSO), but I dont have any on me, so I wont post them. If you have the game for the GC, go to eppisode 2, 3rd level, Forrest stage 1&2 for something similar to what I want, in the meantime, I will try to find a pic of the Level of Detail(LOD) I need, for the game.

For those who have PSO for DC, you couldnt possibly know eppisode 2's LOD, as the detail level on 2 is higher than Eppisode 1. On GC, eppisode 1's worlds are just taken from DC version, Eppisode 2 is much better. ^^"

Water reflections would be a nice thing, if they are possible too, but they are not needed. All I want is fake mirroring with lots of water effects, so that the player is like a huge thing of raindrops.

That raindrop effect thing would be nice too, if possible. I want realtime weather, so I can have things going on at all times, but I need raindrops, before I can try anything out, not to mention the water itself.

Is any of this making sense to any sense to any of you? If not, im sorry, I am really fatigued, I just had a long week at work, not to mention staying up all night Friday night, so I am still tired. If you need more detail's on what I need, please ask.

Now, for the last thing that I need help figuring out. Lets say I have a bush, & I want, while the player is walking through the bush, for the bush to make some kind of particles or something like leaves falling then dissapearing when they hit the ground, how would I do that, not to mention playing a custom sound.

Thanks,
The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
Oliver
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Switzerland
Posted: 9th Jun 2003 12:43 Edited at: 9th Jun 2003 12:51
Water is a very interesting topic
There are a number of ways to go about it.

Matrix
You could use a ghosted matrix, with an animated water texture, and make the matrix move up and down like waves. Add another matrix for land. By ghosting the water matrix it becomes half transparent, and the deeper the land matrix is under the water matrix, the darker it is (i.e. quote: its light blue, then down from the blue, its dark blue). There is a good example in the DBPro, and DB help files. Though this method has many limitations, such that you can't do reflections, and other nice effects.

Model
You could use a 3d model. Though this is harder to make it move up and down like waves (you would have to use memblocks, or animate it in a program like milkshape). Though you can add nice effects like different transparencys, reflections, and cartoon shading can give a nice oily effect. You can also add vertex shaders to 3d models, like water effects, ripples, lighting on the floor below...(though I dont really understand vertex shaders.)

In conclusion, matrix's are easier, though in theory you could get nicer effects from a 3d model.

Now to be able to swim in it you can use get matrix height for matrix's and object intersect for 3d mobjects. Then just position your character the same height as the water. You could also use curve value to add a floating effect.

If you didn't understand a word of what I said, then check out the examples that come with DBPro in the help files:

Click on-
Examples/MATRIX EXAMPLES/Matrix Showcase

And there is a nice example in DB called "jetski", showing how to position an object and tiliting it to the water.

Bushes
use the if object collision(character,bush)>0 then play a sound, and a particle effect.


-Oliver
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Jun 2003 12:47
nice reply oliver, you saved me a another 15 minutes of my life that ill probably waist innefeciently like watching adds or staring at the wall or failing to type slow enough so i can see my typos.

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Jun 2003 17:16
Hey you stare at the wall too?! Lol For water, I would suggest one of the things oliver said, and use object collision to see if your person is in fact IN water. Then you can add in all the cool particles for splashes and stuff

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 9th Jun 2003 22:34
So what you are saying is, I should go the model route if I want more detailed water? I do plan to use proper pysics in it, so that if you are wearing armor, you will sink instead of swim. I see too much in RPG's, where you have a full suite of armor, & you can still float & swim.

So I wish to include a weight limit, or 2 weight limits so if the player has less than the first weight limit, he can swim, if he has over, he will sink & walk on it just like land, but he will run out of oxygen.

So, if I go the model route, do I make one model of a wave or do I have to enclose the entire water? I want to make it so you can see out of the water & in it, but I am not sure quite how to go about making it properly, can someone advise?

Thx,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 10th Jun 2003 00:42
I'd just make the surface, then do some light trickery when the camera is under the water, make the ambient light blue or something. Water is generally flat, so you can do single value height collision to determine whether the player or camera is beneath the water. Use a variable to determine whether the player can sink or swim, then make them collide with the water appropriately.

Once I was but the learner,
now, I am the Master.
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 11th Jun 2003 09:10
Hey, great, thanks for the help guys, I take it TheDarthster wrapped up the few remaining questions, so on to make the first area, perhaps, if its not too much more trouble, is there a way to determine where the player will spawn on the map?

I want to make an area similar to Morrowind, you are on this huge continent, which is made up of smaller maps. Each map is connected so that if you walk over the map at a different area, it takes the last position on the edge of the map, & on the new map, you spawn at the same point as you left on the other map, just at the different edges, creating one huge world, out of many little worlds. Is it possible to do this in DBPro?

Thx,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
CarlTaylor
21
Years of Service
User Offline
Joined: 13th Jan 2003
Location: United States
Posted: 12th Jun 2003 00:32
it is very possible. your program can check the location of the camera, and if it is close enough to a new "little world" it will load it so you can walk there, and if you get far enough away from little worlds you have already loaded, it will delete them. one problem with this method is that if you are battling right on a border between worlds and you keep crossing it, you will constantly have to pause the battle to load worlds.

baseball = life
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 13th Jun 2003 02:14
Great, thanks, I will get to work on designing my game, so it looks cool. Perhaps, I can make little models of fish & stuff swimming around beneath the water, for added realism.

Ill try & post screenshots of the levels, to see what you guys think at some point, if I get somewhere with them.

Thanks again,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 13th Jun 2003 05:28
1 question how do you make a matrix move up and down like water?

Yuri
21
Years of Service
User Offline
Joined: 12th Jun 2003
Location: Italy
Posted: 13th Jun 2003 13:35
I agree with the matrix usege... 2 matrix 1 for the land and another (ghosted) for the sea.
to obitain the transparent-lightblue-blue-darkblue effect you could use appropriate textures on the terrain matrix that are under the sea level.
another way is to use fog, when under the sea level you could use a dark blue fog near the camera

think it should help..

CBMZone main administrator
http://www.cbmzone.com
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 14th Jun 2003 00:22 Edited at: 14th Jun 2003 00:23
Hmmmm, on the matrix idea, is it possible to use multiple matrix's, for different colors or different areas? Something like, I have one matrix that goes a little down, then does a deep cutoff, so another can join right next to it or something? Or, how would I go about doing Oliver's idea?

Also, on the player position, is it possible to play a custom animation, if the player is near the top? I want that raindrop effect, but im not sure if its possible on a ghosted matrix, is it?

And ifcfan has a good question, how can you make matrixs act limke waves? And, I have something to add onto it. Is it possible to add an animation to a matrix? I want an animated effect for the top, but im not sure if I can do this, can someone assist futhermore?

Thx,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 14th Jun 2003 01:11
The problem with ghosted matrices ( at least for me ) is that objects half sunk or sunk in water get hidden..ghosted plains do better but you cannot "wave" them like matrices unless you make memblocks and manipulate the vertices ..
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 14th Jun 2003 07:27
Ghosted Plains? Can you please explain?

Thx,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 14th Jun 2003 09:30
make object plain Objnum,xsiz,ysiz
ghost object on Objnum

In thoery its only two polys so its only ok for ice or flat water unless more plains were used,better yet load an xfile with the correct polycount and memblock the vertices.

GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 16th Jun 2003 00:00
If you want the water to move up and down like the tide is coming in and going out and you are using a ghosted 3-D object or plain then try something like...

position object [water#],0,(sin(timer())*[crest - trough])+[average water level],0

crest being the top water level and trough being the lowest water level...so it would look something like this...

position object 1,0,(sin(timer())*10)+50,0

this will simulate tides... but not waves... and if you are using a ghosted matrix replace [position object] with [position matrix]...also if you want multiple water layers make multiple ghosted objects or matrices and position each layer slightly below the layer above it... well... i hope this helps and good luck with your game...

Anyone Can Destroy...But Few Can Create...
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 16th Jun 2003 08:14
Ok, thanks guys, I will get to work on making my level checking out the possiblities.

Thx again,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)

Login to post a reply

Server time is: 2024-11-24 16:26:15
Your offset time is: 2024-11-24 16:26:15