Reason: It has type annotation. It is a safer way to communicate with the server and the client, because instead of making all of your remotes safe you only need to make two safe. You can also replace bindables or signal classes like fastsignal. It supports tables.
Usage: You parent the module to replicated storage. You can create or set a value with the set function. You can get a value with the get function. You can get all values with the getAll function. You can add a function that will be called when the value changed with the changed function.
You parent the module to replicated storage. You can create or set a value with the set function. You can get a value with the get function. You can add a function that will be called when the value changed with the changed function.
You parent the module to replicated storage. You can create or set a value with the set function. You can get a value with the get function. You can add a function that will be called when the value changed with the changed function.
I’ve seen you promoting your remote event communication module everywhere, please actually showcase how it’s better than the other alternatives. Type annotation won’t just put your module on top of everything else, but at least FastSignal has proper documentation. Provide benchmarks on your resource for authenticity, pros and cons, etc…
I’m sorry if you feel like attacked, I don’t mean it that way. My intent is to give some criticism to further improve your resource and your other resources to come,
As far as I can tell there’s little optimization whatsoever, so I wouldn’t say it’s better than native remotes & bindables. This is all constructive so don’t take this the wrong way.
But if you’re going say it’s faster and better than this or that, please provide evidence & benchmarks like @Artzified said.
I think that roblox uses something like metatables for the Value Instance because it doesn’t have methods to change the value so the only option for the changed event is metatables.
Where did you even get this? I’m pretty sure the engineers there has better tooling than just metatables, they don’t just do Luau, they also do lower level languages for more optimizations. Just because something uses a key-value property for read and write, it doesn’t mean it uses metatables. Lower level & higher level languages has native getter and setters that behaves the same way, but better.
It still wouldn’t answer why this is a better alternative to FastSignal, you’re just making stuff up now. I’m pretty sure FastSignal is just bindable but faster, you’re just using ValueBase Instances, which is completely different and you don’t provide benchmark as proof that this can replace FastSignal.
I don’t know what’s special about this ValueBase module, it doesn’t seem authentic and as advertised. What makes this different than making my own replication module using ValueBase instances, as the only superior feature you’ve written is just type annotation. What’s so safe about using this? Can some “ex-ploiters” just change the value in the client and the server would flag it as legit?
There a compilers for Lua U to machine code, even if it still wouldn’t be faster than C++ it has other advantages like that you can change the code to your likings.
I don’t know how to benchmark Value Instance, I have tried and it prints nan out here is the code:
-- Server
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local FastValue = require(ReplicatedStorage.FastValue)
local value = ReplicatedStorage.Value
local valueInstanceBenchmarks = ReplicatedStorage.ValueInstanceBenchmarks
local ValueInstanceServerTicks = {}
local ValueInstanceTicks = {}
local valueInstanceAverageTick = 0
for i = 1, 10, 1 do
task.wait(1)
value.Value = i
table.insert(ValueInstanceServerTicks, tick())
end
valueInstanceBenchmarks.OnServerEvent:Connect(function(player, ValueInstanceClientTicks)
for i, clientTick in ipairs(ValueInstanceClientTicks) do
table.insert(ValueInstanceTicks, clientTick - ValueInstanceServerTicks[i])
end
end)
for i, tick in ipairs(ValueInstanceTicks) do
valueInstanceAverageTick += tick
end
valueInstanceAverageTick /= #ValueInstanceTicks
print(valueInstanceAverageTick)
-- Client
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local FastValue = require(ReplicatedStorage.FastValue)
local value = ReplicatedStorage.Value
local valueInstanceBenchmarks = ReplicatedStorage.ValueInstanceBenchmarks
local ValueInstanceClientTicks = {}
value.Changed:Connect(function(value)
table.insert(ValueInstanceClientTicks, tick())
end)
valueInstanceBenchmarks:FireServer(ValueInstanceClientTicks)
These are my individual benchmarking tests by getting the median percentile of each result.
Now before taking a look at the results I just want to address that these tests were done with 65535 iterations, using a string generated by HttpService:GenerateGUID() & StringValue object.