Open StefArma opened 7 years ago
Thanks for pointing this out. Is this true even on the distributed system (I.e. without a headless but with other clients)? The AI is currently being managed by other clients.
Maybe the challenge is to use a different load balancing (not based on FPS only, but also on the number of AIs spawned by that machine, like we discussed before).
There is currently no function to compute the number of units spawned. It would be something like this:
private _count_per_id = call DICT_fnc_create;
{
private _id = [_x, "spawnOwner"] call AS_spawn_fnc_get;
private _count = 0;
if ([_count_per_id, _id] call DICT_fnc_exists) then {
_count = [_count_per_id, _id] call DICT_fnc_get;
};
private _resources = [_x, "resources"] call AS_spawn_fnc_get;
if not isNil "_resources" then {
private _spawned_groups = _resources select 1;
{
_count = _count + units _x;
} forEach _spawned_groups;
};
[_count_per_id, _id, _count] call DICT_fnc_set
} forEach ([] call AS_spawn_fnc_all)
{
diag_log [_x, [_count_per_id,_x] call DICT_fnc_get];
} forEach (_count_per_id call DICT_fnc_keys);
_count_per_id call DICT_fnc_del;
Indeed in multiplayer won't be true with your spawning assignement.
As i said the problem would remain in SP where the only fix is balancing the density as far as i know
To keep the game playable in SP without headlessclient it's necessary to remain below 120 active AI (70 is optimal)
So, i'm asking here how is calculated the amount of enemies in your code. If there is still a proportion with the marker size, once 0.2 is ready, i'll go around the map and check the density adjusting those markers if needed.