Skip to content

Commit 13343ad

Browse files
committed
v0.5.6
1 parent 90e7010 commit 13343ad

File tree

10 files changed

+29
-22
lines changed

10 files changed

+29
-22
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ build
44
standalone.rbxm
55
standalone
66
*.rbxm
7+
sourcemap
78
sourcemap.json

aftman.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[tools]
2-
rojo = "rojo-rbx/rojo@7.2.1"
2+
rojo = "rojo-rbx/rojo@7.3.0"
33
wally = "UpliftGames/[email protected]"
44
stylua = "JohnnyMorganz/[email protected]"

sourcemap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"bridgenet2-test","className":"DataModel","filePaths":["testing.project.json"],"children":[{"name":"ReplicatedStorage","className":"ReplicatedStorage","children":[{"name":"Packages","className":"Folder","children":[{"name":"RemotePacketSizeCounter","className":"ModuleScript","filePaths":["Packages\\RemotePacketSizeCounter.lua"]},{"name":"TableKit","className":"ModuleScript","filePaths":["Packages\\TableKit.lua"]},{"name":"_Index","className":"Folder","children":[{"name":"[email protected]","className":"Folder","children":[{"name":"tablekit","className":"ModuleScript","filePaths":["Packages\\_Index\\[email protected]\\tablekit\\src\\init.luau","Packages\\_Index\\[email protected]\\tablekit\\default.project.json"]}]},{"name":"[email protected]","className":"Folder","children":[{"name":"remotepacketsizecounter","className":"ModuleScript","filePaths":["Packages\\_Index\\[email protected]\\remotepacketsizecounter\\src\\init.luau","Packages\\_Index\\[email protected]\\remotepacketsizecounter\\default.project.json"]}]}]},{"name":"bridgenet2","className":"ModuleScript","filePaths":["src\\init.luau"],"children":[{"name":"Client","className":"ModuleScript","filePaths":["src\\Client\\init.luau"],"children":[{"name":"ClientBridge","className":"ModuleScript","filePaths":["src\\Client\\ClientBridge.luau"]},{"name":"ClientConnection","className":"ModuleScript","filePaths":["src\\Client\\ClientConnection.luau"]},{"name":"ClientIdentifiers","className":"Folder"},{"name":"ClientIdentifiers","className":"ModuleScript","filePaths":["src\\Client\\ClientIdentifiers.luau"]},{"name":"ClientProcess","className":"ModuleScript","filePaths":["src\\Client\\ClientProcess.luau"]}]},{"name":"Constants","className":"ModuleScript","filePaths":["src\\Constants.luau"]},{"name":"PublicTypes","className":"ModuleScript","filePaths":["src\\PublicTypes.luau"]},{"name":"Server","className":"ModuleScript","filePaths":["src\\Server\\init.luau"],"children":[{"name":"HandleInvalidPlayer","className":"ModuleScript","filePaths":["src\\Server\\HandleInvalidPlayer.luau"]},{"name":"PlayerContainers","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\init.luau"],"children":[{"name":"All","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\All.luau"]},{"name":"Except","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\Except.luau"]},{"name":"Players","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\Players.luau"]},{"name":"Single","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\Single.luau"]}]},{"name":"ServerBridge","className":"ModuleScript","filePaths":["src\\Server\\ServerBridge.luau"]},{"name":"ServerConnection","className":"ModuleScript","filePaths":["src\\Server\\ServerConnection.luau"]},{"name":"ServerIdentifiers","className":"ModuleScript","filePaths":["src\\Server\\ServerIdentifiers.luau"]},{"name":"ServerProcess","className":"ModuleScript","filePaths":["src\\Server\\ServerProcess.luau"]}]},{"name":"Studio","className":"Folder","children":[{"name":"MockBridge","className":"ModuleScript","filePaths":["src\\Studio\\MockBridge.luau"]},{"name":"MockConnection","className":"ModuleScript","filePaths":["src\\Studio\\MockConnection.luau"]},{"name":"MockIdentifiers","className":"ModuleScript","filePaths":["src\\Studio\\MockIdentifiers.luau"]}]},{"name":"Types","className":"ModuleScript","filePaths":["src\\Types.luau"]},{"name":"Utilities","className":"Folder","children":[{"name":"NetworkUtils","className":"ModuleScript","filePaths":["src\\Utilities\\NetworkUtils.luau"]},{"name":"Output","className":"ModuleScript","filePaths":["src\\Utilities\\Output.luau"]},{"name":"RecycledSpawn","className":"ModuleScript","filePaths":["src\\Utilities\\RecycledSpawn.luau"]},{"name":"isEditMode","className":"ModuleScript","filePaths":["src\\Utilities\\isEditMode.luau"]},{"name":"tostringData","className":"ModuleScript","filePaths":["src\\Utilities\\tostringData.luau"]}]},{"name":"version","className":"ModuleScript","filePaths":["src\\version.luau"]}]}]},{"name":"benches","className":"Folder","children":[{"name":"Hex.bench","className":"ModuleScript","filePaths":["benchmarks\\Hex.bench.luau"]}]},{"name":"framework","className":"ModuleScript","filePaths":["testing/framework\\init.luau"],"children":[{"name":"bootstrapper","className":"ModuleScript","filePaths":["testing/framework\\bootstrapper.luau"]},{"name":"expect","className":"ModuleScript","filePaths":["testing/framework\\expect.luau"]}]}]},{"name":"ServerScriptService","className":"ServerScriptService","children":[{"name":"featureTests","className":"Script","filePaths":["testing/tests/server\\featureTests\\init.server.luau"]}]},{"name":"StarterPlayer","className":"StarterPlayer","children":[{"name":"StarterPlayerScripts","className":"StarterPlayerScripts","children":[{"name":"featureTests","className":"LocalScript","filePaths":["testing/tests/client\\featureTests\\init.client.luau"]}]}]}]}
1+
{"name":"bridgenet2-test","className":"DataModel","filePaths":["testing.project.json"],"children":[{"name":"ReplicatedStorage","className":"ReplicatedStorage","children":[{"name":"Packages","className":"Folder","children":[{"name":"RemotePacketSizeCounter","className":"ModuleScript","filePaths":["Packages\\RemotePacketSizeCounter.lua"]},{"name":"TableKit","className":"ModuleScript","filePaths":["Packages\\TableKit.lua"]},{"name":"_Index","className":"Folder","children":[{"name":"[email protected]","className":"Folder","children":[{"name":"tablekit","className":"ModuleScript","filePaths":["Packages\\_Index\\[email protected]\\tablekit\\src\\init.luau","Packages\\_Index\\[email protected]\\tablekit\\default.project.json"]}]},{"name":"[email protected]","className":"Folder","children":[{"name":"wally-instance-manager","className":"ModuleScript","filePaths":["Packages\\_Index\\[email protected]\\wally-instance-manager\\src\\init.luau","Packages\\_Index\\[email protected]\\wally-instance-manager\\default.project.json"]}]},{"name":"[email protected]","className":"Folder","children":[{"name":"remotepacketsizecounter","className":"ModuleScript","filePaths":["Packages\\_Index\\[email protected]\\remotepacketsizecounter\\src\\init.luau","Packages\\_Index\\[email protected]\\remotepacketsizecounter\\default.project.json"]}]}]},{"name":"wallyInstanceManager","className":"ModuleScript","filePaths":["Packages\\wallyInstanceManager.lua"]},{"name":"bridgenet2","className":"ModuleScript","filePaths":["src\\init.luau"],"children":[{"name":"Client","className":"ModuleScript","filePaths":["src\\Client\\init.luau"],"children":[{"name":"ClientBridge","className":"ModuleScript","filePaths":["src\\Client\\ClientBridge.luau"]},{"name":"ClientConnection","className":"ModuleScript","filePaths":["src\\Client\\ClientConnection.luau"]},{"name":"ClientIdentifiers","className":"ModuleScript","filePaths":["src\\Client\\ClientIdentifiers.luau"]},{"name":"ClientProcess","className":"ModuleScript","filePaths":["src\\Client\\ClientProcess.luau"]}]},{"name":"Constants","className":"ModuleScript","filePaths":["src\\Constants.luau"]},{"name":"PublicTypes","className":"ModuleScript","filePaths":["src\\PublicTypes.luau"]},{"name":"Server","className":"ModuleScript","filePaths":["src\\Server\\init.luau"],"children":[{"name":"HandleInvalidPlayer","className":"ModuleScript","filePaths":["src\\Server\\HandleInvalidPlayer.luau"]},{"name":"PlayerContainers","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\init.luau"],"children":[{"name":"All","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\All.luau"]},{"name":"Except","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\Except.luau"]},{"name":"Players","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\Players.luau"]},{"name":"Single","className":"ModuleScript","filePaths":["src\\Server\\PlayerContainers\\Single.luau"]}]},{"name":"ServerBridge","className":"ModuleScript","filePaths":["src\\Server\\ServerBridge.luau"]},{"name":"ServerConnection","className":"ModuleScript","filePaths":["src\\Server\\ServerConnection.luau"]},{"name":"ServerIdentifiers","className":"ModuleScript","filePaths":["src\\Server\\ServerIdentifiers.luau"]},{"name":"ServerProcess","className":"ModuleScript","filePaths":["src\\Server\\ServerProcess.luau"]}]},{"name":"Studio","className":"Folder","children":[{"name":"MockBridge","className":"ModuleScript","filePaths":["src\\Studio\\MockBridge.luau"]},{"name":"MockConnection","className":"ModuleScript","filePaths":["src\\Studio\\MockConnection.luau"]},{"name":"MockIdentifiers","className":"ModuleScript","filePaths":["src\\Studio\\MockIdentifiers.luau"]}]},{"name":"Types","className":"ModuleScript","filePaths":["src\\Types.luau"]},{"name":"Utilities","className":"Folder","children":[{"name":"NetworkUtils","className":"ModuleScript","filePaths":["src\\Utilities\\NetworkUtils.luau"]},{"name":"Output","className":"ModuleScript","filePaths":["src\\Utilities\\Output.luau"]},{"name":"RecycledSpawn","className":"ModuleScript","filePaths":["src\\Utilities\\RecycledSpawn.luau"]},{"name":"isEditMode","className":"ModuleScript","filePaths":["src\\Utilities\\isEditMode.luau"]},{"name":"tostringData","className":"ModuleScript","filePaths":["src\\Utilities\\tostringData.luau"]}]},{"name":"version","className":"ModuleScript","filePaths":["src\\version.luau"]}]}]},{"name":"benches","className":"Folder","children":[{"name":"Hex.bench","className":"ModuleScript","filePaths":["benchmarks\\Hex.bench.luau"]}]},{"name":"framework","className":"ModuleScript","filePaths":["testing/framework\\init.luau"],"children":[{"name":"bootstrapper","className":"ModuleScript","filePaths":["testing/framework\\bootstrapper.luau"]},{"name":"expect","className":"ModuleScript","filePaths":["testing/framework\\expect.luau"]}]}]},{"name":"ServerScriptService","className":"ServerScriptService","children":[{"name":"featureTests","className":"Script","filePaths":["testing/tests/server\\featureTests\\init.server.luau"]}]},{"name":"StarterPlayer","className":"StarterPlayer","children":[{"name":"StarterPlayerScripts","className":"StarterPlayerScripts","children":[{"name":"featureTests","className":"LocalScript","filePaths":["testing/tests/client\\featureTests\\init.client.luau"]}]}]}]}

