Jump to content
Sign in to follow this  
nodunit

Animate command causing MP lag?

Recommended Posts

Hello, a friend of mine is wanting to use a script in Arma 3 to create a more complex targetting computer. It worked perfectly in Arma 2 but has ceased working in arma 3 and is even causing a nasty glitch out.

The command in question is Animate https://community.bistudio.com/wiki/animate and I think this is no longer functioning the way desired due to BI trying to limit the amount of data sent from user to user in multiplayer (in this case it needs constant data to update the client), would anyone happen to know of any commands that might allow such a thing to occur?

Basicly the idea is for two crewman to share a vehicle and both of them be able to allow a computer to track their target, the computer taking into account gravity, drag, intertia, elevation, and all of those fun things.

But due to the slow down in data sending the CPG winds up lagging behind and can't target things correctly, we were wondering if there might be a way to speed it up just between vehicle crew (and not the whole server) or if there is a way to multicast the animate command on select clients.

Edited by NodUnit

Share this post


Link to post
Share on other sites

I don't think there's an issue with the command itself , but maybe the way you are sending the data is slowing the game down.

Are you sending the code purely between pilot and gunner, or is it shared between more players? Also, are you sending just the number, or is more data in the packet?

The command is global so it can be calculated locally and then the command should broadcast to all players automatically.

Share this post


Link to post
Share on other sites

The way it works: a solution is calculated locally only by the controlling client (in this case, the gunner), then the animate command is run only on that client. In ArmA2, this works fine with no problems; the gunner has almost instant gun tracking and proper functioning. In ArmA3, there is a massive delay of roughly 3-4 seconds with this method.

I believe this is related to a fix introduced in ArmA3 with the animate command to reduce the update frequency in order to cut back on latency/data sent over the network; the problem is that frequent updates are required between two clients (the pilot and the gunner), not just everyone. That is just a guess on my part.

Share this post


Link to post
Share on other sites

Just taking a shot in the dark here...can you package the parameters going into the animate command and send them directly to the corresponding player via publicVariableClient? Throw a publicVariableEventHandler into the mix that takes the data and runs the animate command on the receiving player manually.

But, if you're saying the animate command is lagging even on the originating player then this won't work.

Share this post


Link to post
Share on other sites

Essentially, all animations are tied to the driver of a vehicle - the vehicle 'belongs' to that client. Animate is a global command - if it's run on one client, all receive it. If you were to try and use publicVariableClient, you end up with a broadcast storm so to speak; if the variable is faster than the transfer rate for animate, then animate is run on that client but then is snapped back as the older animate data catches up. I suppose as a test one could try running the animate command on both crew members at the same time and see what the result would be, but in the past this resulted in the turret stuttering all over the place.

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  

×