Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Sailing model feedback thread

A topic by ppitm created Nov 08, 2019 Views: 709 Replies: 29
Viewing posts 1 to 10
(1 edit)

Post feedback here

Neil, do you have a copy of John Harlands 'Seamanship in the Age of Sail'?

Developer

Hello! Yes, it's the main reference I've been using.

(1 edit)

Well this is totally incredible and much more than I was expecting! The simulation already feels quite mature, especially for something so finnicky and difficult to balance as getting underway from irons. 

And that's speaking as someone who's designing their own 3D square rigger simulator, as an Arma mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1726376971

Only one problem... some joker put a honking great shoal right outside Portsmouth harbor...

And I'm just now learning that the UK doesn't put free PDF charts ANYWHERE online

Developer

Thanks! I've been working on it on and off since about 2011. 

The weather is from climate modelling data from here - https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis2.html - for 1980. Another source I looked at was here, from weather forecasting - https://nomads.ncep.noaa.gov

I just spent half an hour watching videos of Nassau 1715. I wasn't aware of it at all - it looks fantastic.

Ahaha, I shrank my hull by accident and capsized. Kudos for having the ship float on its side like that instead of flipping over.

(1 edit)

Do you own Arma 3? We should probably let you play an early version of the mod, for the sake of mutual inspiration. If the team is OK with it, at least.

Oh, and do I ever empathize when you talk about 'hacky' physics. If you have been able to get this far without faking almost everything, you must be Einstein. My dad is a naval architect who also did amateur development for flight sims, and he says that a square rigger simulator is drastically more complicated than anything airborne and supersonic. In Nassau I had a beautiful system of forces for the sails on the sloop, but had to basically rip it apart to make the square rigger function properly. Crazy stuff like making square sails 80 times more efficient at making headway than sternway. Although a lot of that is due to the fact that we are completely reliant on proprietary hardcoded speedboat PhysX.

Anyways, I'm not here to promote my stuff. I'll probably be playing quite a bit of Painted Ocean and sharing my thoughts.

Developer

The first thing I worked on was buoyancy, which is modelled for all the spars, so that's what you're seeing when you capsize. I guessed the distribution of weight around the ship.

Square rig physics doesn't seem that bad - perhaps it depends which corners you are willing to cut. I am modelling each sail separately as a wing (really a position, an area and a normal). I don't worry about, e.g., aspect ratio, I just have general lift and drag coefficients, tweaked until it seems reasonable. The only effect of sails on each other I model is screening each other from the wind; for this, for each sail I cast a dozen or so rays in the direction of the wind each frame, and see how many of them hit something.  It's using whatever physics engine is built into unity4.

The main thing I've noticed so far is excessive inertia in some situations. If you are sailing at 2.5 kts with the wind abeam, and then douse all your sails, the ship simply does not decelerate. I have to sit for several minutes with x256 time acceleration for my speed to drop below a knot. Must have drifted ten miles forward in a straight line before I stopped, with no leeway.

Exact same problem we in Nassau!

Of course, it might only be fixable with cheating: increase the hull drag when no sails are set. Or something like that. Drifting under bare poles with windage on the rig would also be a good feature. You could add a small invisible sail, but disable it when the bow is pointing upwind, so you don't make tacking any more difficult.

Developer

Increasing the drag at low speeds would change this behaviour. This already happens a little bit but could happen more. (Unfortunately, I think the skin drag slider in the UI now doesn't have any effect.) This would also make getting under way more difficult. Really the question is, how long should it take a ship like this to slow down?

And it might be worth distinguishing two situations here. In one, the helmsman is keeping the ship pointing straight; in the other, it's drifting and likely to turn off to one side, which should slow it down more quickly.

Yes it's a classic sailing model dilemma where one improvement causes problems in another area. Getting underway is already reaaalllllly slow from a gameplay perspective (I really have no idea what's realistic here). More importantly it would make tacking a lot harder if you increased low speed drag.

How long should a ship take to slow down? Well in a small boat, you coast to a stop very rapidly, whether power or sail. The ship stops rapidly when tacking, due to wind pressure on the sails. My gut tells me that stopping due to water drag along should not be more than 2-3 times slower.
All in all, it's the kind of situation that would make me want to create some sort of artificial braking effect when the sail area is under a certain threshold.

(2 edits)

Didn't they usually bring the ship to a stop by backing sail(s) and/or turning into the wind and then dropping anchor?

>All in all, it's the kind of situation that would make me want to create some sort of artificial braking effect when the sail area is under a certain threshold

I would think it's possible to condition the drag not only by sail area, but also by checking if the ship accelerates or decelerates.

P.S. Here are two articles concerning period ship maneuverability I found recently - maybe they can be of help.

https://www.cnrs-scrn.org/northern_mariner/vol13/tnm_13_4_29-39.pdf
https://www.cnrs-scrn.org/northern_mariner/vol14/tnm_14_3_57-68.pdf

