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

Lag and Performance issues in areas with many NPC's

DinViesel

Landlubber
After deleting the old POTC Build 13 and installing Build 14 beta 4.0 along with the extra fix archive from ModDB on vanilla POTC, I have encountered lag and stuttering in areas with too many npcs which stops after a while, usually after 20 seconds or less, depending on the number of npcs present, indoors I don't really have any performance issues at all, as for my laptop specs, I have a N3710 CPU that can go up to 2.5 GHz, 4gb ram and have Intel integrated graphics (I use the Intel fix), the log files uploaded here are the ones made after I started Jack Sparrow's campaign and walking around the port with the Verbinski character.
 

Attachments

  • system.log
    141.1 KB · Views: 258
  • compile.log
    25.1 KB · Views: 233
Thanks man, I forgot to mention that I searched the forums but couldn't find anything like this, locking FPS to 60 and using other fixes in that thread didn't solve it, fps actually stabilizes after 20 seconds in my game unlike the issues users mention in that thread. I believe that some scripts are causing FPS issues or maybe something from the log can point to the problem, I didn't have these issues in Build 13 and I don't use ENB
 
What @DinViesel describes matches with the lag you get in each new location from the Levelling system.
This indeed stops after a few seconds and should be good then for the remainder of the game.
It's just part of the initialization process.
 
I guessed that was the case, the initialization process is long on my laptop and FPS drops to 2-6, is there a way to fix this by using files from older versions or to disable some parts? Otherwise there are no problems apart from script induced lag
 
At the top of Leveling.c there are some values though to play with.
With a bit of luck, you can tweak them in such a way that they reduce the strain on your laptop.
 
I have tried and didn't have luck with Leveling.c . I have COAS and installed GoF 1.2 which, although it has 11gb uncompressed, runs perfectly and smooth in cities and sea/battles/map. Guess POTC engine can't run efficiently on my laptop, thank you guys nevertheless.
 
Hi @DinViesel,

Note that your CPU's normal operating speed is actually 1.1-1.6 GHz, and that these resources are shared with the 400-700 MHz GPU, as you actually have an Intel HD Graphics integrated graphics card in that laptop, not a dedicated graphics card. Intel HD Graphics is not optimal for gaming at all (it's very rudimentary), and causes known problems with the Storm engine (for which there are some known potential workarounds available, including dgVoodoo).

Your CPU (Processor):
Intel Pentium N3710 Laptop Processor - Benchmarks and Specs

Your GPU (Graphics Card):
Intel HD Graphics 405 (Braswell) - Benchmarks and Specs

While both are limited in capacity, the main drag here is your GPU, actually -- which explains why it the game slows down when there is much geometrics to handle (such as many different characters moving).

You will need to turn some graphics features off in order to improve game speed.

You're actually lucky you're able to play the game at all on your computer, so I would consider what you have now optimal and stable -- whatever changes you make to it, trying to improve the performance, back up your current setup/install first!

If your laptop also features a second, dedicated graphics card, then definitely try and switch the game in the graphics card control software to use the dedicated graphics card instead. It will make a world of difference.

Hope this insight helps.
 
Last edited:
I agree that my laptop isn't really suited for gaming, but I believe that the problem here is that my laptop can't seem to handle older games well, the problem with New Horizons would be the large amount of scripts that need to be initialized. After waiting for half a minute in areas where there are many NPC's I didn't experience lag anymore, leading me to the conclusion that graphics can be handled, but those 30 seconds of waiting combined with long loading screens are a deal breaker. City of Abandoned Ships with GoF 1.2 installed, on the other hand, works surprisingly well despite COAS being more demanding than POTC, maybe GoF doesn't have that many scripts running or maybe my laptop can't handle POTC with Build 14 as it is an older game (I had fps issues with Build 13 too, but were tolerable). Fact is, the GOG version of COAS runs more efficiently on my system than POTC, leading to the conclusion that no problem lies with the mod but in POTC which can't be handled by my system, let alone with mods added.
 
Storm Engine 2.8 from my experience, is more optimized when compared to Storm Engine 2.

So it makes sense to me, I have seen better performance in COAS/TEHO sometimes on my laptop.
 
