D

Dreesy

Member

Last active 7 years ago

  1. 7 years ago
    Tue Apr 4 19:56:52 2017
    D Dreesy posted in CQB Unit Locality.

    I just tweaking some improvements to the above code, managed to shave off an additional ~20% server load by introducing DynamicSimulation + higher check distance.

    Even though my method works, it appears to be fighting with some internal ALiVE function that is constantly assessing ownership of groups and re-assigning them back to the server. Any way I can dig into this function to turn it off? I'm assuming it's the Localization:Auto feature.

  2. Tue Apr 4 18:56:14 2017
    D Dreesy posted in CQB Unit Locality.

    @SpyderBlack723 HC'S can be run freely alongside your game instance using multiple instances of the same copy of the game.

    That's awesome. I recall requiring more than one copy of the game for HCs, but maybe that's just for Arma 2.

    I've managed to come up with a simple loop to offload server-owned AI onto player units in the meantime, but now I'm running into a much bigger problem:

    CQB doesn't seem to have a group limiter, meaning potentially hundreds of AI can spawn. Even offloading that many AI onto tons of other players/HCs won't help if I can't limit the amount of AI spawned by a singular CQB.

    Is there a way to do this other than setting the spawns to solo, and having their spawn distance be ridiculously low?

    I managed to go from 60% server CPU usage with only 40 AI - to 330 units at ~48% average CPU usage for server, by running this loop on the server:

    while {true} do {
    
    {
    
    EZLeader = leader _x;
    EZGroup = group EZLeader;
    
    if((groupOwner EZGroup) <= 2) then {
    
    LeaderToCheck = EZLeader;
    ClosestPlayer = objNull;
    DistanceToCheck = 10000;
    {
           DistanceBetween = _x distance LeaderToCheck;
           if((isPlayer _x) && (DistanceBetween < DistanceToCheck)) then
           {
               ClosestPlayer = _x;
               DistanceToCheck = DistanceBetween;
           };
    } forEach playableUnits;
    
    NewOwnerID = owner ClosestPlayer;
    EZGroup setGroupOwner NewOwnerID;
    EZGroup enableDynamicSimulation true;
    
    "[DEBUG] Group is now owned by Player 1." remoteExec ["systemChat", 0, false];
    
    };
    
    } forEach allGroups;
    
    
    sleep 1;
    };
  3. Tue Apr 4 17:10:05 2017
    D Dreesy posted in CQB Unit Locality.

    @SpyderBlack723 You can run a (or multiple) headless clients from the same machine as the server or a player.

    I'm a little confused. Are you saying that a player can be turned into a HC? Do HCs still require multiple owned copies of the game?

  4. Tue Apr 4 09:36:43 2017
    D Dreesy started the conversation CQB Unit Locality.

    I was really excited when I found out about the CQB, it works beautifully for what I need but there's one HUGE problem - it doesn't seem to offload AI on to nearby players. All units spawn local to the server (horrible performance).

    I thought the locality: auto option on the CQB module would do just that - automatically sync ownership, but apparently not. Is there a way to do this using ALiVE? I don't have access to headless clients, so I need to offload on to the players.

    If I do this manually using my own script loop, will that interfere with the functionality of the CQB and ALiVE?

  5. Tue Apr 4 09:29:39 2017
    D Dreesy joined the forum.