BridgeNet | Insanely optimized, easy-to-use networking library full of utilities, now with roblox-ts! | v1.9.9-beta

If you mean storing a constructed signal in a modulescript, then it should.

2 Likes

Is it possible to fire remotes from inside a module script?

1 Like

Fundamentally, there is no difference between a ModuleScript and a script, except for the fact that a module can return a value. I haven’t used BridgeNet yet, but whatever can be done with Scripts/LocalScripts, can also be done with a module.

1 Like

First of all, great module man I appreciate your work, and keep it up!
I came across 2 errors tho :sweat_smile:

At line 727 in ‘ServerBridge’ self.Name seems to be nil (This caused Bridge:Destroy() to error)

serdeLayer.DestroyIdentifier(self.Name)

Fix

serdeLayer.DestroyIdentifier(self._name)

I’ve checked the key inside of receiveDict and sendDict and they both match up the self._name string so this should do.

The second error is caused by any ‘bridge’ being invoked with ServerInvoke/InvokeServerAsync from a different client.

ReplicatedStorage.Modules.BridgeNet.ClientBridge:125: invalid argument #1 to 'spawn' (function or thread expected)
  Stack Begin
  Script 'ReplicatedStorage.Modules.BridgeNet.ClientBridge', Line 125
  Stack End

On line 120 in ‘ClientBridge’ at the elseif statement, ‘threads[uuid]’ seems to be nil for clients that did not invoke this bridge. I’ve implemented this as a simple fix although I’m unsure if this would break/ cause problems for anyone else.

local uuid = args[2]
if threads[uuid] then
	table.remove(args, 1)
	table.remove(args, 1)
	argCount -= 2
	task.spawn(threads[uuid], unpack(args, 1, argCount))
	threads[uuid] = nil -- don't want a memory leak ;)						
end
3 Likes

Don’t know how you tested it, but read the reviews on the main post. In my case BridgeNet reduced the ping 30x. This has tons of practical uses, I personally used it for waist C0 replication to server, which would be literally impossible to do without bridge net (Or it would cause the ping to be 3k+, as my tests showed).

1 Like

I’m interested - what changed in your replication data? If possible, could you use my plugin to check out the differences before and after using bridgenet? https://devforum.roblox.com/t/packet-profiler-accurately-measure-remote-packet-bandwidth/1890924

I’m mainly curious since I also replicate C0 data for player head rotation, and am interested in what kind of optimizations are taking place.

1 Like

So this is the code I was using without bridge net. For my game’s purposes I needed the rotation to be replicated exactly to the server, not just to other clients, + even if I replicated to other clients only, ping results would be the same if not worse.
So with this code the ping was 3K+ if there were 100 players on the same server

I only changed the repEvent:FireServer line with firing a BridgeNet remote, and on the server listening to that BridgeNet remote, nothing else changed. The ping dropped down to on average 100 ping with 100 players on the same server.

6 Likes

I’ve also had this problem before but managed to fix it by doing

Add task.wait() before creating a bridge.

1 Like

Thanks for the report! I’ll definitely fix this in the next version alongside a bunch of other changes.

1 Like

OMG, this is a fantastic module. Saved me a ton of time

1 Like

a small question from a wally user;

Is the current wally version (v0.1.0) the same as the latest version (v1.9.8-beta)?

1 Like

The wally version should be on 1.9.9, not 0.1.0. Curious, where are you getting the 0.1.0 number from?

Oh yeah, I just checked wally-index and found it.

The doc’s installation page.

1 Like

Hi, great module!

Unfortunately though, I am getting this error spammed every second in my game right now and I don’t think I’ve done anything wrong;

This isn’t breaking anything I don’t think but I’d just like to make sure.

Thanks!

1 Like

What are you passing In Bridge:Connect() ?

1 Like

This error occurs when you pass an invalid parameter into :Invoke. I’ll see if I can improve the typechecking/error messages in 2.0 which will release shortly.

If this isn’t the issue, please send me what you’re sending over / the server sided code.

1 Like

Hey bomb, I’m having a replication issue that I can’t seem to figure out, I’m creating the bridge on both the client and server, starting it aswell yet still have issues, if I WaitForBridge in external scripts it just infinite yields/the code below it doesn’t work.



You need to require BridgeNet before running the start function.

Oops just noticed that, I scrunched the code together for screenshot purposes but yeah I require it before starting.

Here’s a complete picture

Made a hotfix for this issue. It’s not supposed to happen, but BridgeNet was designed for single-script architecture. It should be fixed in this latest release that I’m about to put out.

1 Like