[Full Release] Ship Fair And Competitive Games with Server Authority

There’s 1 problem with that whole model - attributes. Since attributes ON OTHER PLAYERS are updated EVERY FRAME, with 4 players in the game my network recv climbs up to even 100kb/s, that’s just ridiculous. Why do we need to replicate every attribute every frame, on an instance associated with a specific player?

adding a locally created humanoid (despite EvaluateStateMachine being set to false and PredictionMode set to off prior to it being parented) to a character causes all limbs to have CanCollide set to true, which causes a mismatch between the server and client leading to mispredictions.

I wish there’s a way to avoid attributes replicating to other players who don’t really need to know what attributes they have. Made a stamina system and it uses a folder within the character model with 5 attributes that update while sprinting / regenerating stamina, pretty worried of how high my network receive would be if there’s more players.

Would be cool if developers have more control over what instances (not just models) are replicated. In my case with the mentioned stamina system, I’d like to make it so the folder is replicated to only 1 specific player.

Just noticed Aiden mentioned what I’m referring to, hoping StreamingExcluded becomes a thing!! :folded_hands:

2 Likes

I noticed something when testing with the network replication in studio settings, on the client the input actions state property does not update instantly. Inbound and outbound ping have the same behavior. Is this intentional or a bug because when testing with 200 ping there is substantial delay in the camera and movement and it feels sloppy and bad to play with

Example: I have 1000 ms, I trigger an InputAction instance, it takes 1 second for the state to appear on the client

I agree, the current limitations of attribute replication behavior are unacceptable, the current solution is implementing your own system which relies upon remote events to replicate custom data

Server authority doesnt work well with the new Character Controllers: [Full Release] The Future of Character Movement: Character Controller Library

I can see some jitters here and there.

Especially buggy with r6 + Character Controller Library enabled

If you dont mind me asking, How are you doing this type of camera movement?

Following up on this as this is a major issue and I wanna know if there’s plans to fix this or if this is intended

For some reason the animation I have with this script is inconsistent while using ServerAuthority.

local PlayerService = game:GetService("Players")
local Tool = script:FindFirstAncestorWhichIsA("Tool")
local Handle = Tool.Handle

local Active = false
local CanDamage = false

local HitExclude = {}

Tool.Activated:Connect(function()
	if Active then return end
	Active = true
	table.clear(HitExclude)
	local ancestorModel = Tool:FindFirstAncestorWhichIsA("Model")
	local character = ancestorModel:FindFirstChildWhichIsA("Humanoid") or nil
	if character then
		local animator = character:FindFirstChildWhichIsA("Animator")
		local track = animator:LoadAnimation(script.Animation)
		track:Play(0, 1, 1)
		task.delay(0.5, function()
			CanDamage = true
			task.wait(0.25)
			CanDamage = false
		end)
		task.wait(1 + 0.2)
		track:Destroy()
	end
	Active = false
end)

Handle.Touched:Connect(function(otherPart)
	if not CanDamage then return end
	local otherCharacter = otherPart:FindFirstAncestorWhichIsA("Model")
	if not otherCharacter then return end

	if table.find(HitExclude, otherCharacter) then return end

	local ownerCharacter:Model? = Tool:FindFirstAncestorWhichIsA("Model")
	if not ownerCharacter then return end
	if otherPart:IsDescendantOf(ownerCharacter) then return end
	local otherHumanoid = otherCharacter:FindFirstChildWhichIsA("Humanoid")
	if not otherHumanoid then return end

	local ownerPlayer:Player? = PlayerService:GetPlayerFromCharacter(ownerCharacter)
	local otherPlayer = PlayerService:GetPlayerFromCharacter(otherCharacter)
	if otherPlayer and ownerPlayer and otherPlayer.Team == ownerPlayer.Team then return end

	table.insert(HitExclude, otherCharacter)
	otherHumanoid:TakeDamage(20)
end)

The Avatar used in the demonstration video is an R15 Rig (wearing an R6 converter package)

I tested this script with ServerAuthority set to Automatic and it seems to work fine in that case.

There are several key changes you must make to this design. Server Authority implies fairly significant changes to the core architecture of your scripts that touch game logic so that they can be predicted and rolled back on the client, and authoritative on the server. At the core, you must use BindToSimulation() for ‘every frame’ logic, and read/write sync’d custom data in get/setattribute on instances that are predicted.

Use a ModuleScript for this logic, and initialize it on both client and server. The animations and core game logic must be triggered on both client and server in this way - not just on one or the other - both.

Timers and your internal states like Active & CanDamage must use Get/SetAttribute() + RunService.BindToSimulation().

1 Like

It’s just following the root character’s head, with a few offsets (client-side, renderstepped). If you want synced camera movement under Sever Authority you can use MouseDelta as an input. :slight_smile:

1 Like

If I’m not wrong, it’s because you have to treat client inputs the same way as every other attribute, which means they too become server authoritative. This is kind of a problem, because client input should be client authoritative. It means client input can get stomped on by server predictions.

Equipping tools with the default inventory UI welds tools on Computer, but not on Mobile.
Mobile


Computer

This code is how we weld the bomb to the player.

This will be fixed next week - there was a delay in rolling out the necessary flags to mobile clients.

Edit: the flag has been rolled out to all platforms!

1 Like

服务器权威模板 Laser Tag 的第三人称射击动作和实际相差甚远,我不知道如何修复,求帮助

Hi, i dont know if im missing something but i feel like this should have stayed in beta?
Me and a few other people were on this official test place Racing - Server Authority Template | Play on Roblox and we all had over 100 ping, I had to explain to someone that they weren’t getting low fps, it just looked like it because of high ping and how server authority works, the game was basically unplayable from all the rubber banding, you can tell other people had the same problem because of the like-dislike ratio. On the FPS template i had the exact same problem
Im not an expert on this, but since this is an official template and it plays so badly, wouldn’t it need more time before being pushed out of beta and presented to developers as a fully finished feature? Also considering that most Roblox players probably regularly get over 150 ping since not every country has world-class internet
I really dont want to sound rude or like i’m disregarding all the work that went into this, I would definitely use it if clientside predicition was just better

We have lotsa reports of misprediction issues that lead to visual jitter with high latency. We are investigating!

3 Likes

There is also significant jitter when using NextGenerationReplication even without server authority with high latency clients where the client seems to be accepting and acting on retransmissions of a single property change from the server on client owned objects. Reported it here: NextGenerationReplication: a single server write to a client-owned object is delivered and applied many times

@takyon365 - can you share here or PM us the devices you are using when you see this?

i had a bad experience on my windows desktop, specs:
14600k
rx 6800
32gb ram
with ethernet
enough to handle any roblox game, i also tried it on my iphone 16 a few times. 10 minutes ago i tried it on my desktop (it put me on a >200 ping server and the game was unplayable), then on my phone (where it ran flawlessly), and now back on my desktop im trying again as im writing and its running well at ~80 ping (so i assume it ran well on my phone because my ping was also good on it)
EDIT:
opening the test place in studio and manually setting my latency to 200 causes noticeable jitter but its minimal, definitely not as bad as playing it on a real server. for some reason it feels worse to play on a real server than in a studio test with controlled latency despite the latency being the same (the jitter in my studio playtest feels very reasonable and i’d imagine it cant really get much better at 200 ping, playing on a real client feels worse for whatever reason)
i would test with some kind of software that adds ping to your entire computer and look at how it performs on a real client