Projects » SFsail Sailing Engine

SFSAIL sailing engine


Learn more at

SFsail is a new sailing engine written from scratch for OpenSim. It works similarly to BWind and has mostly similar commands. Sit on a boat and say 'help' for a list of commands.

You can find the SFsail boats in the OpenSimWorld Region:


- Boats are tuned to BulletSim by default. If you use ubODE, edit the .SFsail script and change the setting IS_UBODE=1

- The first avatar who sits on a boat is the commander. If the commander stands up the boat moors. Another person can then sit to operate  the boat

- You can operate the boat with left/right arrows (steering), forward/back arrows (trim of the sails) and PgUp/PgDown to rotate the Spinnaker

- Say 'raise' to raise mainsail + jib

- Say 'lower' to lower all sails

- Say 'moor' to stop and anchor the boat

- Say 'jib' to hoist/lower the jib

- Say 'genoa' to hoist/lower genoa (if available)

- Say 'spin' to hoist/lower spinnaker (if available)

- Say 'trim' to engage Autotrim which automatically trims the sails to their optimal angles

- Say 'hold' to keep the boat pointing at the same angle

- Say 'flip' when the boat is moored to flip the boat (useful when stuck on a dock)

- Say 'motor' to turn on the motor. Then use the up/down arrows to change throttle. Say 'moor' to stop  the boat

- Say one of n,s,e,w,nw,ne,sw,se to set the Wind direction

- Say 8,11,15,18,21,25  to set the Wind speed

- Say 'hud' to turn on/off the hover text of the boat

- Say 'adv' to turn on/off advanced hud text

- Say 'milesreset' to reset the miles counter (shown in the hud)

- Say 'setter' to enable/disable listening to the region wind setter (or SFsail Manager)

- Say 'dest x y' to engage the autopilot to steer towards the region coordinates x,y

- Say 'dest x1 y1 x2 y2 x3 y3 ...'  to engage autopilot to follow the route from region points x1 y1 ...  Say 'stop' to stop autopilot

- Say 'follow <avatar name or object name>' to engage autopilot to follow another avatar or another boat. Say 'stop' to stop following

- Say 'route <route-name>' to begin a rout (requires Sail Manager / See below)

- Say 'stop' to stop the autopilot / stop following




The 'SFsail Manager' object is a wind setter (creates wind for the 'setter' command), and a place to rez and store your boat routes. If you don't already have a wind setter, touch it and select 'Setter ON'.

Boat routes are stored in the notecard '.Sailroutes' inside the manager object, which contains lines with routes. In each line, the x y coordinates of a route are defined (similar to the 'dest' command).

Each line is as follows:

<Route Name>=x1 y1 x2 y2 x3 y3  x4 y4  ...

For example a  route named 'Tour' line could be:

Tour=150 160 270 380 200 100 160 160

You can then engage the autopilot to join this route from any boat by saying:

route Tour

The boat will join the route at the nearest point of the route and continue until the end. You can stop the autopilot at any time by saying 'stop'

You can use the object "SFsail Route helper" to help you make a route quickly. Rez it over water, and then, for each point, move it and then touch it. The route will be printed in the chat for you.

 (Note: routes are approximate, the boat will try to reach within 10 meters of each route point. You will have to correct the boat if it goes against the wind)


You can use a second boat and an NPC to follow your boat. Rez a second boat that will follow you. Edit .SFconfig and change "Firstname Lastname" to your own avatar name, for example:

Button=FollowMe=LINKMSG{-4;889;follow Satyr Aeon}

Then sit and unsit to reload the configuration. Then Right click to touch the boat (without sitting) and select Options ->NPCs->ADD->Sailor. The NPC "Sailor" should sit on the boat now. Touch the boat again and select Options -> FollowMe , then select Options -> Autotrim and then select Options->Raise. The boat with the NPC will now follow you. You can sit on your own boat and sail together.


You can change the configuration variables at the top of the .SFsail script to tune your boat.

