Jump to content
  • 0

unexpected behavior with headless client


MorbidDevil

Question

Hello,

 

i need help with my headless client.

For tests i use a clean epoch 1.0.4.2b with vanilla mission and server pbo.

i only modify missions.sqm to force a hc on civ side and a simple check in init.sqf if hc then do something.

all  running fine!

HC connect and create 50 units ... on server side i check the owner of all units and all owned by hc, 

but now the problem ...

 

server fps before hc spawns units 50, after 35 ... hc fps before spawn the units 50 after 49.

hc disconnect and all units still there and server fps 35.

 

next try 150 units on hc ( server fps 12 / hc fps 48 )

 

any ideas ?

 

thx ia

Morbid

 

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Are you using a HC framework mod or just playing with logging in a HC ?.

 

Sounds like the HC is spawning the units which are then given to the server for control adn tracking (hence the server FPS dropping).

 

I have not dug i to the HC side of things really but my understanding is the frameworks force the units to HC control and then, presumabily, broadcast position etc for other clients so they can see them.

Link to comment
Share on other sites

  • 0

i try only with createUnit on the hc in a loop to generate the units and in another test with upsmon.

i check every 60 seconds the owner of all ai's serverside, and they still owned by hc.

 

another try is to use for the zombie spawn on hc.

for 2 month ago all running fine. 500 zeds spawns on hc and no load on the server.

now i use the same files from the topic on the same server only the headless client is a fresh install.

zeds spawns on hc, owned by hc, but all load is serverside and nothing happens when hc disconnect.

 

my brain is like shit, after 60 hours try and try a thing that worked before.

Link to comment
Share on other sites

  • 0

ok -  i have found a solution :)

 

for what ever reason it works.

 

i change the hc slot from civ to east and create the units on the hc with

  _groupToCreate = group player;
  _newgroup = createGroup east;

  for "_i" from 1 to _count do {
    _unit = _groupToCreate createUnit ["GUE_Soldier_CO_DZ", _pos, [], 10, "PRIVATE"];
    [_unit] joinSilent _newgroup;
  };

and all units still owned and controlled local by the hc. 7 groups each with 50 units do what i want and my server fps remains at 49 FPS.

Link to comment
Share on other sites

  • 0

my english grammar is to bad, to write a guide :(

but my testcode at the end of my init.sqf looks like ...

private ["_unit","_isHeadlessClient","_createGroup","_unitCount","_groupCount","_isRightUid","_spawnPos","_group","_j","_i"];

_isHeadlessClient = (!isServer && !hasInterface);
_isRightUid       = (getPlayerUID player == "098790"); // playerid from hc

// only on headless client do this stuff
if ( _isHeadlessClient && _isRightUid ) then {
  _createGroup = group player;

  _groupCount  = 5;
  _unitCount   = 40;

  _spawnPos    = [5898.48,  8155.9, 0]; // near Stary

  // create the groups
  for "_i" from 1 to _groupCount do {
    _group       = createGroup EAST;

    // create the units
    for "_j" from 1 to _unitCount do {
      _unit = _createGroup createUnit ["GUE_Soldier_CO_DZ", _spawnPos, [], 10, "PRIVATE"];
      [_unit] joinSilent _group;
      sleep .1;
    };
    sleep .1;  
  };

  [] spawn {
    while { true } do {
      diag_log format ["Debug FPS: %1 / %2", diag_fps, diag_fpsmin];
      {
        if ( !isPlayer _x ) then {
          diag_log format ["check is local to hc :: unit (%1) / group (%2) :: ", _x, (group _x), (local _x)];
        };
      } forEach allUnits;
      sleep 60;
    };
  };
};

and check the server fps with #monitor 5

 

it creates all the units on my hc and server fps never change below 48 fps.

 

now i have rewrite my mission system to publish all create commands to my hc and write all the code for the hc in a signed pbo only on hc.

in my mission file is only one hc check and initial load for this pbo on hc side.

 

hope this helps @cen

Link to comment
Share on other sites

  • 0

interesting.  I will give this a go myself and measure the differences. I am using the CIV slot and load is definitively being offloaded from the server to the HC.  I have both regularly reporting how many units they are controlling to rpt using this:

	[] spawn {
		while {true} do {
			_units = {local _x}count allUnits;
			diag_log format["HC: Units under ***Server or HC*** control: %1", (str _units)];
			diag_log format["DEBUG FPS : %1", diag_fps];
			sleep 60;
		};
	};

I also know because in the past when I had HC stability issues, when the HC crashed all units would move to server control and the server FPS would nose-dive. :huh:

 

One of my next jobs is to delete AI units that get transferred to the server in the even of a problem with the HC.

 

Its hard to compare FPS numbers between servers directly as Arma/Epoch performance is not linear and depends on multiple factors, not least the number of objects in memory.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...