• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fix in Progress DirectSail and WorldMap island transfer inconsistencies

But honestly, I do not expect to solve all transition problems. The engine just wasn't created to handle more or less realistic sailing. :)
True. But any improvement is still improvement.

Maybe you would also get a good thought on the whole "scale" issue. Refer to my post #46 above.
I'm not sure if the current scale values for Open Sea Mod ON/OFF can possibly both be making sense.

It might be worth determining what those scale values should be. Somehow.

@Armada: Do you still have Maya versions of the worldmap and (some of) the ingame islands?
Would it help to measure them and compare the worldmap sizes against the 3D island sizes?
Of course it is doubtful that both parts of the game use the same scale system,
but maybe if you overlay a REAL island on top of the worldmap, some scale value may be gained from that?
 
@Armada: Do you still have Maya versions of the worldmap and (some of) the ingame islands?
Would it help to measure them and compare the worldmap sizes against the 3D island sizes?
Of course it is doubtful that both parts of the game use the same scale system,
but maybe if you overlay a REAL island on top of the worldmap, some scale value may be gained from that?
I do still have the files somewhere. I'll dig them out and see if I can get some measurements for you. :read
 
Sorry for taking longer than expected, but I finally have some measurements for you.
I compared the width from East to West of the following islands:
  • Antigua - Island: 2333m; World Map: 119m
  • Curacao - Island: 2808m; World Map: 137m
  • Nevis - Island: 1391m; World Map: 75m
I then found out how much larger the islands are than their World Map counterparts, with a scale of 19.6, 20.5 and 18.5 respectively.
That gives an average scale of 19.5, so it seems feasible that the islands are roughly 20 times larger than the world map.
 
That gives an average scale of 19.5, so it seems feasible that the islands are roughly 20 times larger than the world map.
That does match pretty darn well with the Open Sea Mod OFF scale:
Code:
     WDM_MAP_TO_SEA_SCALE =               19.607843;   // orig 19.607843 for this and next line
     WDM_MAP_TO_SEA_ENCOUNTERS_SCALE =         19.607843;   // was 60 in build, 10.0 in stock. NK 05-04-30
 
Now this was BIZARRE! I set sail from Bonaire and didn't get very far using the worldmap,
because I was just trying to find a nice open stretch of ocean for screenshot purposes.

Then I saw the "Land Ho" screen and a text "Hispaniola in sight on the starboard bow".
Yet Hispaniola was NOWHERE NEAR where I left worldmap to 3D sailing mode.
Wha? o_O
 
Status update. I haven't got any chance to work on this yet. I did remove the cell navigation code as a preparation and it looks like I managed to do it without breaking anything... but no progress since then.
 
Would it be worth to include those updated files in the game already?
At least the code will be cleaner and we can find out if there are any unexpected side effects.
 
Would it be worth to include those updated files in the game already?
At least the code will be cleaner and we can find out if there are any unexpected side effects.

Here. But it's only tested to the extent that nothing crashes and there are no suspicious log entries after sailing for some 5 minutes.
 

Attachments

  • DS.zip
    49 KB · Views: 192
Here. But it's only tested to the extent that nothing crashes and there are no suspicious log entries after sailing for some 5 minutes.
Thanks. I'll have a look at it and probably include it in the next Installer EXE.
Then at least we'll find out if there is any weirdness from it, so you'll know before continuing very far with it.
 
@jsv: Attached file was made by @FlayedOne in an attempt to make DirectSail ship encounters NOT force existing ships in the scene to disappear.
This copy of the file is outdated (31 Aug 2014) and not specifically related to what you are working on right now.
But since you're looking at that stuff anyway, it might be interesting.

Feel free to use it or leave it as you see fit. :doff
 
Here. But it's only tested to the extent that nothing crashes and there are no suspicious log entries after sailing for some 5 minutes.
Merged with my game now; looks perfectly OK to me.

There is indeed one odd spot with this section:
Code:
    else  // jsv: Depended on ACCURATE_NAVIGATION, needs double checking
     {
       float coastzone = GetIslandSize(pchar.location)+1000;
//       if ( abs(stf(pchar.Ship.Pos.x)) < coastzone && abs(stf(pchar.Ship.Pos.z)) < coastzone )       // orig code
       float coastdistance = GetDistance2D(0.0, 0.0, stf(pchar.Ship.Pos.x), stf(pchar.Ship.Pos.z));   // LDH 06Jan09
       if (coastdistance < coastzone)     // LDH 06Jan09
       {   
         DSTrace("Directsail encounter aborted, too close to coast of " + FindIslandName(pchar.location) + ", " + makeint(coastdistance) + " of " + makeint(coastzone));
         return;
       }
     }
But you already found that and after your clean-up, it should work just like it did before.
So even if it IS somewhat wrong, it won't be more wrong than the current situation.

Thanks for your efforts! :cheers
 
Let's try that again, shall we...? :facepalm
 

Attachments

  • CCCdirectsail.c
    65.2 KB · Views: 243
Just to put this thread back into view, a couple of inconsistencies which I've noticed are:
  • Cuba: the actual location of Cuba seems some way to the west of where it appears on the worldmap. I can sail up the east coast of Cuba on the worldmap and not see the icon showing I'm anywhere near land. Or I can be a little way east of Cozumel and well to the west of Cuba on the worldmap, get the land icon, then when I switch to 3D sailing, I'm in range of Cuba.
  • Isla Mona: starting from Isla Mona east coast (where the port is located if you're playing "Assassin" or "Ardent"), switch to worldmap, sail a little way to the west of the island, switch back to 3D sailing, and I'm back on the east coast with my bow trying to plant itself into the island.
 
Just to follow up this thread, I've done considerable work on the directsail code and I think most of the problems discussed here should be eliminated.

Island transitions on the normal map are smoother except for a couple: anything involving Isla Mona and going from Curacao to Aruba. I put code in place so that Isla Mona won't appear using directsail on the normal map, but will on the open sea map, and you can always get there on the world map. Additional code is in place but commented so that people can add conditions where Isla Mona has to appear. Curacao to Aruba ain't right, but it's reasonable: once when sailing a fast ship I was close enough to moor immediately upon transition. If you're not going 18 knots, you might find it works well enough. Actually, that's true for any transition on the normal map. :)

There were several instances of your ship not appearing in quite the right location on the map, at least before directsail had a chance to run, but I think I've got all those fixed. I've done a lot of sailing on both the normal map and the open sea map and I haven't ended up somewhere I didn't expect lately, and my ship is always where I expect it to be on the map.

There were a couple of bugs that would cause you to teleport to open sea on transition, and I hope I've got those covered as well.

There is some wonkiness when returning from the world map near an island, but I don't think it's anything I can fix.

Sailing on the open sea map shouldn't have been a problem before, and it works as intended now... any problems from before just weren't visible. I think the problems that people encountered with it were due to a problem in the loader code, and that should be fixed as well now.

Hook
 
Back
Top