IS_UBODE=0  // Change this to 1 if you are using UBode

ACCESS = "A";  // Change who can drive the boat. the setting can be: "A"=All  "G"=Group "O"=Owner only

MAX_ANGLE = 70;     Maximum allowed boom angle

HUD_ON=1     // Change this to 0 if you don't want the Hover text by default

ADV_HUD=1     // Change this to 0 if you don't want want advanced info in the Hover text

THROTTLE_MAX=5 // Change this to the maximum throttle of the motor

SPEEDUP=0.9;        // Change this to larger or lower values to make the boat overall faster / slower

ENABLE_DYCAM = 1;  // Change this to 0 to  disable the dynamic camera

KEELING = 0.2;     //  Change this to larger or lower values to make the boat keel more or less

LEEWAY = 0.2;      //  Change this to larger or lower values to make the boat to have more leeway (sideways drift)



The SFsail boats use SFposer  to handle the animations. SFposer Buttons are added to the Options menu to send commands to the boat.  The boat accepts commands through link_messages with num=889

To add an SFposer button, add a Button line to the .SFconfig notecard. For example to add a button to hoist the genoa, add the following line to .SFconfig:


Similarly, you can create a route for a boat by sending an appropriate 'dest' command:

Button=Start Route=LINKMSG{-4;889;dest 150 160 270 380 200 100 160 160}

The SFsail boats contain a button for the boat to follow you. You need to edit .SFconfig to replace "Firstname Lastname" in the Button's configuration line with your own avatar's name:

Button=FollowMe=LINKMSG{-4;889;follow Satyr Aeon}

The SFsailboats come preloaded with one NPC named 'Sailor'. To rez the NPC to follow you with his boat, click Options->NPCs->Add NPC->Sailor, then Options->AutoTrim, then Options->FollowMe, and finally Options->Raise.



The boats do not support crossing regions, unless you have OSSL permissions in both regions.



SFsail is licensed under the GNU General Public Licence v3 (GPLv3)

SFsail is inspired by the BWind engine, but it does not contain any parts of it.

Copyright (c) Satyr Aeon

Added by: OpenSimWorld
Last Update: 3 months ago
Project Category: Vehicles
👍 11 like


File name Added By Last Updated Actions
1. SFsail main script OpenSimWorld 3 months ago View
10. SFsail Manager and Wind Setter OpenSimWorld 7 months ago View
2. Example boom script OpenSimWorld 7 months ago View
3. Example Sail Script OpenSimWorld 7 months ago View
4. Example Spinnaker script OpenSimWorld 7 months ago View
5. Instruments script OpenSimWorld 7 months ago View
6. Rudder script OpenSimWorld 7 months ago View
7. Helm wheel script OpenSimWorld 7 months ago View
8. Wake script OpenSimWorld 7 months ago View
9. Motor script OpenSimWorld 7 months ago View
SFsail New Boat setup OpenSimWorld 7 months ago View


Edison Rex 3 months ago
Nice work. bit disappointing you took a couple years of my work on bwind with no attribution. But that's what happens in opensim eh?
OpenSimWorld 3 months ago
Hello. While the command names are similar as bwind, the engine is written from scratch as you can see from the source. This is not a derivative of BWind in any way. I do mention in the documentation above that it works "similar to bwind", but other than the command names i dont have anything else to attribute. This was intentional, so i can license it as GPL.

I do thank you for creating bwind, and will make sure to add an acknowledgement in the documentation (are you the creator or BWind?).

AFAIK opensim creators are far more likely to correctly attribute script creators than other grids.

