Jump to content
Sign in to follow this  
infiltrator_2k

Lags A Consequence Of Having A Populated Mission - Measures To Reduce It?

Recommended Posts

Sounds like a memory leak maybe? Or the simulation module stopped working? Try the unit caching script and report back. It's super simple to use, and you don't need to jump through any hoops.

Share this post


Link to post
Share on other sites
Well, last night I added the Repetitive Cleanup script and some Simulation Modules to the military sites that had a lot of AI and everything seems to be going well for a while and my friend saw an increase to his FPS and he averaged over 20 FPS. Then after a while it crawled to 7 FPS. The Repetitive Cleanup was working as was the Simulation Modules, so I'm stumped to what could be causing the issue now.

Try running a script on the server to see what's going on behind the scenes.

Something like this:

if (not isServer) exitWith {};

while {true} do
{
    diag_log "---------------------------------";
    diag_log format ["Server FPS:  %1", diag_fps];
    diag_log format ["Mission time:  %1", time];
    diag_log format ["Group count: %1", count allGroups];
    diag_log format ["Unit count: %1", count allUnits];
    diag_log format ["Dead count: %1", count allDead];
    diag_log format ["Object count: %1", count (allMissionObjects "All")];
    diag_log format ["Vehicle count: %1", count vehicles];
    diag_log "---------------------------------";
    sleep 60;
};

Then run it and see what's happening in the rpt.

Edited by Das Attorney
syntax error

Share this post


Link to post
Share on other sites

That's a really great idea Das.

Edited by Iceman77

Share this post


Link to post
Share on other sites
Sounds like a memory leak maybe? Or the simulation module stopped working? Try the unit caching script and report back. It's super simple to use, and you don't need to jump through any hoops.

Will do. I know the simulator module was working because I played around with its settings to find the right distance to set it; 2000 metres seems a little excessive. I set it at 1000. But, I can often snipe at 1.3KMs so I might change it. Of course, using your binos is a good way of telling if the simulator module is working.

I'm away with work until Friday but when I get the opportunity I'll definitely try the caching script. The potential of having a populated Altis map is pretty exciting. I've stuck with Stratis because I thought Altis was too big, but if there is the indeed the potential to populate the island then happy days.

Share this post


Link to post
Share on other sites

Yeah and/or do what Das suggested. That will tell you exactly what's going on in the mission.

Share this post


Link to post
Share on other sites
Yeah and/or do what Das suggested. That will tell you exactly what's going on in the mission.

Definitely. Nice one Das.

Share this post


Link to post
Share on other sites

A simple way of reducing lag is having less units. I made EOS a while ago for this exact reason. Maybe try it out and see if it is what you are looking for.

Share this post


Link to post
Share on other sites
Thank you for this.

I am very curious about the limits of performance with HC. Do you have a sense of how far you can push this in terms of the number of AI units on field at a time? I'm working on a dynamic war mission which will push the effective AI population of Altis (Enemies, civilians) above 1,000. Unit caching is perfectly capable of this under ideal circumstances, but in certain cases unit caching provides no advantages (such as in cases of large numbers of players scattered over the map.

Is headless client something that can 500+ units, each in groups running AI scripts such as UPSMON?

I am not sure of the limit for ARMA3, but this link suggests HC for ARMA2 can support up to 300+ AI concurrently.

Note if you want to test DS, HC and yourself as a Client on the same machine, you must unplug yourself literally from the internet. Supposedly there is a cdkey issue where any cdkey can support only one client (HC is a client) from one machine. So DS no cdkey required but a HC and an actual player client are two separate clients.

Guys, there is a tutorial on HC to Arma 3?

Here is the tutorial for setting up missions in ARMA 3 with HC enabled.

Note the good thing is that in absence of a HC, the mission still works. Its just that with a HC, you can offload the AI to another dedicated process for better performance.

Here is a good post about "multiple" HC for A3 if anyone ever wants to make a MMO within the ARMA 3 engine. I can see a huge war or survival type persistant servers with this kind of setup.

Edited by Valken

Share this post


Link to post
Share on other sites
Try running a script on the server to see what's going on behind the scenes.

Something like this:

if (not isServer) exitWith {};

while {true} do
{
    diag_log "---------------------------------";
    diag_log format ["Server FPS:  %1", diag_fps];
    diag_log format ["Mission time:  %1", time];
    diag_log format ["Group count: %1", count allGroups];
    diag_log format ["Unit count: %1", count allUnits];
    diag_log format ["Dead count: %1", count allDead];
    diag_log format ["Object count: %1", count (allMissionObjects "All")];
    diag_log format ["Vehicle count: %1", count vehicles];
    diag_log "---------------------------------";
    sleep 60;
};

Then run it and see what's happening in the rpt.

