Water physics in Mechaenetia (And Poison Effects)

Hey, everyone! I’m really excited about the upcoming development of the new game and love to just imagine all the possibilities with the new system. Recently I’ve been wondering about water physics and physics in general.
The physics in Minecraft is really unrealistic partially because of the 1m blocks. I hope the water physics will be more realistic, especially that there won’t be infinite water and no flowing water in rivers. But I don’t know if that’s hard to implement and would cost a lot of performance.
What do you think should be the optimal balance between realistic and unrealistic physics? (And do you, Greg, have any ideas you would like to share with us?)

4 Likes

Indeed I do have plans for somewhat realistic and supposedly very performant Fluid Physics. Do note Blocks are 0.25³m³ instead of 1m³ like Minecraft.

Fluid Blocks will have a Flow Direction in them.
If something is in front of that Fluid Blocks direction that happens to be another Fluid Block with a Flow Direction, it will not do anything (apart from pushing things that are inside the Fluid), and stop trying to update.
If nothing is in the Flow Direction, the Block will try to move forward in some way, by spawning another one in front of it (or to the side if it hits something), but WITHOUT removing itself.
If there is nothing flowing into the Fluid Block, it will vanish into nothingness, that way it wont end up creating Infinite Water on the frontal end.
There will be conditions to remove the flow direction of Fluids, like for Lakes and such.

For Rivers there will be tiny River-Spring Blocks, which function as infinite Water Sources. The Water that comes from multiple of those tiny Springs will merge into a full grown River, which then flows until it reaches the Ocean and merge-vanishes.

The Ocean itself is considered Infinite though, kindof like how GT6 Ocean Water works right now.

The flowing Water Blocks make long distance Water Transport from those tiny Spring also very lagfree, since you can lay a “pipe” from a Spring to your Base. This does not mean there wont be regular Pipes with different Fluid Mechanics (for inside the Base), this just means you can redirect Rivers to wherever you need them, especially if you wanna do Water power and such, or an Aqueduct.

Took me a while to write this, go ahead and ask questions, while I am away for a short while. ^^

2 Likes

If a fluid block changes direction every time it hits a non-fluid block, does this mean fluids contained in a rectangular space (surrounded by solid blocks) would continue to move in a circle indefinitely? Or would they somehow lose their momentum after some time?

3 Likes

That is a good question, the way I said and explained it definitely could have that be caused, unless I add an origin direction to the Fluids too, to make sure circles cannot happen by validating the point of origin. Good point, I would not have noticed that until much later. XD

2 Likes

If the size of the block is 1/64 of minecraft, would things like river diversions or waterfalls consume a lot of performance?

2 Likes

Depends on how many cubes of water per second are moved (since only the “front” and the “back” are actually changing). Just be aware that the Game is gonna be highly multithreaded, so Issues like that would at least not slow down your game too much normally.

Though there wont be any Chunk Loading shenanigans like in Minecraft, meaning the entire Island/Region you are at is “active”, when it comes to Blocks, no matter how far you are away. Mobs and other AI controlled things will likely stand still when nobody is closeby though.

This makes it very important that most things are doing their Stuff while “inactive” to reduce the amount of “active” things the Game has to care about. For example Crops will only grow when someone is closeby to see them grow, but they will get a huge growth spurt before they load into view to compensate for the off-time.

NPCs do count as “witnessing crops” but in that case they only check for fully grown Crops so there are easy special cases to be made to update Crops only when they are supposed to have reached the fully grown State, kindof like a huge timer.

1 Like

What about fluid mixing? How would that work? And can i throw some trash into a river to get rid of it?

2 Likes

Hrrm, that is gonna be complicated for In-World Mixing for sure, especially with Rivers. This is so definitely gonna be a thing I need to take care of later, lol. It is definitely gonna be possible to mix Fluids since there is no concept of registration for Blocks, so those can be created on the fly with whichever Stats are needed, such as 50% Water 50% Sewage, and Sewage and Water could mix further down the River so that the entire thing gets polluted evenly with like 99% Water 1% Sewage spread over all River Blocks.

Depending on how Fluid Flow Speed is implemented it could be an issue if Sewage is slower than Water, since that would mess up the overall Speed.

Yeah this is gonna be a huge Headache for Future Greg to figure out. XD

2 Likes