The usual procedure was to bring the ship into the wind, then drop the anchor while making sternway. Unless there was a very tricky confined harbor, they wouldn't drop the anchor while still moving forward. I haven't actually tried backing sail that much yet. Even if that method works well, I would still say that the issue is the large disparity in deceleration time of luffing up under full sail vs drifting under bare poles.

Those are fantastic articles and definitely read them. I think your simulation already jives nicely with the information they contain.

(1 edit)

>I think your simulation already jives nicely with the information they contain.

I am afraid you have confused me with Neil. :) The game I work with allows much less, although I tried to mix the numbers available to implement at least some of the effects.

Developer

I found some more data on drag/inertia. 

The build now has a drag coefficient of around 0.0025, based on what I see about modern ships (one of the debug menus says 0.008, but that slider does not actually do anything at the moment). But I've found that the original book on the subject, "The Resistance of Ships" by William Froude, is available at archive.org:

 https://archive.org/details/resistanceships00frougoog/page/n13

The first part describes tests done on HMS Greyhound on 1871. Greyhound was a wooden screw sloop, launched in 1859,  about the same size as the frigate in APO but lighter - it's listed as around 1000 tons displacement in the tests, while the frigate is around 2000. I think it's reasonable to expect it to behave similarly to the frigate . Presumably 50 years of technical improvements give it a lower friction skin, but on the other hand there's the screw sticking out (I'm not sure what this was doing in the tests - the ship was towed).

The download is missing the diagrams, but there's a description of the results on page 16. At speeds where wave resistance is not an issue, the drag in lbs is 88*V^2, where V is the speed in knots. At 1m/s (very close to 2kts) that gives about 1500N of drag. Taking the weight as 1000 metric tons, that's a deceleration of  0.0015m/s^2.  So to reduce the speed by 0.5m/s would take at least 330s, more than 5 minutes, and that's ignoring the big reduction in drag as you slow down. 

The drag in the released build of APO is pretty close to this, but the ship will take longer to slow down as it's heavier. Greyhound had a wetted area of 674m^2,  giving a drag coefficient of 0.0044. Putting this into APO will give a bit higher drag (I need to think about how I am calculating wetted area), but still on the order of minutes to slow down. 

It might be interesting to play with yaw instability here. Increasing the instability should tend to make the ship turn from straight, slowing it down a bit faster,  but also making tacking easier.

(4 edits)

There is some experimental data from the Black Sea Fleet reports of the Russian Navy made in 1828-1829:
https://cyberleninka.ru/article/v/analiz-hodkosti-ostoychivosti-i-upravlyaemosti...
for several ship types ( from 110-gun first rate to small brigs). Unfortunately it does not contain acceleration or deceleration times, but there are speeds and heel angles for various wind conditions as well as times recorded for tacking and wearing.

For example a 44-gun frigate (table 1, col. 4, and it should be noted Russian ships were in general more heavily armed and slower then their French or British counterparts, even if they shared a hull form):

Wind rate 5
- Close-hauled 7 kt
- Beam reach 9.5 kt
- Broad reach 11 kt
- Running 8 kt

Wind rate 7

- Close-hauled 4 kt
- Beam reach 9.5 kt

Heel angle
- Wind rate 5 - 11 deg
- Wind rate 7 - 7 deg
- Wind rate 9 - 8 deg

Wearing (wind 5): 2.5 min
Tacking (wind 5): 2 min
Tacking (wind 7): 3 min

P.S. Found in the text a description of sails set during the trials:
- At wind 5 (up to 10 m/s) running & broad reach all sails (sic) were set.
- At wind 5 beam reach & close-hauled royals & skysails taken in.
- At wind 7 (up to 15 m/s) courses, topsails (double-reefed), t'gallants and fore-staysails were set.
- At wind 9 (up to 20 m/s) fore-course and fore-staysails were set.

P.P.S. Corrected the wind 5 close-hauled config translation and wind 7 close-hauled speed.

Developer

Thanks! That's really good stuff. 

There must be similar British reports somewhere, but the only references in the "Frigates of the Napoleonic Wars" list only top speeds and general impressions of the captains.

What page says they set the topgallants in Beaufort 7? (I speak Russian)

 Look at page 4 on the left.

При ветре 7 баллов (до 15 м / с) корабли с прямым вооружением несли нижние паруса, брамсели, фор-стень-стаксель; брали два рифа у марселей.

Yikes. I wouldn't recommend flying topgallants in 36 kts of wind in the simulator.

Maybe it wasn't that bad over double-reefed topsail. That makes the t'gallant significantly lower, doesn't it?

Yes but the mast is still spindly, and it's a gale. 35 kts of wind is TWICE as much pressure as 25! I can only imagine they were saying 'look what I can do!' for the sake of the experiment.

