Smile's Networking - Simple API, Automatic Compression, No More Throttling!

I was going to start this with a long preamble about networking systems as a whole, but it’s a lot easier to just say: most of them dont do nearly enough to be worth using IMO.

Let me know if you find any bugs!

I am also very willing to add features if desired. As of writing (initial release), I have chosen to only write the bare essentials so the module isn’t filled with unwanted features.

What does this module do:

  • Sends all remotes fired during the same tick (adjustable) as one packet
  • Compresses and decompresses said packet automatically

Why:

  • Never worry about remote throttling
  • Send large amounts of data with less data (Compression!)
  • Send stupid amounts of remotes per second

Link to the model

Benchmarks

All benchmarks were run inside of studio with an uncapped FPS using EternityDev’s benchmark
FastNet2:


Warp:

BridgeNet2:

Smiles Networking:

Getting Started

This module is extremely simple and works very similarly to default RemoteEvents, so getting started is a breeze.

Client:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SNS = require(ReplicatedStorage.SmilesNetworkingSystem):Client()
-- Be sure to initialize the module with either :Client() or :Server()

-- Only adjustable on client, server uses Heartbeat (Unsure if it throttles sending out data LMK)
-- Default is 1 / 60
-- You may get better compression with a lower tickrate (20, 30)
SNS:SetTickrate(1 / 60)

local ExampleClientEvent = SNS.NewEvent("ExampleClientEvent")

ExampleClientEvent.OnClientEvent:Connect(function(...)
	print(...)
end)

task.wait(1)

SNS:FireServer("ExampleServerEvent", "are we gaming?") --eventName, arguments

Server:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SNS = require(ReplicatedStorage.SmilesNetworkingSystem):Server()

local ExampleServerEvent = SNS.NewEvent("ExampleServerEvent")

ExampleServerEvent.OnServerEvent:Connect(function(player, ...)
	print(...)
	SNS:FireClient(player, "ExampleClientEvent", "yeah, we gaming!")
	task.wait(1)
	SNS:FireAllClients("ExampleClientEvent", "YIIPPPPEEEEEEEE!!!!!!")
end)
1 Like

u sure its compressed?

SN:


Warp:

i set it as 1/60 (cuz i dont uncap my studio)

True Benchmark:

also u use JSON Encode/Decode, it have limited usage once it limited your no longer can using it until it reseted, i have experience it on FastNet v1

it only sends the compressed version if it’s better than the uncompressed version, the module performs best when sending lots of data or lots of remotes.

And I have no idea what you’re talking about with the JSON Encode/Decode limited usage? All I’m aware of is a 200k character limit.

1 Like



*25 packets every <0.3s

in packet profiler remote event indeed smaller because it sends each so packet profiler plugin cant do correctly but in Microprofiler its bigger and accurate. Warp have smallest on microprofiler

in microprofiler:
Warp: ~25KB/s
SN: ~41KB/s
Regular: ~56KB/s

I’d imagine most other networking solutions are doing more at a smaller level, this works best when sending a lot of similar data or a lot of events in general.

1 Like

this module cant for heavy-scale games due using external compression method, also ur compression method is quite slow too.

small data scale (100x):
image
small data scale (1000x):
image
very big data (10x):
image
very big data (100x):
image

using external compression can be overhead (depends)

You gotta start posting this screenshots with more context, I haven’t the slightest clue what these numbers are supposed to mean or what a “good” number would be.

FastNet v1 is also using compression method and the method is also identic with yours but it compress the encoded json to bitbuffer and its inefficient.

if u ask what the best compression method is buffer, ByteNet use this.

Im probably going to look more into compression methods, although I dont see a few milliseconds as slow.