Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualJustABeginner

Posted 03 October 2012 - 01:08 PM

~50 ms should be really nice.

#5JustABeginner

Posted 03 October 2012 - 11:36 AM

A small example. Sync interval (ms) depends on player count.

setTimer(
function()
  local pcount=getPlayerCount()
  if pcount<10 then
	setServerConfigSetting("lightweight_sync_interval", 1000)
	setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)
	setServerConfigSetting("player_sync_interval", 50)
	setServerConfigSetting("keysync_mouse_sync_interval", 100)
	setServerConfigSetting("keysync_analog_sync_interval", 100)
  elseif pcount<50 then
	setServerConfigSetting("lightweight_sync_interval", 2000)
	setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)
	setServerConfigSetting("player_sync_interval", 100)
	setServerConfigSetting("keysync_mouse_sync_interval", 100)
	setServerConfigSetting("keysync_analog_sync_interval", 100)
  elseif pcount<100 then
	setServerConfigSetting("lightweight_sync_interval", 3000)
	setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)
	setServerConfigSetting("player_sync_interval", 150)
	setServerConfigSetting("keysync_mouse_sync_interval", 100)
	setServerConfigSetting("keysync_analog_sync_interval", 100)
  elseif pcount<140 then
	setServerConfigSetting("lightweight_sync_interval", 4000)
	setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)
	setServerConfigSetting("player_sync_interval", 250)
	setServerConfigSetting("keysync_mouse_sync_interval", 100)
	setServerConfigSetting("keysync_analog_sync_interval", 100)
  else
	setServerConfigSetting("lightweight_sync_interval", 4000)
	setServerConfigSetting("unoccupied_vehicle_sync_interval", 1200)
	setServerConfigSetting("player_sync_interval", 300)
	setServerConfigSetting("keysync_mouse_sync_interval", 200)
	setServerConfigSetting("keysync_analog_sync_interval", 200)
  end
end, 1000 * 60 * 10, 0
)

#4JustABeginner

Posted 03 October 2012 - 11:35 AM

A small example. Sync interval depends on player count.


setTimer(

function()

  local pcount=getPlayerCount()

  if pcount<10 then

	setServerConfigSetting("lightweight_sync_interval", 1000)

	setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)

	setServerConfigSetting("player_sync_interval", 50)

	setServerConfigSetting("keysync_mouse_sync_interval", 100)

	setServerConfigSetting("keysync_analog_sync_interval", 100)

  elseif pcount<50 then

	setServerConfigSetting("lightweight_sync_interval", 2000)

	setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)

	setServerConfigSetting("player_sync_interval", 100)

	setServerConfigSetting("keysync_mouse_sync_interval", 100)

	setServerConfigSetting("keysync_analog_sync_interval", 100)

  elseif pcount<100 then

	setServerConfigSetting("lightweight_sync_interval", 3000)

	setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)

	setServerConfigSetting("player_sync_interval", 150)

	setServerConfigSetting("keysync_mouse_sync_interval", 100)

	setServerConfigSetting("keysync_analog_sync_interval", 100)

  elseif pcount<140 then

	setServerConfigSetting("lightweight_sync_interval", 4000)

	setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)

	setServerConfigSetting("player_sync_interval", 250)

	setServerConfigSetting("keysync_mouse_sync_interval", 100)

	setServerConfigSetting("keysync_analog_sync_interval", 100)

  else

	setServerConfigSetting("lightweight_sync_interval", 4000)

	setServerConfigSetting("unoccupied_vehicle_sync_interval", 1200)

	setServerConfigSetting("player_sync_interval", 300)

	setServerConfigSetting("keysync_mouse_sync_interval", 200)

	setServerConfigSetting("keysync_analog_sync_interval", 200)

  end

end, 1000 * 60 * 10, 0

)

#3JustABeginner

Posted 03 October 2012 - 11:33 AM

A small example:


