Jump to content

This setting camera_sync_interval .


IIYAMA

Recommended Posts

  • Moderators

camera_sync_interval

Source wiki mta: How often to tell the server of any client side changes to the local players camera position and target.

Probably this function will use this: (getcameraMatrix) at server side. (not client)

https://wiki.multitheftauto.com/wiki/GetCameraMatrix

What important functions are using this, because I don't know why I should need this.

It is only taking bandwidth. I even get the feeling it is some sort of spy camp.

Link to comment

Well, it is able to fetch the camera matrix and if you'd like to move the camera matrix a little bit without absolute positions, you can just fetch the matrix and add a few meters in it.

Like the example in the Wiki Page:

local x, y, z, lx, ly, lz = getCameraMatrix() -- Get the current location and lookat of camera 
x, lx = x + 1, lx + 1 -- What will be the new x and x lookat values 
setCameraMatrix(x,y,z,lx,ly,lz) -- Set camera to new position 

It can be made a smooth transition with rendering. Such rendering is used on some racing servers, like FFS.

Link to comment
Setting name | Default | Valid values | Description

camera_sync_interval | 500 | 100-1000 | How often to tell the server of any client side changes to the local players camera position and target.

You can set it to 100-1000 (so yes, you can set it to 1 sec). In the past you couldn't sync the camera at all (getCameraMatrix server-side used to return last values set by setCameraMatrix) but now server knows about "current" player's camera position and target.

Link to comment
  • Moderators

Will there come a function that can set this camera update on and off per player?

because sending data from client to server, when I don't use camera matrix(or other function that require this), it will be a wastage of the bandwidth.

It can also be done by triggering, only I am not sure if that will give more lagg/bandwidth.

Link to comment

Well I haven't had issues with anything as I run 7 game servers from my home computer. No lagging and no lag even when I spam syncs from client to server. Either you are using a very low connection internet and you should get a VPS for that, or just buy a new connection from your provider. I have 0.8 Mbps up and 20 Mbps down, no lag.

Link to comment
  • Moderators

It isn't about the server, it is about the upload from the players. Some players do have very very slow internet.

Since the player is the one that need to upload to the server and the download from the server is always doing almost very less, it could reduce some lagg.

New players:

and the pity is that the new players, who going to play mta, (+economical crisis) don't have enough money for good internet/ pc's. My server is getting full with people with bad ping's, most of them Spanish. They join with 300/400+ ping, that is just unfit able for the only good stealth server. 0.4 seconds their connection + instable ping that cause lots of teleportation.

The only thing that can kill them is my own version of syncro..... all death-match servers are fucked up. The worse thing is that most of them can't even speak a word English.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...