src/Client/ClientIdentifiers.luau

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--!strict
2-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
3-
2+
local wallyInstanceManager = require(script.Parent.Parent.Parent.wallyInstanceManager)
43
local Types = require(script.Parent.Parent.Types)
54
local Output = require(script.Parent.Parent.Utilities.Output)
65

@@ -13,7 +12,7 @@ local ClientIdentifiers = {}
1312

1413
function ClientIdentifiers.start()
1514
-- Wait for IdentifierStorage to exist, since we're on the client and load order isn't guaranteed.
16-
identifierStorage = ReplicatedStorage:WaitForChild("identifierStorage")
15+
identifierStorage = wallyInstanceManager.waitForInstance(script.Parent.Parent.Parent, "identifierStorage", 1)
1716

1817
-- Loop through every single existing identifer, stored as an attribute.
1918
-- Simply parse them into the system.

src/Client/ClientProcess.luau

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--!strict
2-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
32
local RunService = game:GetService("RunService")
43

4+
local wallyInstanceManager = require(script.Parent.Parent.Parent.wallyInstanceManager)
55
local Types = require(script.Parent.Parent.Types)
66
local Output = require(script.Parent.Parent.Utilities.Output)
77
local RecycledSpawn = require(script.Parent.Parent.Utilities.RecycledSpawn)
@@ -19,8 +19,10 @@ function ClientProcess.start()
1919
Output.log(`Loading client version {version}`)
2020

