Sailwind

Sailwind

Hatwox Feb 14, 2024 @ 9:07am
how does the game calculate the ship speed
Hi ,
I was curious about sailing and stuff , mainly upwind close haul sailing.
So after looking a bit into bernoli's (years after school.. finally :D) and trying to calculate normal force in the sail if the air just crashed , thinking it would just be density x area and then realising it was not all that easy

how does the game do it?
Clearly its related to the wind speed , and the angle of the sail ofc
but does it use bernolli's calculations like.. (just need the pressure difference right , so a quick {density/2} as a constant to save cpu cycles and then difference in wind speed in front and behind the sails.. but then... how does the game calculate the wind speed when it hits the sails and slows down? )

Or does it use the basic wind acceleration x mass due to sail area?
how does it calculate the mass and acceleration or the wind?

Or is it like a table where every wind speed and angle has been pre recorded , and set as a fictional thing that seems ok instead of some simple simulation calculation in order to make the game playable

just curious
would also help to know how people sail upwind... and then some new people can't
< >
Showing 1-8 of 8 comments
Odoty Feb 14, 2024 @ 11:38am 
Originally posted by Hatwox:
Or is it like a table where every wind speed and angle has been pre recorded , and set as a fictional thing that seems ok instead of some simple simulation calculation in order to make the game playable

My money. Maybe not a table, but a simple distribution where force peaks at a chosen angle and drops away each side
Simulating wings is bad enough, but these sails aren't rigid. Things in games (especially this one) are often far more simple than they look, and many things are just an illusion
ling.speed Feb 14, 2024 @ 12:45pm 
Bernoulli equations are not really enough to describe forces around any object in open space, like a wing or sail. The planes are not flying because of bernoulli, its a common misconception.

But even if it was that simple games almost never use physics equations beyond most basic, because you'd either need to do full fluid simulation thats too much for CPU to run real time, or add so much arbitrary coefficients and helper equations that its easier to just do your own approximate equations from the start.

That said, the sails are designed more for specific gameplay than to be as realistic as possible, so its a 3rd option most likely, a table, or a simple (fast) equation that fits the desired behaviour - which could be similar to a real equation.



As for sailing upwind, modern sails do work similar to airplane wing (with bernoullis and laminar flows), while older sails were more crude, mostly just deflecting the air backwards. Being crude does not stop the ability use relative motion of air and sea, but as efficiency drops the angle at which you can sail gets worse.

The game takes some liberties on how wide range of angles the sails produce forward force. Since you are alone in a boat after all, and world/time is kinda compressed.
For square sails just make sure the wind is visibly filing them, if the wind comes too much from the side they need to be angled before they get too deformed to deflect air properly.

Lateens, gaffs, junks, jibs can work better at angles more resembling a wing, becasue they can keep form better.
Im not sure thou "which people" find it hard to sail upwind. Maybe you meant tacking itself... Game is designed so that every ship can go upwind even if it wasnt really that easy in real life back then.



ps: Notably, the game does use apparent wind, so the faster you go the more upwind you are, which is also why maximum speed, just like in real life is attained with wind at an ~45 degree angle.
Hatwox Feb 18, 2024 @ 7:44am 
thanks both of you for your replies
tyrswrath Feb 22, 2024 @ 3:02am 
Join the Sailwind discord and there should be quite a few people who can explain the theory of sailing and forces involved in quite some detail and/or provide links.

Under the bonnet of the game, I'd wager, a lot will break down into a balance of vectors resulting in a specific forward motion (or backwards, depending on situation).

New people might struggle to close haul as they've not yet bothered to look into how sails work and what angle to put them at in order to achieve the forward motion at any selected course relative to the wind. This is particularly interesting as the beginner guide in the first boat you get in game actually does a very concise explanation on the topic. Kind of shows how people love to read manuals!
well we are moving at half speed in knots compairing to the speedmeter showing...
Drinkcup Feb 22, 2024 @ 10:26am 
Originally posted by konstantinoskountousias:
well we are moving at half speed in knots compairing to the speedmeter showing...

that thing is so useless, and inaccurate, and basically always reads the same thing as long as you are moving. i never buy that any more. It's a shame bc good instruments are one of the things that piloting a boat should be about. it should be a strong part of the game and the fun. but I find most of them worthless and inaccurate. honestly i dont buy a fancy compass, speed meter (forgot the name atm), quadrant, or even a spyglass. none of them work well. Spyglass is broken in the same way as every video game ever, that is, it only makes the image of what you see at your location larger, which means that if your draw distance is bad (and it always, always is unless you're Palworld), you wont see the object that is there and should be visible using the spyglass.
ling.speed Feb 22, 2024 @ 4:00pm 
Originally posted by konstantinoskountousias:
well we are moving at half speed in knots compairing to the speedmeter showing...
Nah chip log shows correct speed, its the distance thats wrong. Time is scaled by 29x but map space is scaled 55x. Speedo works without scaling at all (is relative to physical world). If map was scaled to 29x or time to 55x it would be correct.

Rather than putting the math strain on speedo (dividing it every time) i'd suggest just going by degrees insted of miles. We sail 1 degree per day at 6 knots (5.83 to be exact). It ends up useful when we want to plan for something we dont have mission for to get range info in miles.
Last edited by ling.speed; Feb 22, 2024 @ 4:06pm
tyrswrath Feb 23, 2024 @ 2:51am 
ngl, the speed from the chiplog indeed is inconsequential. Knowing it really doesn't make you arrive any sooner or later. You get there when you get there.
As long as your headings are correct you'll get where you're going in the end :D

When you've played enough hours you'll find out you can just keep going around the map on nothing but a compass. The most important tool in the game.
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Feb 14, 2024 @ 9:07am
Posts: 8