2.0.0-rc1
This is a release candidate for 2.0. It is unfinished, unstable, and not ready for production usage- that being said, it would mean a lot to me if anyone could help poke around and help find some bugs / issues. As of right now, there is no written documentation. However I’ll give a brief summary of the critical functions that have been added.
It is available under wally as 2.0.0-rc1
, and it is on the github repository.
Declare
Declare is the solution to a major design flaw with BridgeNet- since BridgeNet’s references are completely decentralized, you often need to do lengthy things like so:
local BridgeA = BridgeNet.CreateBridge("BridgeA")
local BridgeB = BridgeNet.CreateBridge("BridgeB")
local BridgeC = BridgeNet.CreateBridge("BridgeC")
There’s also another problem with this- you can’t tell if it’s getting or creating the remote. It’s not clean, it’s pretty messy. You also have the problem of things like middleware, replication rate, all that. My solution to this was Declare:
local Bridges = BridgeNet.Declare({
RemoteA = BridgeNet.Bridge({
Middleware = {},
}),
RemoteCategory = {
RemoteB = BridgeNet.Bridge(),
RemoteC = BridgeNet.Bridge({
Middleware = {},
}),
}
})
The intended way to use Declare is to put all of your remotes in one ModuleScript, and then require the modulescript to access your BridgeObjects. This is cool, but it also kind of forces you into a structure- that’s why I’m leaving .CreateBridge untouched. In fact, Declare
internally uses .CreateBridge.
Identifiers
The same exact issue with .CreateBridge showed up with identifier strings too, so I pretty much did the same thing. One module for your identifiers maybe, or maybe use the function multiple times across scripts to access your identifier strings- it’s open ended.
- Removed rateManager entirely
- Removed .CreateIdentifiersFromDictionary()
- Removed .CreateBridgesFromDictionary()
- Removed .WhatIsThis()
- Removed .WaitForBridge()
- Removed PrintRemotes symbol- it was useless.
- Added GetCompressedIdentifier
- Added .Declare()
- Added .Identifiers()
- Added .GetCompressed()
- Added .GetIdentifier()
- Each BridgeObject now has a variable rate it sends information at. This is by default 60.
- A lot of functions are now modules that return a function
- Repeat loops are now while loops
- Renamed serdeLayer to SerdesLayer
- Optimizations
- Symbols are now loaded in via a module
- Added hot reloading support(?)
- Rewrote test code
Changes to be done
- Remove receive queueing(?)
- Typings should use
never
andunknown
types - Add :SetReplicationRate(). There should be a partial implementation already there
- Finish polishing and testing, then do the full release.