View Single Post
Old 04-28-2021, 03:41 PM   #4
Join Date: Mar 2021
Posts: 16
Downloads: 0
Uploads: 0

Originally Posted by AMZ View Post
Answer given by one of the authors of Wolfpack

the game currently, the u-boats (and other ships for that matter) feel very much like they are on “rails”. IRL though boats and ships do a whole lot of slipping and sliding. I implemented a simplified physics model to demonstrate how boats actually behave. It’s tuned to exaggerate the adverse effects of using the rudder, and the sliding of the boat to make it easier to see. It’s available here:

About the model:
The model is based on Newtonian physics. Both the rudder and the hull of the boat itself are considered lifting surfaces. That is the water acts upon them with a force perpendicular to the surface, proportional to speed squared, however in my simulation I had to settle for just proportional to speed, to prevent the simulation form freaking out when speed got moderately high. The amount of force is also dependent on the angle of attack relative to the incoming waterstream. In my simulation I chose to use the sine of the angle of attack as the function, which is not quite right either, but it was easy to do. A lookup table would probably be better. In addition to those forces there is also the thrust from the propeller and water friction, also proportional to the speed.

I also calculate the torque from the rudder with the same math as the rudder force. There is also a stabilizing torque from the hull, which uses the same math as the lift from the hull. Lastly there is a stabilizing torque which depends only on angular velocity.

Once all the forces have been summed up, the velocity vector is decomposed. The forces are added to the velocity vector to get the new course and speed. Lastly the torques are summed up, and added to the angular velocity of the boat, and the boat, and the angular velocity is added to the heading of the boat. For both these steps it is important to consider the time since the last step of course, otherwise the simulation will run differently depending on how fast the physics can be calculated. I did not consider this in my simulation, so slow computers may have slightly different results.

Other factors that I have overlooked in my model is the effect of propwash over the rudders, which makes them much more effective when the propellers are driving the boat forwards. The twin-prop design also offers some stabializing torque when the props are driven close to the speed at which the boat is moving. Also I have neglected to account for the effect that the turning of the boat has on the angle of attack on the rudders. And lastly there may exist different flow-regimes, depending on speed and angle of attack, which would also influence the forces involved, which I have not modeled, but could be approximated with lookup-tables if necessary.

Given that I was able to throw together this demo in about a day in a coding language I never used before suggests to me that this should be not too hard to add to the game. Though there might of course be limitations with how things are implemented in game that makes things more challenging.

How would this affect gameplay?
The helmsman would have more of a challenge obviously. In order to make a clean turn so that the navigators job becomes easy, he/she must anticipate the boats response to a larger extent than the current system. There is more of a delay before the boat starts to turn, and the turn has to be “arrested” properly as well. Simply straightening out the rudder isn't going to make the boat go straight, that’s just not how boats work.

It should be simple enough to add some turbulence and wake effects as well to this model, making the helm a fulltime job, as it would be IRL.
I really hope the u-boats can eventually become what we are expecting. This way, we could be talking about something REALLY REALLY big.
snak3gam3r! is offline   Reply With Quote