Game Development Community

Adding water

by Christopher Olson · in Torque Game Engine · 03/06/2006 (6:31 pm) · 5 replies

Hello all,

I've been working with TGE for a few days now, and so far the experience has been great. Tonight, I wanted to add some water to some of my terrain. I have searched high and low on these forums, on Google, and I've spent the better half of the last 3 hours attempting to add water to my terrain, with absolutely no results what so ever.

I click on the World Creator, I then click on the Mission Objects|Environment|Water, which gives me options for a water data block. I then click ok, and I see that the water block is added to my mission group, but absolutely nothing happens on my terrain, no water, nothing. I have saved and gone into the mission itself, but still no water.

I have found lots of tutorials on different ways to interact with water, but I have not been able to find any threads or information on how to actually add water to your terrain.

Any help would be greatly appreciated, posting here was my last resort, I wanted to make sure I exhausted all my options first, but I am just at a standstill now, I have no idea what to do next.

Thank you very much in advance for any and all help.

Sincerely,

Chris Olson

#1
03/06/2006 (6:47 pm)
Update:

I finally figured out the problem when I came across a pretty obscure post regarding a bug in 1.4. It seems that it was creating a very small water data block, once I upped the size I was able to actually see water.

This leads me to a couple questions:

1) Is there any way to manipulate the water blocks in the editor without manually typing in coordinates by hand?

2) I now assume that if I wanted to say, make a square canyon that was filled with water, I would have to create four seperate water blocks?


After 3 hours it's nice to finally see water, but any help with those questions above would also greatly be appreciated. Thanks much!!

Chris Olson
#2
03/06/2006 (8:47 pm)
Chris,
Somewhere someone posted a fix for the water axis gizmos, but I haven't been able to find it again. Here is what I *think* will fix it. In my waterblock.cc I just commented out:

// if(!mRemoveWetEdges)
// {
// setGlobalBounds();
// }


around line 399 and rebuilt.
I don't know what else it breaks, but I haven't had any problems after doing it and I can reposition the waterblocks with the mouse. Some people like not being able to drag the waterblocks, but repositioning it with the XYZ coordinates makes me crazy too! Hope this helps.

- Alan
Really Really Good Things
#3
03/07/2006 (6:49 am)
Thank you very much for your response, I'll be sure to try this out tonight.

And yes, why using the XYZ coordinates manually can be quite a fun trial and error game, I think using the gizmo would be a much easier and more gratifying task!

Once again, thanks!

Chris
#4
03/07/2006 (11:10 am)
"2) I now assume that if I wanted to say, make a square canyon that was filled with water, I would have to create four seperate water blocks?"

I'm pretty new at this too, but why would you need to make 4 blocks? Couldn't you just do one that covers the entire canyon?

Matt
#5
03/07/2006 (11:30 am)
You know, now that you mention it, I could make a very large water block, that would fill into the 'trenches'. Although there might be an issue.

For example, the below graphic might help explain what I am trying to do:

img307.imageshack.us/img307/3892/squarecanyonschema7fu.jpg


Now the sides of the above canyon are say at a maximum height of 30 or 40. Now if I place a waterblock that is of size 200 x 200, at a height of 20, the center of the canyon should hide the water from the middle section (assuming it is at a height higher than 20), while the empty canyon trenches on the outside would show the water.

The only problem is, since I can't dig down INTO the terrain (unless there is a way I can make terrain lower than a height of 0???), I would kind of have to increase the level of the terrain in the middle section as well (above a height of 20), so that the water wouldn't show.

In the sample I was trying last night, I was using the "Add Dirt" functionality to create the canyon walls, but I left the middle section at the default height. So it appears to make one large water block, I would have to increase the height of the middle section.

or.....

Make 4 long water blocks (one for each section of the canyon), and not worry about having to add any heigh to the middle section.