commanderx 17 Posted April 11, 2016 Hi, I experience small lags on our dedicated Server even if I am alone and no AI present. The only thing I`m doing is some scripts with remoteExec (only if something happens and that´s seldom -> 1 action per 30 seconds maybe.) and every second is a variable published via publicVariable from the server. All other missions runs more than fine on this server with no lags. Is this publicVariable so bad? If yes what options do i have instead of this? I have a countdown and the server publishes how much time remains. Is it maybe a better idea to remoteExec a predefined function on each client? Share this post Link to post Share on other sites
cuel 25 Posted April 11, 2016 It's not so bad. You should show some code. Share this post Link to post Share on other sites
Deadfast 43 Posted April 11, 2016 Certainly, depends on how much data you are sending though. Once per second sounds definitely far too often. Does the countdown really need to be so accurate? Why not just have each client count down on its own, with occasional synchronization from the server? Share this post Link to post Share on other sites
commanderx 17 Posted April 11, 2016 I will show some code when I´m back home. Well,it´s for a Search and Destroy like Mission and the countdown needs to be as accurate as it can be. But maybe it´s better to give a start signal from the server and then every client should count on itself. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted April 11, 2016 There's no good way to do an accurate timer without increase in network traffic. Best compromise you can do is local countdown with periodic sync to server time. Have the clients machine count down from a variable and update the variable every ~5 seconds. missionnamespace setvariable ['varname',value,true]; is slightly less costly than varname = value; publicvariable 'varname'; Share this post Link to post Share on other sites
Deadfast 43 Posted April 11, 2016 I'd still do a sync every now and then, just to be safe. Share this post Link to post Share on other sites