setTimer(

function()

  local pcount=getPlayerCount()

  if pcount<10 then

    setServerConfigSetting("lightweight_sync_interval", 1000)

    setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)

    setServerConfigSetting("player_sync_interval", 50)

    setServerConfigSetting("keysync_mouse_sync_interval", 100)

    setServerConfigSetting("keysync_analog_sync_interval", 100)

  elseif pcount<50 then

    setServerConfigSetting("lightweight_sync_interval", 2000)

    setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)

    setServerConfigSetting("player_sync_interval", 100)

    setServerConfigSetting("keysync_mouse_sync_interval", 100)

    setServerConfigSetting("keysync_analog_sync_interval", 100)

  elseif pcount<100 then

    setServerConfigSetting("lightweight_sync_interval", 3000)

    setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)

    setServerConfigSetting("player_sync_interval", 150)

    setServerConfigSetting("keysync_mouse_sync_interval", 100)

    setServerConfigSetting("keysync_analog_sync_interval", 100)

  elseif pcount<140 then

    setServerConfigSetting("lightweight_sync_interval", 4000)

    setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)

    setServerConfigSetting("player_sync_interval", 250)

    setServerConfigSetting("keysync_mouse_sync_interval", 100)

    setServerConfigSetting("keysync_analog_sync_interval", 100)

  else

    setServerConfigSetting("lightweight_sync_interval", 4000)

    setServerConfigSetting("unoccupied_vehicle_sync_interval", 1200)

    setServerConfigSetting("player_sync_interval", 300)

    setServerConfigSetting("keysync_mouse_sync_interval", 200)

    setServerConfigSetting("keysync_analog_sync_interval", 200)

  end

end, 1000 * 60 * 10, 0

)

#2JustABeginner

Posted 03 October 2012 - 11:33 AM

A small example:

[source lang="cpp"]setTimer(function() local pcount=getPlayerCount() if pcount<10 then setServerConfigSetting("lightweight_sync_interval", 1000) setServerConfigSetting("unoccupied_vehicle_sync_interval", 500) setServerConfigSetting("player_sync_interval", 50) setServerConfigSetting("keysync_mouse_sync_interval", 100) setServerConfigSetting("keysync_analog_sync_interval", 100) elseif pcount<50 then setServerConfigSetting("lightweight_sync_interval", 2000) setServerConfigSetting("unoccupied_vehicle_sync_interval", 500) setServerConfigSetting("player_sync_interval", 100) setServerConfigSetting("keysync_mouse_sync_interval", 100) setServerConfigSetting("keysync_analog_sync_interval", 100) elseif pcount<100 then setServerConfigSetting("lightweight_sync_interval", 3000) setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000) setServerConfigSetting("player_sync_interval", 150) setServerConfigSetting("keysync_mouse_sync_interval", 100) setServerConfigSetting("keysync_analog_sync_interval", 100) elseif pcount<140 then setServerConfigSetting("lightweight_sync_interval", 4000) setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000) setServerConfigSetting("player_sync_interval", 250) setServerConfigSetting("keysync_mouse_sync_interval", 100) setServerConfigSetting("keysync_analog_sync_interval", 100) else setServerConfigSetting("lightweight_sync_interval", 4000) setServerConfigSetting("unoccupied_vehicle_sync_interval", 1200) setServerConfigSetting("player_sync_interval", 300) setServerConfigSetting("keysync_mouse_sync_interval", 200) setServerConfigSetting("keysync_analog_sync_interval", 200) endend, 1000 * 60 * 10, 0)[/source]

#1JustABeginner

Posted 03 October 2012 - 11:32 AM

A small example:

setTimer(
function()
local pcount=getPlayerCount()
if pcount<10 then
setServerConfigSetting("lightweight_sync_interval", 1000)
setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)
setServerConfigSetting("player_sync_interval", 50)
setServerConfigSetting("keysync_mouse_sync_interval", 100)
setServerConfigSetting("keysync_analog_sync_interval", 100)
elseif pcount<50 then
setServerConfigSetting("lightweight_sync_interval", 2000)
setServerConfigSetting("unoccupied_vehicle_sync_interval", 500)
setServerConfigSetting("player_sync_interval", 100)
setServerConfigSetting("keysync_mouse_sync_interval", 100)
setServerConfigSetting("keysync_analog_sync_interval", 100)
elseif pcount<100 then
setServerConfigSetting("lightweight_sync_interval", 3000)
setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)
setServerConfigSetting("player_sync_interval", 150)
setServerConfigSetting("keysync_mouse_sync_interval", 100)
setServerConfigSetting("keysync_analog_sync_interval", 100)
elseif pcount<140 then
setServerConfigSetting("lightweight_sync_interval", 4000)
setServerConfigSetting("unoccupied_vehicle_sync_interval", 1000)
setServerConfigSetting("player_sync_interval", 250)
setServerConfigSetting("keysync_mouse_sync_interval", 100)
setServerConfigSetting("keysync_analog_sync_interval", 100)
else
setServerConfigSetting("lightweight_sync_interval", 4000)
setServerConfigSetting("unoccupied_vehicle_sync_interval", 1200)
setServerConfigSetting("player_sync_interval", 300)
setServerConfigSetting("keysync_mouse_sync_interval", 200)
setServerConfigSetting("keysync_analog_sync_interval", 200)
end
end, 1000 * 60 * 10, 0
)


PARTNERS