Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Sign in to follow this  
Followers 0
Jasnatdic

Apperently flowing water

20 posts in this topic

Not sure if this really has a place in tfc, or just more of a stand alone mod, but I had the thought so I figured id throw it out there anyhow.

Basically the suggestion is for flowing water to be more "inteligent."

To explain it more in depth, I've always felt a little dissatisfied with minecrafts flowing water system where you place a source block of water and had to drop 1 block every 7 blocks. (I think, haveing a brainfart) I think it would be better for flowing water and such to be able to remain more level and still flow in a more natural way. Water will always flow from supply to lowest point weather it drops 1 meter every 7 or 1 cm every 50 meters.

The suggestion isn't that water will just flow until it finds the lowest point, but that if you place water along a ditch or canal it will appear to flow in the down stream dirrection.

So there it is, hopefully I didn't drag up something that was talked to death several months ago but searching on a cellphone can be fruitless sometimes.

0

Share this post


Link to post
Share on other sites

Not sure if this really has a place in tfc, or just more of a stand alone mod, but I had the thought so I figured id throw it out there anyhow.

Basically the suggestion is for flowing water to be more "inteligent."

To explain it more in depth, I've always felt a little dissatisfied with minecrafts flowing water system where you place a source block of water and had to drop 1 block every 7 blocks. (I think, haveing a brainfart) I think it would be better for flowing water and such to be able to remain more level and still flow in a more natural way. Water will always flow from supply to lowest point weather it drops 1 meter every 7 or 1 cm every 50 meters.

The suggestion isn't that water will just flow until it finds the lowest point, but that if you place water along a ditch or canal it will appear to flow in the down stream dirrection.

So there it is, hopefully I didn't drag up something that was talked to death several months ago but searching on a cellphone can be fruitless sometimes.

one reason this isnt needed

Finite Water

0

Share this post


Link to post
Share on other sites

one reason this isnt needed

Finite Water

Well, assuming that finite water gets fully implemented into tfc with rain and runoff and a way to pump it all that then no, this wouldn't much have a point. Also i will be pleasantly surprised if it happens, as without heavy multi-threading and excellent/efficient coding finite water on that level is nothing but a pipe dream.

However, like I said above I'm not even sure that this would really have a place in tfc, just had a thought and wanted to get it out.

0

Share this post


Link to post
Share on other sites

i just have to say that this is a dream to me believable runing water in tfc would be awesome and i want it but i do understand the limitations we have with the computing capacity and the amount of calculations needed would be too much for most machines...

0

Share this post


Link to post
Share on other sites

I think finite water was discussed before in some thread. If i recall right, this is the doubt i had then, and the one i have now:

"How would sluices work with finite water?"

I don't remember if this was answered or not, thought :

0

Share this post


Link to post
Share on other sites

i just have to say that this is a dream to me believable runing water in tfc would be awesome and i want it but i do understand the limitations we have with the computing capacity and the amount of calculations needed would be too much for most machines...

Vanilla Minecraft lacks finite water for reasons that have nothing to do with it being difficult for people's machines. Minecraft in pre-Infdev had finite water and it worked fine- the problem was that it doesn't play nice with infinite worlds. (Pre infdev (called Indev), Minecraft worlds were small and finite.) When the idea of chunks was implemented, Notch had to deal with how water flowed when the entire body of water wasn't loaded into memory. If you have a few chunks of an ocean loaded, and you drain that area, how does the game know that more water can flow in from the unloaded chunks?

One solution is to ignore the fact that the body of water has more water in the unloaded chunks; upside- conservation of mass, downside: waves of water whenever you load a chunk that has a higher water level than the one you just drained. I believe Terraria uses this finite water model (however, it still has problems with water duplication resulting from the imprecise way water volumes are stored.)

Another solution is to assume that neighboring chunks with water have infinite water, keeping you from having these big waves of water whenever you load a chunk that has a higher water level. The downside of course is that the water level will inevitably start to rise as more water is added to the world.

What Notch decided to do was split water into "flowing water" and "source blocks"- the infinite water model. This has the advantage of not caring at all what an unloaded chunk's water level is. The other advantage is that it makes water more "gamey"- you can sculpt it, carry it around, add or remove streams without having to do hundreds of trips with a bucket. You can also have continuous waterfalls and fountains without a more complex water cycle happening in the background- this was seen as a major advantage back in the day.

