Recently I made a game framework, that is EXTREMELY fast. I will release this soon, but I just wanted to show it off for now.
Benchmarks:
Services
Our way of getting services are 3.5 TIMES FASTER than using game.ServiceName
while having the exact same perks as game:GetService
.
Function I used
require(script.Benchmarking).Multiple(
{["Ours"] = function() -- our version
local workspace = fw.world.Workspace
end,
["GetService"] = function()
local workspace = game:GetService("Workspace")
end,
["."] = function()
local workspace = game.Workspace
end,
["[]"] = function()
local workspace = game["Workspace"]
end,
}
)```
Networking
(fyi: this is a total out of a lot of requests not one result)
This isn’t a big change but still ~1/6 faster. And also hackers can’t see your mess of remote events, way more secure.
client
require(script.Benchmarking).Multiple(
{["Ours"] = function() -- our version
local reply = fw.Network.send("hello", 1, 2, 3)
end,
["RemoteFunctions/Events"] = function()
local reply = game.ReplicatedStorage.RemoteEvent:InvokeServer("hello", 1, 2, 3)
end,
}
)
server
fw.Network:Await("hello", function(plr)
print("Client ("..plr.Name..") said hi!")
return "yo"
end)
game.ReplicatedStorage.RemoteEvent.OnServerInvoke = (function(plr)
print("Client ("..plr.Name..") said hi!")
return "yo"
end)
Leaderstats
A 2/3 PERFORMANCE IMPROVEMENT!! Not only that but its a single line to make leaderstats!
code
require(script.Benchmarking).Multiple(
{["Ours"] = function() -- our version
fw.Leaderstats.new({["Points"]=10})
end,
["Average leaderstats"] = function()
game.Players.PlayerAdded:Connect(function(plr)
local points = Instance.new("IntValue", plr)
points.Name = "Points"
points.Value = 10
end)
end,
}
)
The benchmarking module I wrote for these:
local clock = tick
local module = {}
function module.Single(func:any, times:number):(number)
local total = 0
for i = 1, times do
local start = clock()
func()
local en = clock()
total += en-start
end
return total
end
function module.Multiple(args):()
local results = {}
for name, func in pairs(args) do
results[name] = require(script.InfiniteMath).new(module.Single(func, 50))["first"]
end
print(results)
end
return module
It had the InfiniteMath | Go above 10^308/1e+308! module nested inside of it for full number compatibility
Features
- Spring animations library
- Performance improvements
- Cleans up all unused replicatedstorage assets
- Easy modification
- Datastores, Networking, Notifications, Leaderstats, and wayyy more.
- No more need for :WaitForChild, or :FindFirstChild or any of that garbage
- Debug mode, will release data in the output about what is slowing down the game
When will I release it?
soon… currently im still working on it.