Jump to content
Sign in to follow this  
Ghosthawk

How to increase Multiplayer Mission performance?

Recommended Posts

Hi,

I made a mission which has a lot of Units and objects.

How can I increase the performance on my server?

Does the show/hide module have some good effects on the performance or are there other ways to do so?

Share this post


Link to post
Share on other sites

I would like to know some Tips myself. Trying to design epic Map and still get good FPS.

Mix results. Using spunFIN's script AI Spawn Pack to spawn/despawn AI when players

are close. Altis is almost too huge to fill with life. TPW_MOD also is great for adding 'life'.

Share this post


Link to post
Share on other sites

1. use scripts in your missions that will delete dead bodies, and destroyed vehicles after a certain amount of time

(dead bodies are still rendered and require some cpu to keep them where they are at)

2. use a caching script to despawn infantry that is beyond range of your shot

3. use very little or not at all civilian modules as they cause lag to some degree, (more Ai more possibility of lag)

4. make sure the basic.cfg is using optimal settings (will vary for an Arma2Co/Arma3 server)

5. open country side type missions will better performance then large city with lots of AI

6. Lots of AI, explosions, smoke, fires will create lag and drop performance

About all i can think of, off the top of my head.

Hope that helps.

Share this post


Link to post
Share on other sites

Other things if you use a more "script heavy" approach:

- use 'compile preprocessFileLineNumbers', preferably on start of the mission, for every script that runs more then once, especially if run concurrently and called/spawned on the fly.

- try to use call above/instead of spawn where possible.

- don't use the lazy syntax in FOR and IF statements.

take a look into http://community.bistudio.com/wiki/Code_Optimisation

greetings Na_Palm

Share this post


Link to post
Share on other sites

Cache units & objects. If this isn't an option, then cut down on object / Ai placement. More times than not the mission's location and a small amount of cleverly utilized ai can bring great immersion. If you're doing a large scale project though I would recommend using one of the ai scripts that caches units. DAC used to do this well and I think upsmon & eos does too.

Share this post


Link to post
Share on other sites

Thank you all for your suggestions.

I will give spunfin's scripts a try.

1. use scripts in your missions that will delete dead bodies, and destroyed vehicles after a certain amount of time

(dead bodies are still rendered and require some cpu to keep them where they are at)

2. use a caching script to despawn infantry that is beyond range of your shot

3. use very little or not at all civilian modules as they cause lag to some degree, (more Ai more possibility of lag)

4. make sure the basic.cfg is using optimal settings (will vary for an Arma2Co/Arma3 server)

5. open country side type missions will better performance then large city with lots of AI

6. Lots of AI, explosions, smoke, fires will create lag and drop performance

About all i can think of, off the top of my head.

Hope that helps.

Could you please give me the name of the mods you use?

Thanks

Share this post


Link to post
Share on other sites

My suggestions are base on my experience with Arma1, Arma2, and Arma2CO, I dont know of any mods, scripts, ect,. for Arma3,

I've yet to buy it but this week i will be ;) after i finish building my new computer :D

but for the sake of helping you, not sure if they will work in Arma3 so i leave it up to you:

Delete dead bodies and destroyed vehicles:

http://forums.bistudio.com/showthread.php?124600-delete-dead-vehicles&p=2016996#post2016996

CLY-Remove-Dead-script

http://forums.bistudio.com/showthread.php?113434-CLY-Remove-Dead-script

Caching script

http://www.armaholic.com/page.php?id=10102

its for Arma2, works in Arma2CO np, but idk if it works in Arma3 so has yet to be tested.

Share this post


Link to post
Share on other sites

I use [Logic] call BIS_fnc_moduleSimulationManager; after everything has been created.

//clean up using garbage collector
_nul = [] spawn
{
while {true} do
{
	sleep 600;
	{
		if (!(_x getVariable ["garbage",false]) && !(isPlayer _x)) then 
		{
			_weps = nearestObjects [_x, ["WeaponHolder","GroundWeaponHolder","WeaponHolderSimulated"], 5];
			for "_i" from 0 to (count _weps) - 1 do
			{
				_x setVariable ["garbage",true];
				[_x] call BIS_fnc_GC;
				if !((_weps select _i) getVariable ["garbage",false]) then
				{
					(_weps select _i) setVariable ["garbage",true];
					[(_weps select _i)] call BIS_fnc_GC;
				};
			};
		};
		if (group _x getVariable ["garbage",false] && !(group player == group _x)) then
		{
			(group _x) setVariable ["garbage",true];
			[group _x] call BIS_fnc_GC;
		};
	} forEach allDead;
};
};

I use a variant of this... not sure how it compares to some other scripts, but I like that it waits till your 1km away before deleting stuff.

also I try to limit the amount of triggers I have and just write the condition code myself in a script(triggers check the condition way too often for most purposes)

Share this post


Link to post
Share on other sites

I use a script called repetitive cleanup made by a guy called aeroson it can be customized to say how long dead bodies, blown up tanks should remain in the map.

Share this post


Link to post
Share on other sites

I'm just wondering about removing stuff that is "dead". You'd think that would not be an issue though.

If the game runs fine with active elements (AI, Pathfinding, communicating, etc), why would it need

to delete something that is now just an "object". It would seem logical that the "alive" units would

suck resources much heavier than after they are dead. Moot point after the fact? Thinking out loud...

Did that make sense? If that game ran fine with 200 units "alive/active", then why would the game run

worse after they are dead? Should run even better with less units for the pc to manage. Not sure... :confused:

Share this post


Link to post
Share on other sites

Why remove objects ???

Simply because each time a player connects to the server, the player has to be synchronize with the actual game. So More objects (dead or alive) means more synchro.

More synchro means less time to do the job for the server.

Share this post


Link to post
Share on other sites
I use [Logic] call BIS_fnc_moduleSimulationManager; after everything has been created.

//clean up using garbage collector
_nul = [] spawn
{
while {true} do
{
	sleep 600;
	{
		if (!(_x getVariable ["garbage",false]) && !(isPlayer _x)) then 
		{
			_weps = nearestObjects [_x, ["WeaponHolder","GroundWeaponHolder","WeaponHolderSimulated"], 5];
			for "_i" from 0 to (count _weps) - 1 do
			{
				_x setVariable ["garbage",true];
				[_x] call BIS_fnc_GC;
				if !((_weps select _i) getVariable ["garbage",false]) then
				{
					(_weps select _i) setVariable ["garbage",true];
					[(_weps select _i)] call BIS_fnc_GC;
				};
			};
		};
		if (group _x getVariable ["garbage",false] && !(group player == group _x)) then
		{
			(group _x) setVariable ["garbage",true];
			[group _x] call BIS_fnc_GC;
		};
	} forEach allDead;
};
};

I use a variant of this... not sure how it compares to some other scripts, but I like that it waits till your 1km away before deleting stuff.

also I try to limit the amount of triggers I have and just write the condition code myself in a script(triggers check the condition way too often for most purposes)

Thanks. How do I use this script exactly?

Share this post


Link to post
Share on other sites

I would like to know this as well...

Also, anyone know how you can turn ON and Off the Simulation Manager at will?

Share this post


Link to post
Share on other sites

just copy/paste that script into your init.sqf and thats it.

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  

×