Summarizing to anyone who wondering:
According to my tests and @EmmieShayz’s reply, unreliable remote events are not faster and not sends less data than default remote events. But they are useful, if you don’t much care about whether data gets delivered or not.
Hi devs.
In my future game i need to update Motor6D every renderstep, and i found UnreliableRemoteEvent to “don’t spend much network” on this.
But i’m very love to test everything, and before implementing it to game tested and compared it to default remote.
Results was very unexpected:
First is remote on client, second is unreliable remote on client
Third is remote on server, fourth is unreliable remote on server
Almost no difference
Sometimes unreliable remote a bit faster, sometimes default remote faster
All i found is 2 posts under unreliable remote release topic, which actually doesn’t explain anything:
Also if i look to performance stats, there’s no difference between amount sent data:
Remote
Unreliable Remote
The same happens in actual game, no difference, or tiny difference
I used this codes:
Local
local ReplicatedStorage = game.ReplicatedStorage
local UserInputService = game:GetService("UserInputService")
local Remote = ReplicatedStorage.RemoteEvent
local UnreliableRemote = ReplicatedStorage.UnreliableRemoteEvent
local CalcRemote = ReplicatedStorage.Calc
local Table = {}
local function Calc()
local Total = 0
for _, v in Table do
Total += v
end
print(Total / #Table)
end
task.wait(3)
for i = 1, 1000 do
local Start = tick()
Remote:FireServer(Start)
local End = tick()
table.insert(Table, End-Start)
task.wait()
end
Calc()
table.clear(Table)
for i = 1, 1000 do
local Start = tick()
UnreliableRemote:FireServer(Start)
local End = tick()
table.insert(Table, End-Start)
task.wait()
end
Calc()
UserInputService.InputBegan:Connect(function(Key)
if Key.KeyCode == Enum.KeyCode.U then
CalcRemote:FireServer()
end
end)
Server
local ReplicatedStorage = game.ReplicatedStorage
local Remote = ReplicatedStorage.RemoteEvent
local UnreliableRemote = ReplicatedStorage.UnreliableRemoteEvent
local CalcRemote = ReplicatedStorage.Calc
local Table1 = {}
local Table2 = {}
local function Calc(Table)
local Total = 0
for _, v in Table do
Total += v
end
print(Total / #Table)
end
Remote.OnServerEvent:Connect(function(Player,Start)
table.insert(Table1, tick() - Start)
end)
UnreliableRemote.OnServerEvent:Connect(function(Player,Start)
table.insert(Table2, tick() - Start)
end)
CalcRemote.OnServerEvent:Connect(function()
Calc(Table1)
Calc(Table2)
end)
And also i don’t see logical difference - the same send information, the ~same ping, why there’s should be any difference?
Smart people, please explain me what i’m doing wrong.
Or these remotes doesn’t have any advantages?