2121
-- :WaitForChild() to confirm instances exist, we're in another thread.
22-
local DataRemoteEvent: RemoteEvent = ReplicatedStorage:WaitForChild("dataRemoteEvent")
23-
local MetaRemoteEvent: RemoteEvent = ReplicatedStorage:WaitForChild("metaRemoteEvent")
22+
local DataRemoteEvent: RemoteEvent =
23+
wallyInstanceManager.waitForInstance(script.Parent.Parent.Parent, "dataRemoteEvent", 1)
24+
local MetaRemoteEvent: RemoteEvent =
25+
wallyInstanceManager.waitForInstance(script.Parent.Parent.Parent, "metaRemoteEvent", 1)
2426

2527
DataRemoteEvent.OnClientEvent:Connect(function(receivedData)
2628
table.insert(inboundQueue, receivedData)

src/Server/ServerIdentifiers.luau

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
--!strict
2-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
3-
42
local Constants = require(script.Parent.Parent.Constants)
3+
local wallyInstanceManager = require(script.Parent.Parent.Parent.wallyInstanceManager)
54
local Types = require(script.Parent.Parent.Types)
65
local Output = require(script.Parent.Parent.Utilities.Output)
76

@@ -13,13 +12,13 @@ local compressedIdentifierMap = {}
1312
local identifierStorage: Folder
1413

1514
function ServerIdentifiers.start()
16-
local potentialIdentifierStorage = ReplicatedStorage:FindFirstChild("identifierStorage")
15+
local potentialIdentifierStorage = wallyInstanceManager.get(script.Parent.Parent.Parent, "identifierStorage")
1716
if potentialIdentifierStorage then
1817
identifierStorage = potentialIdentifierStorage
1918
else
2019
identifierStorage = Instance.new("Folder")
2120
identifierStorage.Name = "identifierStorage"
22-
identifierStorage.Parent = ReplicatedStorage
21+
wallyInstanceManager.add(script.Parent.Parent.Parent, identifierStorage)
2322
end
2423

2524
ServerIdentifiers.ref("NIL_VALUE")

src/Server/ServerProcess.luau

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
--!strict
22
local Players = game:GetService("Players")
3-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
43
local RunService = game:GetService("RunService")
54

65
local HandleInvalidPlayer = require(script.Parent.HandleInvalidPlayer)
76
local Output = require(script.Parent.Parent.Utilities.Output)
87
local TableKit = require(script.Parent.Parent.Parent.TableKit)
8+
local wallyInstanceManager = require(script.Parent.Parent.Parent.wallyInstanceManager)
99
local Types = require(script.Parent.Parent.Types)
1010
local RecycledSpawn = require(script.Parent.Parent.Utilities.RecycledSpawn)
1111
local version = require(script.Parent.Parent.version)
@@ -47,22 +47,22 @@ function ServerProcess.start()
4747
local metaRemoteEvent
4848
local dataRemoteEvent
4949

50-
local potentialMetaRemoteEvent = ReplicatedStorage:FindFirstChild("metaRemoteEvent")
50+
local potentialMetaRemoteEvent = wallyInstanceManager.get(script.Parent.Parent.Parent, "metaRemoteEvent")
5151
if potentialMetaRemoteEvent then
5252
metaRemoteEvent = potentialMetaRemoteEvent
5353
else
5454
metaRemoteEvent = Instance.new("RemoteEvent")
5555
metaRemoteEvent.Name = "metaRemoteEvent"
56-
metaRemoteEvent.Parent = ReplicatedStorage
56+
wallyInstanceManager.add(script.Parent.Parent.Parent, metaRemoteEvent)
5757
end
5858

59-
local potentialDataRemoteEvent = ReplicatedStorage:FindFirstChild("dataRemoteEvent")
59+
local potentialDataRemoteEvent = wallyInstanceManager.get(script.Parent.Parent.Parent, "dataRemoteEvent")
6060
if potentialDataRemoteEvent then
6161
dataRemoteEvent = potentialDataRemoteEvent
6262
else
6363
dataRemoteEvent = Instance.new("RemoteEvent")
6464
dataRemoteEvent.Name = "dataRemoteEvent"
65-
dataRemoteEvent.Parent = ReplicatedStorage
65+
wallyInstanceManager.add(script.Parent.Parent.Parent, dataRemoteEvent)
6666
end
6767

6868
Players.PlayerAdded:Connect(playerAdded)

src/version.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
return "0.5.5"
1+
return "0.5.6"

wally.lock

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ registry = "test"
44

55
[[package]]
66
name = "ffrostflame/bridgenet2"
7-
version = "0.5.0"
8-
dependencies = [["RemotePacketSizeCounter", "pysephwasntavailable/[email protected]"], ["TableKit", "ffrostflame/[email protected]"]]
7+
version = "0.5.5"
8+
dependencies = [["RemotePacketSizeCounter", "pysephwasntavailable/[email protected]"], ["TableKit", "ffrostflame/[email protected]"], ["wallyInstanceManager", "ffrostflame/[email protected]"]]
99

1010
[[package]]
1111
name = "ffrostflame/tablekit"
1212
version = "0.2.4"
1313
dependencies = []
1414

15+
[[package]]
16+
name = "ffrostflame/wally-instance-manager"
17+
version = "0.1.0"
18+
dependencies = []
19+
1520
[[package]]
1621
name = "pysephwasntavailable/remotepacketsizecounter"
1722
version = "2.1.0"

wally.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[package]
22
name = "ffrostflame/bridgenet2"
3-
version = "0.5.5"
3+
version = "0.5.6"
44
registry = "https://github.com/UpliftGames/wally-index"
55
realm = "shared"
66
description = "The successor to BridgeNet, BridgeNet2 is a blazing-fast networking library designed for scale and performance."
77
license = "MIT"
88

99
[dependencies]
1010
TableKit = "ffrostflame/[email protected]"
11-
RemotePacketSizeCounter = "pysephwasntavailable/[email protected]"
11+
RemotePacketSizeCounter = "pysephwasntavailable/[email protected]"
12+
wallyInstanceManager = "ffrostflame/[email protected]"

0 commit comments

Comments
 (0)