OK, I'm home after a very long week at work, but I should warn you I know absolutely nothing about scripting. The scripts I've used are publically released scripts that I've followed the instructions to install. Saying that, I think I'm beginning to jet the gist of things. TBH, I never even knew what the rpt was, but it's amazing what you can find out with a search engine :) Anyway, I used code to create a .sqf script file and manually executed it via the debugging console. I was executing the script by adding the exe line to the init file, but I was just experimenting to see if it would work either way. Like I said, I'm beginning to grasp things, albeit slowly. No doubt I could in theory add the script to run via a trigger, but I think I'll run it from the debug console, or is there an easier way?

I never knew so many errors could being generated. It explains why my mission has been incredibly sticky for a few moments and the very beginning of the mission. The simulation modules are definitely working as I've tested their effectiveness by manoeuvring in and out of the configured distance. But here are my problems - note: "Very large search for 75241 (>320 m) Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)" keeps repeating itself over and over and spamming the log. BTW, how do I locate the 'ID numbers' to see what's causing the issue? There's literally thousands of them on the maps :/

**UPDATE ***

I've managed to clear the a lot of BTC's errors i.e. "Error position: <_veh,_var,"BTC_mobile_east"] spawn BTC_v> etc.. " by correctly editing the BTC's init file and setting the unused vehicles with an array.

These are the remaining errors:

LODShape::AddLoadHandler: Handler not present in shape [a3\weapons_f\acc\reticle_marksman_f.p3d]

LODShape::AddLoadHandler: Handler not present in shape [a3\weapons_f\acc\reticle_arco_f.p3d]

LODShape::AddLoadHandler: Handler not present in shape [a3\weapons_f\empty.p3d]

Attempt to override final function - bis_functions_list

Attempt to override final function - bis_functions_listpreinit

Attempt to override final function - bis_functions_listpostinit

Attempt to override final function - bis_functions_listrecompile

"Infiltrator_2K/BIS_fnc_log: ["TEST",["onLoad",[Display #105],"RscDisplayLoading","Loading"]]"

Attempt to override final function - bis_fnc_missiontaskslocal

Attempt to override final function - bis_fnc_missionconversationslocal

Attempt to override final function - bis_fnc_missionflow

soldier[O_Soldier_AT_F]:Some of magazines weren't stored in soldier Vest or Uniform?

soldier[O_soldierU_LAT_F]:Some of magazines weren't stored in soldier Vest or Uniform?

soldier[O_Soldier_AR_F]:Some of magazines weren't stored in soldier Vest or Uniform?

soldier[O_Soldier_AA_F]:Some of magazines weren't stored in soldier Vest or Uniform?

soldier[O_sniper_F]:Some of magazines weren't stored in soldier Vest or Uniform?

"Infiltrator_2K/BIS_fnc_log: ["TEST",["onLoad",[Display #46],"RscDisplayMission","GUI"]]"

"Infiltrator_2K/BIS_fnc_log: ["TEST",["onLoad",[Display #12],"RscDiary","GUI"]]"

"Infiltrator_2K/BIS_fnc_log: ["TEST",["onLoad",[Display #105],"RscDisplayLoading","Loading"]]"

"---------------------------------"

"Server FPS: 9.24321"

"Mission time: 0"

"Group count: 107"

"Unit count: 183"

"Dead count: 0"

"Object count: 512"

"Vehicle count: 353"

"---------------------------------"

"Infiltrator_2K/BIS_fnc_log: ["TEST",["onLoad",[Display #300],"RscUnitInfo","IGUI"]]"

Performance warning: Very large search for 75241 (>320 m)

Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)

Performance warning: Very large search for 75241 (>320 m)

Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)

Edited by Infiltrator_2K

Share this post


Link to post
Share on other sites

Some of the errors you can ignore as it is issues with Arma 3 at large, and not specific to your mission. The ones you should look at are these ones.

Performance warning: Very large search for 75241 (>320 m)
Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)
Performance warning: Very large search for 75241 (>320 m)
Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)

Is there anything going on where you're scanning for objects in the mission? It looks like maybe you're doing a nearestObjects search with large radius.

EDIT: Good work on opening up the rpt and addressing the errors - it's often the best way to figure things out.

Edited by Das Attorney

Share this post


Link to post
Share on other sites
Some of the errors you can ignore as it is issues with Arma 3 at large, and not specific to your mission. The ones you should look at are these ones.

Performance warning: Very large search for 75241 (>320 m)
Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)
Performance warning: Very large search for 75241 (>320 m)
Performance warning: Search for 75241: bw_setbig_brains_f.p3d was very large (2464 m)

Is there anything going on where you're scanning for objects in the mission? It looks like maybe you're doing a nearestObjects search with large radius.

EDIT: Good work on opening up the rpt and addressing the errors - it's often the best way to figure things out.

Nice one Das. I've found out what the issue was. I had a game logic module that I used in conjunction with a trigger to detect when Air Station Mike's radar installation was destroyed. Little did I know that the update reallocated new IDs for the buildings. It explains when I investigated why the AI weren't following their waypoints to the radar's sentry positions.

I updated the triggers condition with the correct updated ID and the error's gone :) I think I've learnt a considerable amount about debugging by resolving this single issue. It's quite, daren't I say it addictive and satisfying messing with the editor. It's hard work, but rewarding. I eventually hope to learn how to script.

Cheers ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×