1

Share this post


Link to post
Share on other sites

Vanilla Minecraft lacks finite water for reasons that have nothing to do with it being difficult for people's machines. Minecraft in pre-Infdev had finite water and it worked fine- the problem was that it doesn't play nice with infinite worlds. (Pre infdev (called Indev), Minecraft worlds were small and finite.) When the idea of chunks was implemented, Notch had to deal with how water flowed when the entire body of water wasn't loaded into memory. If you have a few chunks of an ocean loaded, and you drain that area, how does the game know that more water can flow in from the unloaded chunks?

One solution is to ignore the fact that the body of water has more water in the unloaded chunks; upside- conservation of mass, downside: waves of water whenever you load a chunk that has a higher water level than the one you just drained. I believe Terraria uses this finite water model (however, it still has problems with water duplication resulting from the imprecise way water volumes are stored.)

Another solution is to assume that neighboring chunks with water have infinite water, keeping you from having these big waves of water whenever you load a chunk that has a higher water level. The downside of course is that the water level will inevitably start to rise as more water is added to the world.

What Notch decided to do was split water into "flowing water" and "source blocks"- the infinite water model. This has the advantage of not caring at all what an unloaded chunk's water level is. The other advantage is that it makes water more "gamey"- you can sculpt it, carry it around, add or remove streams without having to do hundreds of trips with a bucket. You can also have continuous waterfalls and fountains without a more complex water cycle happening in the background- this was seen as a major advantage back in the day.

yeah, not really sure how you'd do a fountain using finite water

You'd have to have some redpower-like pumps and pipes going on

0

Share this post


Link to post
Share on other sites

not caring at all what an unloaded chunk's water level is.

whats his water level?

ITS OVER 9000!!!!

0

Share this post


Link to post
Share on other sites

"How would sluices work with finite water?"

Simple, water moves through it like its a nonsolid block. When water washes into it, it well, works. Although, finite water will need a moving "thing" and rivers must connect to oceans and oceans need waves and rain needs to refill oceans. Oh, and ponds, ponds connected to rivers connected to oceans filled by wain. (Sry i has a speech impedement)

0

Share this post


Link to post
Share on other sites

Instead of calculating individual blocks for water, couldn't water be made into a different kind of entity that calculates primarily on quantity and space occupied? Then instead of like 50 blocks having to shift each time water is removed from say a lake, the single entity is recalculated based on the quantity left and the level is decreased accordingly. Would be easier to implement things like evaporation and absorption at that point as well I'd imagine. If two bodies of water collide, the larger one "absorbs" the smaller one, if a single body of water is cut through something like block placement, a secondary body is created.

I understand this would not be a simple change, but it might help move the environment aspect of the game in the right direction (not infinite) while still making it manageable for slower PC's.

0

Share this post


Link to post
Share on other sites

Instead of calculating individual blocks for water, couldn't water be made into a different kind of entity that calculates primarily on quantity and space occupied? Then instead of like 50 blocks having to shift each time water is removed from say a lake, the single entity is recalculated based on the quantity left and the level is decreased accordingly. Would be easier to implement things like evaporation and absorption at that point as well I'd imagine. If two bodies of water collide, the larger one "absorbs" the smaller one, if a single body of water is cut through something like block placement, a secondary body is created.

I understand this would not be a simple change, but it might help move the environment aspect of the game in the right direction (not infinite) while still making it manageable for slower PC's.

The problem is that each block has an individual set of characteristics (x,y,z and ID) stored in it, when many of them move at once it unleashes a flow of information for your ram to manage, if you have a lot of RAM you can deal with that, if not... well we call that lag. There is not much of the worlld that can be stored in your world at a given time, that is why minecraft works in chunks, even so minecraft world isn't really infinite.

0

Share this post


Link to post
Share on other sites

I understand, but that's what I meant by having a single body of water "entity" to calculate rather than a bunch of water blocks that would have to figure out which blocks on top have how much left, that kind of thing. Basically to make finite water reasonable without eating low end machines.

0

Share this post


Link to post
Share on other sites

You mean that water bodies become an entity instead of a number of water blocks?