Judging by the speed table it didn't help them much, but there is definitely something rakish in this.

I know you refer to the Lively as the basis, but the broadly similar Leda class has a bit more information available... and she is a 1091 tun BM ship, displacing only around 1496 ton. 

2000 is closer to the displacement of the much larger US superfrigates such as President/Constitution - 1576BM, 2200 tons.

Developer

Thanks for noticing this. I looked in the editor, and the mass of the ship is 1923 tons. 1800 tons of this is the hull (the guns are 90). It looks like this 1800 figure is one I wrote in by hand, rather than calculated, and I don't remember where I got it from.

I can see the relation displacement = about 1.5*burthen in a few places. I have one source, "The Command of the Ocean" by N A M Rodger, on the 18th century royal navy, that says "for a fully stored warship" the displacement is about twice the burthen. Do you know what the state of storage is for your figures?

This is something I am reluctant to mess with, as I am happy with the way the acceleration, stability etc. are tuned at the moment. But I will have to look at this stuff again if I ever get around to flooding and sinking.

(1 edit)
I assume it is at the load waterline. Sadly I don't have the table of lading, nor an accurate set of curves to integrate. It could be the ship fitted out, but with few stores. On a different point, ordnance seems to be relatively weak vs the structure of the hull (and guns on the engaged side or on the upper deck in general). I had to station within ~100yds to see hulling or a very few 9lb gun losses (and the majority on the unengaged side hit over the rail). While these are "only" 18 and 9lb long guns, the expected performance of the 32lb gun was 1200yds to penetrate the gun deck of a 74, 400 when fired double (with reduced charge). This level of performance should be seen from an 18lb (short pattern) long gun as used on the frigates at around 700yds (0 yds for double) The frigate is more lightly built, so there should be a small useful distance for double (with it's necessary reduced charge), but also an significant extension of the useful range of the single shot with distance charge (full 1/3rd weight proportion). (Similarly the 9lb single shot from the typical pattern of gun should give a useful penetration of the 74 at around 400 yds, but no useful penetration of double). Rigging seems to fall apart a little too quickly compared to damage to the hull systems (crew/guns/hulling) accruing. (A 12lb shot penetrating the side was considered a minimum to be useful in disabling guns, the lighter ordnance being taken as only useful for damaging wooden structures and rigging, or wounding crew. Rate of fires seem a touch high (I interpret the 3 rounds in 5 minutes to include the first loaded shot, and to not include restoring the ordnance to a loaded state at the conclusion - so ~2.5 minutes for the (complete) cycle for each of the first three shots - later shots are limited by heating, with no more than 20 shots permitted per hour if premature discharges (from heat of the bore), excessive recoil and bursting being a risk with higher rates. This makes coming into the wind less obviously a bad idea than with a 30-60 second reloading cycle, as you pass your head or stern across the direction to the opposing vessel.
Developer

I looked at the shot damage code (possibly for the first time since 2014). I'm tracking the kinetic energy of a shot. According to a comment in the code, an 18 pounder shot at 500m/s penetrates 2ft of oak, and I call it a hulling if the energy is more than that (with some randomness). For damage to crew and rigging etc. I just came up with some numbers that seemed reasonable, which shouldn't be hard to tune.

I set the rate of fire at the maximum plausible one. I agree it's a touch high. It would be good to model this better, and change it over time with crew strength and morale etc. Some of the code for this is there already but I'm afraid I'm unlikely to get around to fixing this up.

(And sorry, it looks like the 9 lbers are actually firing 18lber shot.)

Minor adjustment to the statement on rate of fire (gunnery manual suggested 5 minutes for the first three discharges as stated - my interpretation is loaded to unloaded). the first 20 rounds in the first hour, five minutes between shots after one hour at that rate of fire. This for naval pattern iron guns.
Question, do you have a centre of lateral pressure for the underwater hull which migrates with headway/sternway, being around the 1/3-1/4 point from the PP it is moving towards when motion is fully developed and leeway is low enough for 'longitudinal flow'. It feels as if the rudder has a little too low authority going to windward with headway and a little too much with sternway on, but I can't see what the model is doing.
Developer

Thanks for the questions. Sorry for not replying to this before - I only just saw it.

I am away from my PC right now. The way it should work at the moment is that the sideways lift generated by the rudder does not care whether you are going forwards or backwards (it probably should care). The place that the lift acts is interpolated between a particular position forward, at 1m/s, to a particular point aft, at -1m/s. I don't remember how I set up the aft point. The forward point is somewhere around 1/3 of the way from the front of the ship. It's tuned fairly carefully; I want enough instability so that you have to worry about the sail plan, but not so much that tacking becomes trivial. You can move this point around in one of the debug menus, there's a slider called "ardency" or "griping" or "by the head" or something like that.

Why do you think there is too much authority with sternway?