After waiting for half a minute in areas where there are many NPC's I didn't experience lag anymore, leading me to the conclusion that graphics can be handled, but those 30 seconds of waiting combined with long loading screens are a deal breaker.
The first thing that the Storm Engine does on start is attempt to load every object present in your current environment (in sight) into active memory (so that loading new objects will not slow gameplay down). This is especially true for older versions of the engine, as @The Nameless Pirate has pointed out. POTC is only the second official Sea Dogs game from Akella, so it follows that the rendering and resource management in that version of the Storm Engine is far less optimised than in later versions. Your slow GPU (and, to be clear, I'm not knocking your setup, just being real and honest here) helps to ensure that this loading process (calculating and rendering the objects, putting them into memory) takes a long time.

And, yes, this is generally true for older 3D games in general, but a lot of the slowdowns you are exeriencing with older games are actually due to newer versions of Windows and graphics cards dropping support for older rendering methods. This is less a graphics-card-related and more a Windows problem in general. This is why we have solutions such as dgVoodoo to restore some of that graphics support for the game.

As for COAS with GoF being more resource intensive than POTC with NH, that's actually untrue -- POTC may have less refined graphics, but NH has a lot more user created content, and a richer open world to play in (therefore there's more to load, more resource intensive, despite being the older game). This also helps to explain why newer builds of NH are running slower on your setup -- due to having a lot more content to load in them.

The moral lesson in this story? Don't judge book by its cover. ;)
 
Last edited:
The Levelling system in PotC is mod-added and cannot be found in AoP 2.
It has a notable impact on game performance.
Mostly right after loading a new location.
It goes to normal after 30 seconds or so.

Some computers seem to get hit extra hard by this.
 
@Cerez is correct about Win10 deprecations/changes that can cause DX8 and DX9 framerates really slow (has to do with how they handle software vs. hardware vertex processing initialization), but that would be a permanent condition in the game. Since this condition is for each scene load, and lasts 30 seconds or so, which means @Pieter Boelen is correct that it is definitely the POTC New Horizons leveling; I briefly looked at that code and its use of recursive calls for each character posting events many times is the most likely cause because script processing in this game is the slowest part of it....heavy laden script (message posts and many function calls, attribute assignments, etc.) calls are very slow. Once they are complete for all the characters in the screen, the framerate returns to normal.
 
It is rare these days that the processor would get bogged down by processing code, but I suppose, if there's way too much to process, it's possible. :shrug

In my experience, a more likely scenario, still, is that the GPU is the culprit -- various shaders and rendering methods that have been intentionally obsoleted (in newer version of DirectX) to be precise, putting more work on both the GPU and the CPU. If, by such way, rendering is forced onto the CPU (something that in games they call "software rendering"), what you get is exactly what you're experiencing: the game becomes practically unplayable until everything loads into memory.

The GPU is meant to lighten this load on the processor, as CPUs are not nearly as efficient at handling resource-heavy 3D and running all the code/software at the same time.

Once everything is loaded into active memory (provided that you have enough memory to store it), gameplay returns to normal until new objects and resources need to be loaded (at which point you will experience some lag again).

The speed of the RAM memory cards themselves can also cause a (smaller) performance hit -- if the GPU is throttled by their speed.

Edit:

To put the technical notes aside, essentially what I'm saying is that maybe the processor is not bogged down because there is too much code/script to process, but because it is preoccupied with what it shouldn't have to be taking care of (aspects of 3D rendering).
 
Last edited:
I know this is a long time ago but I just saw this post and for future reference.
In the leveling.c file there is a line:
Code:
#define POSTINIT_MAX_ALLOW_LEVEL_POST    0        // INT - Characters higher then this level wont be going trough post init, lower this to get shorter post init but longer loading times
The value will be different, but if you set this to 0 then all initialization should be done during loading.

The leveling system works in a way where it will do most stuff during loading but low level characters are done very quickly so it will just do these character in the first few seconds when you enter the area. If your CPU is slow this will indeed impact the game severly. By setting this value to 0 you'll make sure everything is done during loading, do note that it will probably add like 10 to 15 seconds of loading for the areas where you have these stutters.

Also as far as I know this problem should only occur on the first time you enter an area, the second time you enter it most characters should be initialized already, unless it's an area with a lot of random characters.
 
When does post init happen - when the character is first defined at the start of the game, or when you enter a scene where that character is present?
 
When does post init happen - when the character is first defined at the start of the game, or when you enter a scene where that character is present?
when you enter a scene where the character is present.
 
Back
Top