The Water Mod

Lord Zarnox

Founder of the IFTTES
Joined
May 31, 2017
Messages
1,865
Likes
2,394
Points
520
Age
19
Location
Australia
#81
Can we get better drift control?

If you’re already doing calculations per block below or at water, could add it relatively easily: buoyancy goes up, gravity goes down, and you could add a predefined drift force in the other four axes pointing inwards. (Proportional to current tech velocity)

Doing that on every block makes most of the “drift” forces cancel out (mostly) with each other, except for the blocks on the outer shell of whatever is floating, which will prevent drifting.

The proportionality to velocity also means the tech stops much sooner without propulsion, and that if a tech happens to be drifting, it will be penalized extremely heavily in the normal axis of the tech, which greatly assists in turning.
I'd say a simpler approach to calculating that would be to have the drag forces from water have different strengths on each cell based on how many faces are touching another occupied cell. For example, a cell will all 6 adjacent cells empty (despite being useless for a ship, as this would just be a GSO or Venture cab, or individual floating single cell blocks) would receive full drag force, while a cell with all 6 adjacent cells occupied would receive much less drag.

Hang on, that won't work... I'm missing something here. I don't have much time to type this, but if you combine this with ray casting in the opposite direction to the velocity of the tech, it might work at least moderately well.
 

Sozin

Dog Emperor
Joined
Jul 9, 2016
Messages
574
Likes
832
Points
505
#82
I'd say a simpler approach to calculating that would be to have the drag forces from water have different strengths on each cell based on how many faces are touching another occupied cell. For example, a cell will all 6 adjacent cells empty (despite being useless for a ship, as this would just be a GSO or Venture cab, or individual floating single cell blocks) would receive full drag force, while a cell with all 6 adjacent cells occupied would receive much less drag.

Hang on, that won't work... I'm missing something here. I don't have much time to type this, but if you combine this with ray casting in the opposite direction to the velocity of the tech, it might work at least moderately well.
That’s basically what I was getting at. The effect would be the same: need to iterate over all cells anyway, but checking if the neighbors are occupied before adding forces instead of just adding more forces per block and trusting that they cancel might take more time. Then again, having to calculate a thousand extra forces might take more time than checking the neighbors. It’s impossible to know without experimentation or access to the game code.
 

Lord Zarnox

Founder of the IFTTES
Joined
May 31, 2017
Messages
1,865
Likes
2,394
Points
520
Age
19
Location
Australia
#83
That’s basically what I was getting at. The effect would be the same: need to iterate over all cells anyway, but checking if the neighbors are occupied before adding forces instead of just adding more forces per block and trusting that they cancel might take more time. Then again, having to calculate a thousand extra forces might take more time than checking the neighbors. It’s impossible to know without experimentation or access to the game code.
A much simpler, albeit less realistic, approach would be to just use the cross sectional area of the tech in the direction of motion (but ideally only the area that is underwater), and just multiply the overall drag force by the area. Sure, this means that the hydrodynamics doesn't care about the actual shape or any streamlining, but taking a profile of the tech on a plane should at least allow drag to be implemented with an understandable relationship between profile and velocity.

@WhitePaw2002 What do you think about the possibility and ease of implementing these calculations?
 

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
873
Likes
1,839
Points
505
Age
17
Location
North-east America
Website
github.com
#84
I was considering doing this before, but there would be a few issues with taking these calculations. Of course, I have to figure out a way now. What I've come up with so far is using the already acquired block data, and determine all the faces along the X, Y and Z planes of each cell to world coordinates (0-2 for X, Y, and Z). If a block has an attached AP on plane Y, for example, it is ignored from the calculation. Meaning that if it has a disconnected AP, or no AP on that face specifically (and the face exists, not mesh related), it is used. And then run it through velocity, water density and the such, and apply the physics to every cell of every block, and there we go!

Might even mean jumping speedboats or something.

Also do people care about graphics? Because I don't know how to make water look good.
 
Likes: Lord Zarnox

Lord Zarnox

Founder of the IFTTES
Joined
May 31, 2017
Messages
1,865
Likes
2,394
Points
520
Age
19
Location
Australia
#85
If you could give it a caustic effect, either for the surface or the land beneath, it might look at least like there are some very small waves.
 
Joined
Dec 14, 2018
Messages
9
Likes
17
Points
9
Age
38
#90
i am jealous of you guys. i downloaded a mod manager and i can't make it work. i double clicked at the exe file and nothing happened. is there a specific directory to extract the file?
 
Likes: Seth_Seth

Seth_Seth

Confused Leader of the Golden Armada
Joined
Oct 14, 2017
Messages
1,214
Likes
1,770
Points
525
Location
Armada
Website
sites.google.com
#91
Joined
Dec 14, 2018
Messages
9
Likes
17
Points
9
Age
38
#92
Last edited:
Likes: Seth_Seth

Seth_Seth

Confused Leader of the Golden Armada
Joined
Oct 14, 2017
Messages
1,214
Likes
1,770
Points
525
Location
Armada
Website
sites.google.com
#93
thank you! i downloaded the new installer but i don't really know where to extract it and how to make it work. im not sure what game version will this mod manager work. im using 1.0.1.5 atm and i'm not using steam version. i downloaded the game elsewhere lol
How are you using 1.0.1.5?
the latest unstable is 1.0.1.7
...oh
 

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
873
Likes
1,839
Points
505
Age
17
Location
North-east America
Website
github.com
#96
i don't really know where to extract it and how to make it work
You can extract TTMM2 wherever reasonable: Documents, downloads, desktop, etc. When running the executable, give it the location of your TerraTech folder (the folder that holds the executable and _Data folder)

wait what
 
Last edited:
Likes: Seth_Seth
Joined
Jun 24, 2017
Messages
1,772
Likes
4,050
Points
525
Age
16
Location
Near a duck pond in Britain
Website
duckduckgo.com
#97
im using 1.0.1.5 atm and i'm not using steam version. i downloaded the game elsewhere lol
OK, uhh...

I don't want to accuse you of anything, but I have a feeling that your version of the game may not be very legitimate. The unstable versions are only available on Steam, but you have it....without Steam....

I would also like to add that the Mod Manager has been programmed to only work with legitimate copies of the game.
 
Joined
Dec 14, 2018
Messages
9
Likes
17
Points
9
Age
38
#99
OK, uhh...

I don't want to accuse you of anything, but I have a feeling that your version of the game may not be very legitimate. The unstable versions are only available on Steam, but you have it....without Steam....

I would also like to add that the Mod Manager has been programmed to only work with legitimate copies of the game.
ooh thanks for clearing that up bro. i think i might wanna purchase the game to get a legit copy of it. thanks ^_^
 
Likes: Seth_Seth