It's a simple sailing game. You are the red sail boat.Use the left and right arrow keys to control the rudder.Use the up and down arrow keys to easy and trim the sail. To start moving use the the up arrow to easy the sail.Navigate around the markers in an anti-clockwise direction and beat the other boats to earn a star.The compitition gets harder each round.The wind is blowing from the bottom of the screen. Remember for thoses that do not sail you can not sail directly into the wind.The sail must be adjusted to the wind direction for maximum speed.You can watch your progress on the mini display in the botom corner. Each completed leg of the race will turn red on the mini map once completed. If you take a marker too wide it will not register as being completed.

Some of the features.Z sorted 3D sailing boats.Water and wave effects as sailing boat moves through water.Collision detection between boats and markers and boat to boat.

I'm running Ubuntu Linux with Java 1.6 b69. Just a guess, but it looks like it may be some sort of problem with the bit depth on mine, g666's and f.l.x.'s computers. Linux only has a bit depth of 24 at most and g666 lists his as 16.

Thanks for the reports. I will try and change my color depth and see if I can reproduce the problem. I just ask for a compatible BufferedImage so I am not sure why I would get back one that fails. It looks like it might be when I try to get the raster and asign it to an int array. Does anyone have a code snipet of the platform independent way of getting at the writable raster of a compatible BufferedImage.

Thanks for the reports. I will try and change my color depth and see if I can reproduce the problem. I just ask for a compatible BufferedImage so I am not sure why I would get back one that fails. It looks like it might be when I try to get the raster and asign it to an int array. Does anyone have a code snipet of the platform independent way of getting at the writable raster of a compatible BufferedImage.

I think I see the problem. Your casting the result of "image.getRaster().getDataBuffer()" to a DataBufferInt. All of our errors are class cast exceptions, involving some kind of DataBuffer , which I'm betting originate at that line of code. That cast will have to change to a plain DataBuffer for it to work without exceptions for us. Of course, I have no idea if that'll work with your code.

Yes that is the problem. But what is the solution. It looks like I have assumed I could get a 32 bit color buffer to work with. But some platforms do not support such high color. I do not think I have the space to support multiple color depths. The algorithm for rendering the water looks totally different at 16 bits and 32 bits. At 32 bits it is nice and smooth, but at 16 bits I see all kinds or morie patterns in the water. For now the workaround for thoses that do have support for 32 bit color is to change the setting to 32 bit color and it will run fine. I will have to see if there is any way to support lower color depths.

So now since I create and int buffer it should be safe to cast it back to an int[] when I get the raster.

The only issue now is that since it is not a compatible image it will be converted on each redraw which might be a speed problem on some platforms. Let me know if the problem is fixed and how the speed is with the new way of doing things. Make sure you see the java webstart reloading the jar file if not try again my site always seems to need two tries to detect the jar is out of date.

Quite nice, maybe a bit fast, but nice looking. Was first in goal, but I didn't advanced a level. Seems like one have to round the marks really close by for it to count. Varying wind directoins and stealing wind would really add to it I think, if possible to squeeze in. Boat also stops on a dime if there is no wind in sail. would be nice it if would glide a bit forward still.

Yeah after a while I started to get a vague understanding of how the wind and sail angles helped control the ship, but stopping dead immediately when you turn just the wrong angle doesn't make sense. Also I had my sails pulled all the way back, then turned and hit forward and my sails completely flipped back around

Quite nice, maybe a bit fast, but nice looking. Was first in goal, but I didn't advanced a level. Seems like one have to round the marks really close by for it to count. Varying wind directoins and stealing wind would really add to it I think, if possible to squeeze in. Boat also stops on a dime if there is no wind in sail. would be nice it if would glide a bit forward still.

Great suggestions finally some one who knows how to sail

I have done as much as I could fit in. I have made the rounding of the markers eaiser. You no longer have to be soo close. You still however can not be way away. I have slowed the game down a bit.I have added momentum to the boat so turning once moving is a little smoother.I have add a wind indicator (the red line in the middle of the mini map).And the wind now slowly changes over time.

I could not get the wind stealing in. It is too much computations to figure out who is bocking who. Too bad I would have liked to get that in.

Here's the new link so you don't have the scroll to the begining of the post.

Also I had my sails pulled all the way back, then turned and hit forward and my sails completely flipped back around

Yes if the wind is in your back and you change direction you will "Jibe". That is the wind will swing the sails over to the other side of the boat. Many an sailor has gone over board this way. When going into the wind too far the wind will colapse the sail until the "Tack" or turn through the wind is complet. Then the sails will again fill at whatever setting was present before the turn.

Think of the sails being controlled by a length of rope. The up down arrows control the rope length. The wind will simply fill the sail until the rope is taught. But if you turn you can't push a rope so the sail will be blown around until the rope is once again taught. Just like how a real sail boat works.

I won 8 times in a row, but as pointed out, I was too far away from the markers on 4 of them. It's pretty fun though. My biggest problem is learning how to tack properly. The wind is usually against you on the bottom part of the lap. I have never sailed, but know the concepts, because I read a lot of Sci Fi/Fanatasy books and they are pretty descriptive sometimes.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org