If you think something has been "taken from bwind", do let me know
Edison Rex 3 months ago
Yes, I authored most of the Opensim features of Bwind, including the mesh support, commands like the hold, trim, setter code, auto tack, sail flap, the genoa (big clue), motor, all of the instrument support, and even the wind vane. If you looked at the code (and please don't tell me you didn't) you would know, I had copious comments in the code as well as release notes. I also released all that code GPL3 so this is not at all a complaint that you "took" anything. It's obvious looking at your code you refactored a lot of things. That's not actually rewriting from scratch, but again this isn't the point. You are free to take the code, refactor it, improve it (and you did, good job indeed) and distribute it as your own work. It is customary to attribute the source of the GPL work, and I'm not even going to waste our time here, I went through your code and we can be charitable and say there's no better way to do certain things in Opensim/LSL, whilst cosmetically changing bits of code and removing comments, and yes, you added a lot of new stuff and made a considerable bit of the sail engine more readable. Again, that's an honest compliment. But you saying this is not a derivative of Bwind is a bit, well, silly, as you use a lot of the functions verbatim (name changes don't fool me) and the code is, however you want to restructure it, doing the same stuff. I don't actually care about that, you not only have the right under the GPL to do that, and you have the energy to do it too. I am a big fan of open source and attribution of ideas and work is core to that. I have no interest in going line by line through the code, I know it all well enough to compare specific bits, and again, that's not what it's about. Just be honest about where the ideas came from. I haven't tried these scripts yet (I'd have to do more work to run on the 30-40 odd boats I've scripted) but I'll test it on the Zetaworlds ocean and see how it runs. By the way, my experience in Opensim has gone far downhill lately with people re-branding things, so if I sound sour, yeah, I am. In any case, good work, the code looks good, if quite familiar. :-)
OpenSimWorld 3 months ago
I am sorry, you are overstating things. The similarities end at the fact that they both use a 1 second timer, and the names of the user commands. I couldn't reuse the Bwind internals because i don't understand what they are trying to do and instead took a completly different route. SFsail tries to recreate the polar speed graph of a real sailboat (, by using vector arithmetic between wind, boat and sail angle, and a user-defined curve of optimal sail angles . I had to do a lot of research to figure out the best way to make it look realistic, and Bwind did not help here, as it uses an overcomplicated system of "if" statements and calculations that don't seem to correspond to how sailing physics work. I instead used a commercial game/sail simulator called Sailaway as a guide for how the boat movement should look/feel. The vehicle loop is completely different, there is literally nothing shared between the two systems, and thus to say that I took it and made it "more readable" is just false.

> and the code is, however you want to restructure it, doing the same stuff.

Both Bwind and Sfsail are moving a boat. It does not follow that sfsail is a derivative because they work in completely different ways internally. This is very misleading. My sail scripts , wake script, helm, windvane, instruments are written from scratch and auto-configuring. I made the meshes for the instruments too.

> whilst cosmetically changing bits of code and removing comments,

Please indicate the lines you think are changed cosmetically, because none were. What functions were used verbatim? Can you please point the things you think are just refactored code?

I know this was actually writing from scratch , not rewriting, because i wrote it myself, and i do not think the accusation of plagiarism is fair or accurate. I would not have a problem attributing code to Bwind , if i had actual things to attribute.

People can make their own conclusions. Here is the BWind code:

and here is sfsail

(By the way , Bwind and its derivatives is not GPL. It doesnt seem to have a specific licence, but the restrictions mentioned in the header make it clear that it is not compatible with GPL. You can't just slap GPL on something that is not public domain)
Edison Rex 3 months ago
you posted an ancient version. 1.39 is like 3 years old. is the repo.
bwind is definitely GPL, Becca Moullez hasn't contributed to the codebase in 10 years.
OpenSimWorld 3 months ago
Everything that i said still stands for this version.

The fact that she hasn't contributed doesnt mean it can be arbitrarily relicensed but whatever, the license of Bwind is not my business.

Sfsail on the other hand is a completely independent program that does not borrow any code from bwind or other project. I want it to be clear that the originality and license of this project is not in doubt. If you have ANY evidence of reused code, please specify the lines and why you think it is so. If not, i dont see the point in this discussion.
Allie Dawson 7 months ago
This is SO awesome!! Sorta like BWind, but SO much better!! It corrects the issues I had with BWind.!! Thank you SO much!!!