The Water Mod

Lord Zarnox

Founder of the IFTTES
May 31, 2017
1,865
2,415
520
22
Australia
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
Jul 9, 2016
658
1,320
505
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
May 31, 2017
1,865
2,415
520
22
Australia
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?
 

Aceba1

Aceba1
Jan 7, 2016
1,042
2,473
525
19
North-east America
github.com
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.
 
  • Like
Reactions: Lord Zarnox

Lord Zarnox

Founder of the IFTTES
May 31, 2017
1,865
2,415
520
22
Australia
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.
 

zionbhoy2

Well-Known Member
Dec 14, 2018
9
17
410
41
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?
 
  • Like
Reactions: Seth_Seth

Seth_Seth

perhaps, remaking dl models
Oct 14, 2017
1,796
2,710
525
I dunno
forum.terratechgame.com

zionbhoy2

Well-Known Member
Dec 14, 2018
9
17
410
41
Last edited:
  • Like
Reactions: Seth_Seth

Seth_Seth

perhaps, remaking dl models
Oct 14, 2017
1,796
2,710
525
I dunno
forum.terratechgame.com
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
 

QuackDuck

Duck on holiday
Jun 24, 2017
1,916
4,551
525
Near a duck pond in Britain
duckduckgo.com
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.
 

zionbhoy2

Well-Known Member
Dec 14, 2018
9
17
410
41
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 ^_^
 
  • Like
Reactions: Seth_Seth