Then, the oceans wouldn't become the laggiest biome ever?

0

Share this post


Link to post
Share on other sites

I understand, but that's what I meant by having a single body of water "entity" to calculate rather than a bunch of water blocks that would have to figure out which blocks on top have how much left, that kind of thing. Basically to make finite water reasonable without eating low end machines.

I doubt that that would ease the required computation since that even if they are an entity they are still individual blocks, they occupy the grid with information.

0

Share this post


Link to post
Share on other sites

You mean that water bodies become an entity instead of a number of water blocks?

Then, the oceans wouldn't become the laggiest biome ever?

Not sure, it might get laggy if things around the ocean start moving.

I doubt that that would ease the required computation since that even if they are an entity they are still individual blocks, they occupy the grid with information.

Nooo, what I'm trying to say is, instead of individual blocks of water, water would collect and form a larger single entity. I'd imagine the biggest calculations would be when the water has to settle, such as when a block at the edge or under it is broken (which shouldn't be catastrophic, just figuring how much it has to settle and then back to inert) and possibly when the water has to flow. For simplicity sake, the oceans would probably need to be considered infinite, as in will keep flowing and won't grow if water flows into it. Would make for some potentially neat underwater caverns.

0

Share this post


Link to post
Share on other sites

It wouldn't be far guessing that your idea wouldn't work for 3 reasons.

1. Size of the entity, first of all, you have to program every block to search its nearest water block and update the entity of its size. Figure it out how much updating there is for an ocean, so if you load up a chunk of ocean you'll lag. The chunk is empty before you get there.

2. Update of moving the entity. If you do break a block near a lake or any big body of water the whole thing needs to be updated for each time it moves.

3. Collision with other blocks, well that jus adds to the lag, really... A LOT!

I wouldn't dismiss this idea though, just not as a single entity, I don't know how they do in finite water and I haven't tryied it but i'm pretty sure that they don't handle large bodies of water. (yeah, they do it block by block)

0

Share this post


Link to post
Share on other sites

What if: Water is a collection of multiple blocks. These blocks range from a 1/8 water block to a 1 whole water block. In addition, there are blocks used to indicate moving water. AKA water blocks at an x degree slant.


Using an advanced yet simple formula, the waterblock still) does the following:

1) Look to see if the space below this block is empty.

2) If so, fill it. ("Move" this block into the open space)

3) Search for any adjacent (except upper) spaces that are empty/have water with lower level than this block's.

4) If so, spawn a waterblock(moving) and lessen this block's water level while turning it into a waterblock(moving) (turn it into another water block).

5) Check for a water block downhill, if there is, turn this block into a waterblock(moving)

6) Check if this block is heated enough to evaporate/cold enough to freeze

7) If so, evaporate/freeze.

8) Goto "1)"


Through a specialized process, the waterblock(moving) works in a finite watetype way without wasting nearly as much memory(i think, please correct me if i'm wrong):

1) Search for any adjacent (except upper) spaces that are empty/have water with lower level than this block's.

2) If so, spawn a waterblock(moving) and lessen this block's water level while turning it into a waterblock(moving) (turn it into another water block).

3) Search for any adjacent (except upper) spaces that are empty/have water with lower level than this block's.

4) If so, spawn a waterblock(moving) and lessen this block's water level.(turn it into another water block).

5) Check for a water block downhill.

6) If so, deposit this block into that block (Remove this block and increase that block's height).


When water is spawned, it checks for any water around it, if there is, it takes that water's height. This removes the waves glitch.

(P.S. I'd love it if bioxx added waves)

0

Share this post


Link to post
Share on other sites

I'd imagine waves in minecraft would probably come out of your computer, punch your dog in the face and proceed to eat the ram out of your computer. That said, it'd look awesome if done right.

2

Share this post


Link to post
Share on other sites

Coro's weather mod does a decent job of waves aesthetically anyways I don't think they are very functional.

0

Share this post


Link to post
Share on other sites

All you have is chunks, containing 4 half-byte array each. All the "water BODY should be entity" talks end here. Because it could not.

<algorithm>

Already in DF.

If you want to test how it would lag, download DWARF FORTRESS, build a decent trench, divided by 1 meter wall from the river and then dig that wall.

0

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0