• 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!

Fixed Improve Performance in 3D Sailing Mode

Select everything that applies to you

  • -- WHERE DID YOU NOTICE ANY REDUCED PERFORMANCE? --

    Votes: 0 0.0%
  • -- WHAT IS THE MOST RECENT MODPACK VERSION WITH THE BEST PERFORMANCE? --

    Votes: 0 0.0%
  • Build 14 Beta 3.1/3.2

    Votes: 0 0.0%

  • Total voters
    17
Before, but that was a long time ago. I haven't played the latest atm so I can't say.
 
Just to be clear, the Beta 3.5 WIP file in the opening post will only work with the very latest version that also includes last Wednesday's update.
 
Here is an interesting bit of information. :nerbz

Periodically I take stress measurements of POTC to see how its doing. Most of the time there isn't much difference. One CPU core is working hard and the rest are loafing and the video card doesn't know it has a load on it and is loafing. Performance suffers because of this, but it's an old game made before modern CPUs and GPUs were even a dream.

Now then. A few weeks ago I got a new video card and ran a test of POTC with it. One ship sailing along at 1X speed. As you can see the GPU usage is minimal.
POTC loads sailing 1X.jpg

Now performance seems decent with this new patch so I just tested it again. Again just one ship just sailing along at 1X speed. The GPU is has a real load on it and is actually working!!! :8q You guys are on to something here and keep after it! :cheers
POTC loads light pinnace 1x time 7-3-2015.jpg
 
  • Like
Reactions: A.H
I don't think this is our doing. Computers become better also. Where in the past each component was for something else nowadays they help each other. Many gpu's can now be dedicated to processor heavy tasks. So I think when you took a new gpu or updated your drivers this happened.
I would still like to see what happens when you go to the tasks manager and set the priority for engine.exe to real-time.
especially I'm interested in the difference between normal and real-time on points where normally the game get sluggish
 
Those two charts are straight apples to apples comparisons. Same computer, same video card, and same drivers. The first one is pretty much the same as all the others I made too. Only that last one is different, and the only change has been the latest patches of the last 2 days.
 
Those two charts are straight apples to apples comparisons. Same computer, same video card, and same drivers. The first one is pretty much the same as all the others I made too. Only that last one is different, and the only change has been the latest patches of the last 2 days.
Uhm... That second screenshot shows CoAS, not PotC. :confused:
 
Today my game is notable stuttery while sailing around Nevis in Early Explorers with the Golden Hind.
It isn't because the game is busy writing log files, because I erased them and there aren't new ones being generated while sailing.
 
Uhm... That second screenshot shows CoAS, not PotC. :confused:

That is my desktop, not the game. I do NOT play in windowed mode as that make bad things happen on my system.

I discovered something last night about my mouse.
Now when standing on deck in POTC if you look around you see the mast, railing, and rigging moving. In my game they always move bip, over here, bop, over there every half second or so. This is a large movement and works like clockwork.
Last night I was looking at my mouse software (Logitech G500) and it has two settings for default. The DPI rate which is pointer speed and the polling rate. I'm not sure what polling does, perhaps it increases accuracy?
Anyhoo it was sett to 500 times per second. I set it to 333 tps and played POTC. The movement is no longer back and forth but more jittery and maybe even a little random.

So, for some reason the Storm engine is tied to the mouse and mouse settings do have an impact on performance. I will be looking into this more.
 
Last edited:
From what I can see most of the lag is caused by ship AI. I don't notice much lag when sailing with only friendly ships etc. Most problems occur when there are enemies or when I'm sailing a false flag (I think). So maybe we could look into the flag recognition soon and try to optimize this function also.
Besideds that I think we could optimize some of the other functions.

If someone wants to help me here you could do the following (which would spare me a lot of time).

Try to find out which functions are called most often during sea travel and sea combat.
The easiest way to find out is just by adding traces to functions which sound logical, or just adding traces to all functions and see if you see theire name pop up often.
Please let me know which of these functions are called often and I can see if we can optimize them.
 
From what I can see most of the lag is caused by ship AI. I don't notice much lag when sailing with only friendly ships etc. Most problems occur when there are enemies or when I'm sailing a false flag (I think). So maybe we could look into the flag recognition soon and try to optimize this function also.
I am going to anyway, because it is bugged.
See here for details: http://www.piratesahoy.net/threads/behaviour-for-recognizing-false-flags.24494/page-4#post-512796

I seemed to have performance issues even without flying a false flag though, but perhaps it still IS checking things when it shouldn't and wasting valuable processing time that way. :facepalm

Try to find out which functions are called most often during sea travel and sea combat.
The easiest way to find out is just by adding traces to functions which sound logical, or just adding traces to all functions and see if you see theire name pop up often.
Please let me know which of these functions are called often and I can see if we can optimize them.
That'd probably be useful, yes. :yes
 
I have by now disabled and/or broken just about all fancy mod-added false flag and AI code.
But I still notice some jitteriness in the game performance. So that doesn't seem to be it.... :confused:
 
In my testing of the Sea AI, I definitely am noticing jitteriness in the game performance.
There is a lot of stuff being called through LogInterface, but even skipping ALL of that does not solve it:
Code:
void procUpdateTime()
{
   return;
   ref mchr = GetMainCharacter();
So wherever it comes from, it probably isn't anything related to that.
Which means it isn't the time display, AI code, false flag checking or lagoon sea colour mod.
 
when I fixed some of the other stuff I will try to look into it more. But good to know its not one of those things tough.
Just wondering if you are sure? From what I could see the AI code is called from multiple places...
 
That function is the one that triggers the mod added AI stuff every second.
Have a quick look through that code to see what I disabled this way.
 
While I wouldn't dream of going back to the stock game, it was UNBELIEVABLY SMOOTH!
And Beta 3 wasn't too shabby either.
 
As far as I can tell, game performance is reasonable until they are hostile ships around.
More hostile ships = worse performance. So apparently something is being checked a lot in battle that isn't checked normally.
 
Working on this now and then and I found something which should increase the performance on sea.
I just had a 8 ship battle without any stuttering ... so that sound promosing.

Please put this file in "\PROGRAM\SEA_AI"
And let me know if you get an performance increase.
If possible try to do a sea battle or something without this one first and check the fps then try again with this file and see if there is a difference.
Will try to increase the performance more over the next month
 
Back
Top