And also some fluids don’t mix well together (oil & water), so that will be a challenge to implement as well.

2 Likes

That is the least challenge since I kindof have that in GT6 already, where there is no Fluid mixing, and the less dense Fluid just swaps its location with the more dense one. :wink:

2 Likes

Also as i understand, all fluids will be drinkable in some way, will there be unique effect for every liquid or groups of effects for multiple liquids, like acid and lava is instadeath, oil and sewage is some damage and water and milk is nothing.

2 Likes

Yes that would be part of the whole thing, Liquids would have Stats for what happens when they are consumed. Milk wouldn’t be nothing it would provide sustenance, Water would provide Hydration, etc.

And if we go with Acid it would not always be instant death. You could for example drink something similar to Stomach Acid and still be mostly fine apart from a little bit of damage in your mouth and throat, as anyone who ever vomited in their Life can attest you.

This way being immune to certain types of Food Poisoning is easier to handle. Each Poison, Venom, Bacterium, Virus and Parasite will have a sort of ID in order to categorize them, with 26 Categories for each of them, so you can be immune to Poison A, but the Poisons B to Z are all effective on you, and there is a few random Plants somewhere containing an Antidote for the Poisons W, T and F that happen to grow on your Island, even though nothing on it deals Poison W or F Damage, though that random Lizard in the Mountains does deal Poison T Damage when eaten.

Ingame you usually don’t exactly know the Category ID of a Poison or so, you typically only know “This thing happens to have a poison that this bottle of cure happens to be effective against”, so you need to find at least 2 Poisonous things that happen to have the same Category before you know which Letter they are, but you only find out the Letter of other 3rd or 4th Poisons/Cures by actually experimenting, and even then it can happen that you have an Animal that is not only Poison A but L, S and O too, in which case good luck not only finding a mixture that can cure that bullshit, but also separating the category Letters for scientific purposes to find out how it all works in the backend of the Game.

Edit: Some NPCs will often know some of the Poisons and their Cures in advance, so you might be able to find out by asking them, or buying Recipes from them.

4 Likes

You’ve mentioned damage to mouth and throat, did you mean that there’ll be a complex health system? I’m so amazed by your previous answer that i’m even little afraid to ask :laughing:

3 Likes

Then I will make it short, yes but its definitely optional. You can still have a normal Health Bar if you want the game to be easier and not slice off other peoples limbs or something. Game aint gonna be for children, that’s for sure (at least when it comes to violence and dismemberment). XD

4 Likes

Effect Types

As Stuffs like Poison need to have a bit of Variety, I will give each Type of Poisonous Effect one Letter of the Alphabet (resulting in 26 per Type), so you can only heal the Poison F Effect using something containing Poison-Cure F.
This Concept applies to many things such as: Poisons, Venoms, Toxics, Radiation, Allergies, Virusses, Bacteria, Fungii, Cancer, Curses, Magic and more! Ofcourse also with cures for each of them, even if rare, hard, lategame or impossible to obtain.
Usually the different “Poisons” and their Cures are generated randomly, but since I also want a slightly unified experience for people who play with default Flora and Fauna, there will be some default Assignments.
For example both Venom B and Allergy B would be used for, you guessed it, Bees. Other Stuff can still cause it, but Bees would have it for sure.
Radiation A, B, C, M, V, W and X would be used for Alpha, Beta, Gamma, Meson, Ultraviolet, Microwave and X-Ray Radiation.
The Type of Poison and which Damage it does depends on what inflicts it, the dosage of it, how susceptible you are to it (especially for Allergies) and everything else. You could have a Bee Venom that deals enough damage to instant kill an Elephant, since Type and Effect are independant from each other.
There will be ofcourse ways to add custom Effects too, there wont be a stupid 26 Limit or something, just 26 randomly generated ones with few sensible defaults for people who dont want to let RNGsus into their Lives.
Said Custom Poison Effects can ofcourse have more than one Letter as a Name. :wink:

So I have put the Effect thing to the Game Ideas Page. ^^

2 Likes

But what if i am allergic to social interaction? Then i would have to walk around with alcohol in game all the time because multiplayer?

:smiley:

2 Likes

Oh right, I forgot to mention Addiction Effects! That was what felt missing while I wrote this! XD

2 Likes

Added Herbicides, Pesticides and Antibiotics to the List of Types.

2 Likes