Home > Projects > das boot

das boot

April 24th, 2009 JB Kraft

Hobee Project

I have been working on a sailboat script for the past few months. I looked over the Tako scripts a few times and figured I could do better so away I went. It has been quite the experience really but the last week has really heated things up in that world. Mothgirl Dibou, the creator of the Flying Fizz released a full perms DIY boat kit this morning and changed everything. If you are not familiar with the sl-sailing world here is the basic story of what I have learned since starting this project and where it stands right now.

Somewhere last year I made a nice little catamaran for cutting around my little harbour. I chucked that Tako script in it and that was ok for a while but I wanted to know how all the physics actually worked and all that so I started my own script. Vehicle physics in LSL is pretty limited really. You set the params of your thing as a boat, or car and then set it physical. Add a little thrust and you’re done. Sailboats though, to be at all realistic require a whole lot more.

Real sailboats have a huge variety of influences acting on them, wind, waves, currents, the shape and size of the hull, the sails, the displacement, the list goes on and on. Within each of those factors, like a mandelbrot of math, the factors expand in innumerable ways. So to make a reasonable sailing simulation, you need to account for a lot of those factors. Also, if you intend to race with other boats there needs to be a mechanism to share those influences among the boats as SL does not provide them at all.

Let’s start with the obvious and biggest influence, wind. The wind in SL is completely flaky and useless. Actually most everything in SL is completely flaky and useless but that is another post. The SL wind spins and swirls around and relying on it for your thrust is not a happy experience. So you have to fake your own wind. That too is easy enough really, pick a vector and a magnitude and away you go. But wind is not a constant, it is affected by objects, land masses, temperature, other boats, etc. Kanker Greenacre, the author of the ubiquitous Tako scripts came up with a crude way to handle wind by creating the Windsetter. It babbles away on a certain channel yammering various wind info and so all you have to do is have your boat pick up that broadcast, apply it and you are flying. The other boats around you are doing the same with the same data and now you can race. Neat! Kind of. All the Windsetter does though is provide the vector and magnitude and that’s about it. To really make things interesting you need more variables.

Along comes Mothgirl Dibou and, unknown to me at the time I started my little project, she is working on that very thing. A critter called WWC (wind, waves, current) that oddly enough provides data for not only wind but waves and currents. These are huge things to add to the equation. Waves make the boat slow down as it climbs them and speed up as it goes down the other side, or, if the are abeam, pushes the bow of the bow away from where you are steering and then away in the other direction. Current is a pretty obvious one too. The water you are sailing on is all moving in some way relative to the way you are pointing and pulling or pushing your boat along with it.

So this little project of mine has expanded exponentially since I began. I now need to add the new influences to the boat dynamics and then incorporate the mechanism to hear the broadcasts of these variables. A ton of work since the SL sailing community seemed to keep fairly close wraps on how it all works and Kanker has been MIA for a while so the father of all this isn’t even available anymore. I did manage to get the boat to deal with the Windsetter but looking at WWC made me cringe a bit.

This morning, out of the seeming blue, Mothgirl released a full perms version of her Fizz scripts, which are about the most realistic sailing you can get so far, as a DIY boat kit. The timing, for me, could not have been better. Now I have the code for the WWC interpreter and her physics engine to look at. Thank you!!  I don’t feel so daunted completeting this project and I know when I am done it will be a worthwhile boat that can be competive in the SL racing scene too. w00t!

Categories: Projects Tags: ,
Comments are closed.