Well, I broke down and went back to my original plan of using raycasts to steer the whales and pirate ships around the map.. Originally I had issues, didn’t have the patience and scrapped the whole system in favor of using waypoints.. which created yet another issue.. Do I manually build 2-4 paths for each level in the game, or do I attempt to implement a path finding system.. Waypoints did actually work, but not nearly as well as I wanted.. So the other day I ripped all of that out and started working with the raycasts again..

As of tonight, each whale and pirate ship is now using a group of 5 raycast ‘feelers’ to sense the terrain around them. The only thing I’m paying attention to is the islands themselves.. Depending on which ray hits the island we make a turn in the opposite direction. Once the object hits the other side of the screen and goes completely off, a new target position is calculated and applied and our object turns around on its return path.. It may have taken me a day or two to work out, and while the code is mildly hacked together (including separate routines for left to right and right to left), it works beautifully. I got tired of fighting it.. get it working one way, and it failed on the return trip.. this solution worked out just fine and noone could tell the difference.

Now I can return to building the levels for the game which will be 100 times simpler now! W00hoo!