Make smaller subs accelerate faster#14844
Make smaller subs accelerate faster#14844mygamingaccount wants to merge 2 commits intoFakeFishGames:masterfrom
Conversation
|
Have you considered calculating the drag "properly" based on the reference area of the sub instead? It could be cool if the shape of the sub affected the drag and the top speed. |
|
I guess that would be cool, yes. Intuition tells me that a sub that is more streamlined will tend to accelerate longer, and one that is thick will reach the top speed faster - at the same displacement. Meaning instead of size being the only factor, you could see different acceleration performance based on form. Interesting Another case that I see where this could make a difference, is that of a submarine that has a variable geometry by the use of docking ports. This is the reason I left My fear is that it would incentivize streamlining, which might lead to more boring submarines overall. Currently builders can experiment with various shapes freely without concern for performance. This is one of those things that makes Barotrauma great, the crazy custom submarines. |
Calculate drag using mass^(2/3), thereby increasing drag for small vessels, and reducing drag for larger ones. With a matching increase or decrease in engine thrust to keep the same top speed, this will result in more maneuverable shuttles, and more sluggish capital ships.
A sub 10 times smaller used to need 10 times less thrust force to achieve the same speed. The new drag formula needs about 4.6 times more than that. This change in the thust-to-weight ratio means faster acceleration for drones and shuttles. Calculate this factor to prevent the top speed from changing in existing submarine designs.
a75dc2d to
dad9d8e
Compare
Would it be possible for it to be a per-submarine toggle? This way you could get the best of both worlds; old subs would default to having it disabled, and sub builders could enable it if they wanted to. |
|
@jigardi setting I believe that existing subs equally benefit from this feature, so exempting them would really not be the best idea. |
That's great news! : D
Good point! I didn't consider that at all. Hope this gets implemented! |
Every submarine in Barotrauma accelerates at the same rate because drag is calculated directly off the submarine's mass.
This is quite counter intuitive: I would definitely expect a tiny drone to achieve top speed much earlier than a container ship. It also makes shuttles drive like aßß, to which the suggested solution is to increase thrust, but that has an unwanted effect of raising the top speed.
To overcome these limitations, this PR changes how hydrodynamic drag is calculated. It simply uses mass^⅔ and scales the forces to remain 100% compatible.
Disclamer: I know that Update() is not the best place to calculate these factors, but I'd rather you gave it a try how the changes make the game feel before I spent more time researching a better place for it.
(spoiler)
horizontalDragCoefficientandverticalDragCoefficient? They do absolutely nothing and are always 0.1