|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
06-26-2007 09:46
I have sketched out a sailboat script that actually behaves like a sailboat. Before I get carried away, are there any sailboat scripts out there I should know about? My idea works like this There is a timer. About once per second, find the current boat heading and wind direction, and use that to compute a speed, amount of heel, correct sail position, amount of wake and spray, etc. Also, check to see if the boat is approaching a no script/off-world/danger situation, and take evasive action as required. There is also a listen. For a simple start, the skipper only needs to give commands. /4 p 10 means change heading by 10 degrees to port. /4 s 20 means change heading by 20 degrees to starboard. (I guess I could use nautical points instead of degrees  Of course, this would cause the speed, heel, and sail positions to change. In some future version, maybe I will remove the absolete heading commands, and replace them with tiller commands and sail adjustment commands. I think I will also try to create telltales and a speedomemeter so the skipper can judge the wind. Comments welcome.
|
|
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
|
06-26-2007 10:33
That would be awesome. How about instead of chat commands you use a menu instead? Maybe with arrows port and starboard that when you click they move a few degrees either way. Also add other controls in the menu too along with a HUD for wind direction, headings or whatever.
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
feel free
06-26-2007 12:57
Yes, menu or hud would be good. Build it...at least give me a working template.
Me? I'm an old command line kinda guy...
|
|
Suzanne Zeluco
Registered User
Join date: 28 Feb 2006
Posts: 49
|
06-26-2007 18:28
Most of wind powered SL sailboats are based on the Flying Tako v2 scripts, that are published in the LSL wiki by Kanker Greenacre - the current non-public Tako version is 3.2 with many more features.
http://lslwiki.net/lslwiki/wakka.php?wakka=LibrarySailboat
Mat Warf has been developing different type of scripts that have more advanced physics, and not based on the Tako scripts ... see following for info:
http://slsailing.org/forum/viewtopic.php?t=841
And generally good resource for sailboat developers would be the "SLSF Sailing Developers" forum:
http://slsailing.org/forum/viewforum.php?f=12
|
|
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
|
06-27-2007 07:41
The Flying Tako scripts are excellent.
IMHO, the biggest flaw they have is that you can't sail by-the-lee, and one of these days I'm going to fix that. I've looked and I think I know how to do it.
The sail flips based on the relation between boat direction and wind direction, rather than sail angle and wind direction. That's one pretty simple fix. The harder part is making sure the force vectors continue to work when sailing by-the-lee, where the wind and sail are on the same side of the boat.
The other issue I'm curious about but haven't looked into yet is whether the force vector is based on real wind or apparent wind -- should be the latter but that might add too much instability to the model.
Just in case folks are wondering, you generally don't sail by-the-lee much, at least not on purpose. But sometimes when navigating a narrow passage or making a mark it is very handy. The main reason to implement it, though, is simply to add to realism, so folks learning how to THINK about sailing see what happens on a real boat when you jibe.
It would make jibing more difficult (more realistic) because you'd have to pull the sail in to filp the sail, and then let it out after it flips. Just as you do with a real boat. I might make it an option, for folks who are just joy-riding and don't care about realism.
|