Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, AndrewAMD), 1,305 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
water vs earth #220917
08/10/08 19:28
08/10/08 19:28
Joined: Apr 2008
Posts: 17
S
slowglider Offline OP
Newbie
slowglider  Offline OP
Newbie
S

Joined: Apr 2008
Posts: 17
i want to make a digging simulater but now i want to know if there is water ore not because if you build a hill and you make a hole in it there is no water in the hole but out of there there is and if the water is rising the hill gets unter water so the hole to but if the water is getting down there is still water in the hole

now am i seaching for some algoritme, ideas, tips, code, enz.

i ones made my own but its was very heavy and not perfect

every help is welcome

slowglider

Re: water vs earth [Re: slowglider] #220984
08/11/08 08:25
08/11/08 08:25
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
what?


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: water vs earth [Re: Michael_Schwarz] #220993
08/11/08 12:12
08/11/08 12:12
Joined: May 2006
Posts: 90
England
TigerTao Offline
Junior Member
TigerTao  Offline
Junior Member

Joined: May 2006
Posts: 90
England
What I think he means is that he wants to find a way for when a hill with a hole on top is submerged in water and the water drains away, the water in the hole is left behind.

I can think of a 2D method but a 3D method could be quite complicated.

Re: water vs earth [Re: TigerTao] #221025
08/11/08 17:57
08/11/08 17:57
Joined: Apr 2008
Posts: 17
S
slowglider Offline OP
Newbie
slowglider  Offline OP
Newbie
S

Joined: Apr 2008
Posts: 17
yes tigertao is right i am not realy good in engilsh so thx

please post your idee mostly 2d can be don in 3d to because if you look from top view its almost the same

more ideas ore comments are welcome

Re: water vs earth [Re: slowglider] #221072
08/12/08 00:42
08/12/08 00:42
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
I think it's not the algorithm that causes a problem for 3D, it's the way you want to display it. The "graphic behaviour" of water can't be done as easy in 3d as you would do it in 2d.


Click and join the 3dgs irc community!
Room: #3dgs
Re: water vs earth [Re: slowglider] #221187
08/12/08 17:28
08/12/08 17:28
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
Alright, normally I would leave this kind of post alone but this idea really intrigues me. One question needs to be answered before I can really help you out though. What scale are you looking for. I think others were saying 2d and 3d are a big difference was because if you used particles you could do it easily. But only a small number of particles could be done this way before it got out of control and takes up all your CPU's power. So are we talking a small pond, a lake, ocean, what?

Also what kind of deformation speeds are we looking at here? If calculations need to be done quickly due to a large area being changed quickly some techniques can't be done.

Are you doing an RTS and doing a top-down view? Or are you just saying that for reference? Are you using a box or mesh for the water, or particles, or something else? Also how accurate does this need to be, does it just need to look nice or are we simulating real water here?

Based on what you said I'll give my best idea a foot forward. What I would suggest is if you are using particles all you need to do is give them some physics, tell them to fall until something obstructs them and bounce with a certain trajectory (according to what the normal of what the water contacts with) and that would solve your problem easily, however is computer intensive with massive volumes of particles.
Probably over a large area, if you aren't looking for super accurate results you could combine blocks of water with particles of water, I'll go into more detail:
You have a box that is serving as your water, this, for whatever reason you decide, is told to lower because of the water going somewhere else. Either a invisible box, or a bunch of rays will lower with the water to look for for obstructions for the water. You take water particles and bounce them off this obstruction for a small distance, if it hits water, it expands the water by a extremely small amount, if it hits land, it records the distance it moved, and bounces again, if it doesn't move a certain amount and hasn't hit water it creates its own water block of the water in the area. Every water droplet (particle) will either create its own water box or find its way to an existing block of water when it can't move anymore.
Things to watch out for: The water droplets "contribution" to the water supply it finds has to be really small. All the particles of water formed during a drop in the main water box has to have a smaller "contribution" then what is dropped by the main water box, otherwise an infinite loop will arise.

I really hope this is a main part of your game because unless your designing a small field to put this in (and can use the particle method), this could take up a lot of effort to make. Otherwise I suggest that unless you have a large amount of programming experience and want to do this on a large scale, this just isn't a smart use of resources for a minimal part of a game.

Good luck,
Trooper119


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: water vs earth [Re: Trooper119] #221194
08/12/08 18:21
08/12/08 18:21
Joined: Apr 2008
Posts: 17
S
slowglider Offline OP
Newbie
slowglider  Offline OP
Newbie
S

Joined: Apr 2008
Posts: 17
thx for your post

i want to make a 3d rts style dike(nl:dijk)creator simulater

the idea was to create a sort off logorithime that calulate when the see is going down and up

this hasnt be done every single frame but maby every 1/2 sec so you wont notice

i know that is is going to be very cpu heavy so i want to create somthing like 1km * 1km so the terain while be somthing like 1000*1000
my first try did use al my cpu whiteout any thing in my lvl because rts style cost alot of ai so cpu

i didnt want to use traces i have 2 terains above each other white the same size en vertex only differnet texure's
i use vec_for_mesh and vec_to_mesh to calulate the distance from each other

btw i didnt want to use pshycic because i dont like it

about the 2d:
if you do it like pic1 it could be easyer then when calutated then pic2

pic1

pic2

i was more looking for pic2

but now there the dijk is getting higher but the water stays the same even if i would drain everything below the dijk white a water pomp in to the sea(water)

slowglider

Re: water vs earth [Re: slowglider] #221218
08/12/08 21:14
08/12/08 21:14
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
For that particular issue, why don't you just lower the water? It should work just fine, my example was for creating puddles from a pre-existing large water body. If your just raising and lowering things, moving the water should work just fine. Why doesn't that work?


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: water vs earth [Re: Trooper119] #221351
08/13/08 16:24
08/13/08 16:24
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
When the water rises and it's level is above the "DIJK" (whts that?), does he want the water to flow over the "DIJK" and down the slope, onto the land?

So a sort of waterfall is created? I'd say particles is the way to go for that.

Re: water vs earth [Re: DJBMASTER] #221367
08/13/08 17:49
08/13/08 17:49
Joined: Apr 2008
Posts: 17
S
slowglider Offline OP
Newbie
slowglider  Offline OP
Newbie
S

Joined: Apr 2008
Posts: 17


this is before the player starts in the lvl


now the player has build a dijk (hill,somthing that make sure the water isnt getting to the other side) still the water is there


now the player has build a water pomp and is pomping out the water behind the dijk

small link white a demo but isnt working
http://boxstr.com/files/3146889_27xir/water.cd.zip

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1